Unable to get DICOM SQ tags from simpleITK series reader metadata keys

Hi, I am I read a dicom series using series reader. I wanted to read dicom metadata but I could not see metadata keys that further has collection of dicom tags in it. As an example I wish to read 0054|0016 which further has dicom tags like 0018|1072, 0018|1074 in it which I wish to read. Can you please guide on how to get such meta data dicom tags read from simpleITK perspective?
Thanks, Jiten

1 Like

Hello @Jigabytes,

Please take a look at this example which shows how to set the reader to load all DICOM tags. After you follow the example, please post back if the tags are still not loaded.

2 Likes

Hello @zivy, yes before creating this topic I referred to the link you provided and obtained all metadata keys with setup mentioned in example, yet I could not see 0054|0016 parent tag and its child tags 0018|1072, 0018|1074 in the keys returned by series reader get metadata keys api. Is there any other alternative or is this issue with series reader metadata retrieval apis? Thanks, Jiten

2 Likes

Have you tried opening the file(s) with e.g. Slicer, and looking at the list of tags? If the tags are not there you cannot obtain them.

Hi @dzenanz I did not try with slicer but I have Osirix through which I was able to see mentioned tags.

IMHO, if you have to access attributes in a data set - try GDCM (is in ITK by default) or DCMTK (must be enabled in cmake) or pydicom. I can share code how to read sequences with GDCM. MetaData dictionary skips sequences in GDCMImageIO.

4 Likes

Hi @mihail.isakov Thanks for ur response. Is GDCM exposed via simple ITK? I was able to get the SQ attributes via pydicom. Its just that I have to add dependency on pydicom to read SQ attributes and was hoping to get it all from SimpleITK. It would be great if u could share code to retrieve bthe SQ attribute via GDCM. Thanks, Jiten!

@Jigabytes I’m facing the same issue: I’m able to read the SQ tag using pydicom, but SITK is unable to retrieve neither the key nor value of the the particular tag.

Did you find a solution for SITK?

DICOM tags can be very complex and may store large amount of information with many cross-references to information stored in other files. These other files may be stored locally or need to be retrieved from remote servers. DICOM storage is essentially a complex hierarchical distributed object-oriented database.

The metadata dictionary interface in ITK readers cannot provide a comprehensive interface for such a complex database. All you can expect from a DICOM image file reader is to provide file names and DICOM UIDs of the frames that were used to build the volume. You can consider any extra tags the reader gives you as a bonus, made available just for convenience for some common simple use cases.

For full access to all the DICOM metadata, you can use your DICOM toolkit of choice such as DCMTK, GDCM, pydicom, highdicom, etc.

2 Likes