Image-Grouping in Studies,Series and Ordering Multiple Files

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
cazaf
Posts: 9
Joined: Tue, 2005-04-05, 02:38
Location: Porto Alegre, RS, Brazil

Image-Grouping in Studies,Series and Ordering Multiple Files

#1 Post by cazaf »

Hi,

I would like some help in grouping images from multiple files. I´ve already found out that using SERIES UID and STUDY UID I can find from which study and from which series each image is, if theres is only one series and study in each dicom file.
My first problem is: when I have multiple files with the same SERIES UID and STUDY UID, how can I order their images?
My second problem is: when I have a file with multiple SERIES/ STUDIES, how can I know wich "DicomImage" object is from wich SERIES/STUDIES? And if I have to build my DicomImage objects from anything other then the filename of my DICOM file, wich entity should I use to build it from in order to have access to the information I need?

Thank you all very much in advance.
Carlos Zaffari.

AndreasKnopke
Posts: 49
Joined: Wed, 2005-02-16, 16:27

#2 Post by AndreasKnopke »

DICOM uses a hierachical ordering to group instances.

StudyInstanceUID -> one ore more SeriesInstanceUID's -> one or more SOPInstanceUID's

Every image must contain a valid StudyInstanceUID, SeriesInstanceUID and SopInstanceUID. Although this is a lot of redundant information, the advantage is that you can always determine to which study/series an image belongs.

regards,
Andreas

cazaf
Posts: 9
Joined: Tue, 2005-04-05, 02:38
Location: Porto Alegre, RS, Brazil

Sounds right... but I need some more help...

#3 Post by cazaf »

Hi,

First of all: thanks AndreasKnopke, what you said makes perfect sense to me, but I still have some doubts...
1 - Should I use SopInstanceUID from the image to order images from multiple files?
2 - Using DCMTK, how should I procceed in order to obtain such information? Should I traverse DcmDataset object from my DcmFileFormat object using DcmDataset::nextInContainer(DcmObject*)? How will I know the returned DcmObject* from DcmDataset::nextInContainer(DcmObject*) is approprieate to create a DicomImage object? In the first call for DcmDataset::nextInContainer(DcmObject*) should I pass NULL to get the first object? In she following calls, should I pass the last retrieved DcmObject*?


Thank you all very much in advance.
Carlos Zaffari.

AndreasKnopke
Posts: 49
Joined: Wed, 2005-02-16, 16:27

#4 Post by AndreasKnopke »

1 - Should I use SopInstanceUID from the image to order images from multiple files?
No, you can not use SOPInstanceUID to order images. DICOM says that this UID is supposed to be unique and must contain a device/application specific root but it does not say that it should represent any order. Some modalities append time stamps to the root key that might be equivalent to the instance creation time, but some don't.

Most of the time you can simply use the InstanceNumber attribute to sort your images, but sometimes SlicePosition or InstanceCreationTime are also appropriate.

regards,
Andreas

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest