ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Read dicom image icon

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
jwest Posted - May 23 2016 : 08:14:31
Hi,

Please, How could I read this icon:

(0088,0200) Icon Image Sequence (SQ) : ""
(0028,0002) Samples per Pixel (US) : "1"
(0028,0004) Photometric Interpretation (CS) : "MONOCHROME2 "
(0028,0010) Rows (US) : "128"
(0028,0011) Columns (US) : "128"
(0028,0100) Bits Allocated (US) : "8"
(0028,0101) Bits Stored (US) : "8"
(0028,0102) High Bit (US) : "7"
(7FE0,0010) Pixel Data (OW) : "џСгМХЖЛЫЧвЯжиаЩнрнклхтычхџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ"

I am doing the next, but no image is showing in imageenview.
ieview_ico:TImageEnView;
....
.....

var  a1,b1: PIEDicomTag;
         i: Integer;
         s:string;
         tb:Tstream;
    begin
        a1 := aTags.GetTag($88, $200);
        if not assigned(a1) then exit;
        if assigned(a1.Children) then begin
            b1:=TIEDicomTags(a1.Children[0]).GetTag($7FE0,$0010);
            tb:=TMemoryStream.Create;
            try
             tb.Size:=b1.DataLen;
             i:=tb.Write(b1.Data,tb.Size);
             tb.Position:=0;;
             ieview_ico.io.LoadFromStream(tb);
            finally
              tb.Free;
            end;
        end;
    end;
3   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - May 24 2016 : 19:51:06
Hi Luiz

The correct method would be as follows:


function _FindTag(DicomTags : TIEDicomTags; Group: Word; Element: Word): PIEDicomTag;

  procedure _ParseTags(tags: TIEDicomTags);
  var
    i, j: integer;
    tag: PIEDicomTag;
  begin
    for i := 0 to tags.Count - 1 do
    begin
      // GET DATA
      tag := tags.GetTag(i);
      if ( tag^.Group = Group ) and ( tag^.Element = Element ) then
      begin
        Result := tag;
        Exit;
      end;

      // PARSE ANY CHILDREN
      if assigned( tag.Children ) then
      begin
        // tag.Children is a TObjectList object, where each item is a TIEDicomTags object to pass recursively into ShowRawTags
        for j := 0 to tag.Children.Count - 1 do
        begin
          _ParseTags( tag.Children[j] as TIEDicomTags );

          // Found tag?
          if Result <> nil then
            Exit;
        end;
      end;
    end;
  end;

begin
  result := nil;
  _ParseTags( DicomTags );
end;


procedure TMainForm.Button1Click(Sender: TObject);
var
  a1: PIEDicomTag;
  s: string;
  tb: TStream;
begin
  a1 := _FindTag( ImageEnMView1.MIO.Params[0].DICOM_Tags, $7FE0, $0010 );
  if not assigned( a1 ) then
    exit;

  tb:=TMemoryStream.Create;
  try
    tb.Size := a1.DataLen;
    tb.Write( a1.Data, tb.Size );
    tb.Position := 0;
    if ImageEnView1.io.LoadFromStream( tb ) = False then
      Raise Exception.Create( 'Load Error');
  finally
    tb.Free;
  end;
end;


However the format of the image in "Pixel Data" is not recognized by ImageEn.



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
jwest Posted - May 23 2016 : 20:06:19
Hi, Mr Nigel

I canДt post the file using the file attach of the forum.

My file is a DICOMDIR file.

I create this dicomdir with dcmdir from dcmcache.

Link to file:

https://dl.dropboxusercontent.com/u/91247895/dicomdir.zip

I didnДt attached the FILE0 file(mentioned into dicomdir file), because itДs not necessary for now. Only to know, FILE0 is only a copy of original dicom image used for dcmdir to create the DICOMDIR.

Luiz
xequte Posted - May 23 2016 : 18:49:56
Hi

Can you attach your source DICOM file?



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com