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.


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


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.


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!