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
 Dicom Tags

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

Size 
UserName:
Password:
Mode 
Format  BoldItalicizedUnderline Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailBrowse for an image to attach to your post Browse for a zip to attach to your post Insert CodeInsert QuoteInsert List
   
Message 

 

Smilies
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
Ronald Ruijs Posted - Mar 24 2020 : 13:27:26
Hello,

Refer to attached Dicom Image, a multiframe (9 frames) that has per-frame different pixel spacing. I tried to acces those, using Per-frame Functional Groups Sequence ($5200, $9230).

Code:


  with IO.Params.DICOM_Tags do
  begin
    n := IndexOf($5200, $9230);

    if n >= 0 then
    begin
      c := GetTagChildren(n);
    end;

    ShowMessage(IntToStr(c.count);
  end;


I expected c.count to 9, equal to the number of frames. Instead, I got 1.

Am I using correct way to acces sequence, or is there somehing else I missed?

I also loaded this image in your demo project "Dicom". When displaying raw dicom tags, you can see that there is something strange with indentation, which increases with every frame. Same image checked with DCMTK (Offis) gave correct xml, with correct indentation (no nesting tags that should not be nested).

Regards, Ronald





attach/Ronald Ruijs/2020324132633_mr.zip
376.14 KB
3   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Mar 30 2020 : 05:48:47
Thanks for the feedback, Ronald. Upon investigation it turns out we are not reading the structure correctly on some types of DICOM. We have a fix. Can you please email me to test it.

Nigel
Xequte Software
www.imageen.com
Ronald Ruijs Posted - Mar 27 2020 : 17:28:21
Hi Nigel,

Thank you for the reply. However, refer to attached xml representation, created with Offis DCMTK, which shows that $5200,$9230 is a sequence with 9 items, as expected per dicom standard http://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.7.6.16.html).
Given the "Increasing indentation", could it be that ImageEn is missing a sequence ending somewhere?

Regards, Ronald


attach/Ronald Ruijs/2020327173426_mr.zip
9.5 KB
xequte Posted - Mar 27 2020 : 17:16:02
Hi Ronald

In this file $5200,$9230 is sequence (SQ) with a single item. This item then contains 14 items. You can get these 14 items with:

var
  tags: TIEDicomTags;
  tag: PIEDicomTag;
  children: TObjectList;
begin
  imageenview.io.loadfromfiledicom('mr.dcm');
  tags := imageenview.IO.Params.DICOM_Tags;
  tag := tags.GetTag($5200, $9230);
  if (tag <> nil) then
  begin
    tags := tag^.Children[0] as TIEDicomTags;   // first item contains the actual sequence
    showmessage(inttostr(tags.Count));
  end;
end;



Nigel
Xequte Software
www.imageen.com