[Insight-users] Dicom Image : How to access to all the tags

Mathieu Malaterre mathieu.malaterre at gmail.com
Tue Mar 9 04:58:12 EST 2010


> edoardo.belletti at alice.it wrote:
>>
>> Hi Insight-users,
>> I have a problem: I don't know how can I access to all the tags present in
>> a dicom image.
>> With the code used in the example of the manual
>> (Examples/IO/DicomImageReadPrintTags.cxx) not all the tags are printed and
>> for accuracy in the output there isn't the tag
>> "SequenceOfUltrasoundReagions" that interest me. But I know that in the file
>> which I run this tag is present.
>> How can I access to this tag?
>> I hope I was understandable.
>> In particular the piece of code is:
>
On Tue, Mar 9, 2010 at 10:49 AM, Gomez, Alberto <alberto.gomez at kcl.ac.uk> wrote:
> Hi,
>
> I have had the same problem but I think that there is no solution. It
> depends on the manufacturer of the US acquisition system, and whether the
> tags are private or not, and the data encrypted.

No.

The DICOM Attribute the OP refers to is a VR:SQ (a public element). As
of now itk::GDCMImageIO does not load VR:SQ DICOM attribute. As
described here:

http://www.itk.org/Doxygen/html/classitk_1_1GDCMImageIO.html#_details

...
Warning:
    There are several restrictions to this current writer:

        * Eventhough during the writing process you pass in a DICOM
file as input The output file may not contains ALL DICOM field from
the input file. In particular:
              o The SeQuence DICOM field (SQ).
              o Fields from Private Dictionary
        * Some very long (>0xfff) binary fields are not loaded
(typically 0029|0010), you need to explicitely set the maximum length
of elements to load to be bigger (see Get/SetMaxSizeLoadEntry)
...


You have to use the underlying DICOM library (GDCM 1.x or GDCM 2.x) to
extract that particular -nested- information.

HTH
-- 
Mathieu


More information about the Insight-users mailing list