[Insight-users] Read & Write Private Tags

Mathieu Malaterre mathieu.malaterre at gmail.com
Fri Jul 17 09:12:00 EDT 2009


On Thu, Jul 2, 2009 at 2:40 AM, cynthia gu<cynthia.gu123 at gmail.com> wrote:
> Hi Mathieu,
>
> Thanks a lot for your reply to my email. I downloaded and read the PS3.5.
> Now I moved my private tag to the group of 0009.

good

> I haven't figure out how to handle the private tags. I saw the gdcm I'm
> using is 1.5 ( in gdcm.h, Version: $Revision: 1.5 $). Does this version
> handles private tag?

No, you must be using the default gdcm which is a 1.2.6 (I think).

> I manually added extra lines to /gdcm/Dicts/ gdcm.dic & DictGroupname.dic &
> dicomV3.dic to refer the private tag that I added, such as in gdcm,
> following lines were added:
>   0009 0000 UL 1 Group Length
>   0009 0001 LO 1 BagId
>   0009 0002 LO 1 Belt Position
>   0009 0003 LO 1 Ground Truth

Ok, you need to recompile ITK.

> When iterator goes through the tags, it seems never hit the group 0009:
>   typedef itk::MetaDataObject< std::string > MetaDataStringType;
>   DictionaryType::ConstIterator itr = dictionary.Begin();
>   DictionaryType::ConstIterator end = dictionary.End();
>   while( itr!=end) //Print all the tags
>   { \\print out the tag, but group 0009 is missing; }

You should either load the .dic file manually. Send a mail on the old
gdcm 1.x creatis mailing list if you cannot find the API. Or simply
recompile ITK as it will glob new private tag and insert them into the
runtime one (compiled into the lib).

> Could you please give a little more detailed instruction how to add private
> dictionary so that the private tags can be print out? Thanks so much.

You should really start sending email to the list, instead of private
one, you'll get much faster response IMHO.

HTH
-- 
Mathieu


More information about the Insight-users mailing list