[Insight-users] Read & Write Private Tags

Mathieu Malaterre mathieu.malaterre at gmail.com
Fri Jun 26 10:36:07 EDT 2009


Hi Cynthia,

On Thu, Jun 25, 2009 at 3:56 AM, cynthia gu<cynthia.gu123 at gmail.com> wrote:
> Hi Mathieu,
>
> I'm Cynthia, work for GE Securitys. I'm new on dicom and on using Itk/GDCM.
> Could you please give some instruction on how to read and write private tag
> with itk/Gdcm (version 3.12)?
>
> I didn't find function from gdcm library to add private tag, is there any? I
> used my own C code to add private tags (0001:0001 & 0001:0002) to my image.
> However, when I print the tags, they always start from (0002:0000). I have
> attached my code and sample image here.
>
> I didn't find any instruction for private tag from ItkSoftwareGuide2.4.pdf.
> I've been trying this for a week, still very confused. Could you please
> help?

Sorry to hear your troubles :(

First thing first: group 0001 is illegal, this is reserved by the
standard. The very first private group, vendors are allowed to use is
0009. Please use 0009 and read up PS 3.5 - 2008 , section 7.8 Private
Data Elements, esp implementor reserving data element.

Second thing, gdcm 1.2.x does not write out any private element that
is not referenced in the dictionary. Once you know which element you
would like to add, you need to referenced them in the GDCM private
dictionary (either the compiled one, or the on-the-fly you can insert
at run time).

HTH
-- 
Mathieu


More information about the Insight-users mailing list