[Insight-users] itk::GDCMImageIO - GetValueFromTag

Mathieu Malaterre mathieu.malaterre at gmail.com
Wed Nov 21 08:35:29 EST 2007


Hi David,

  This is fixed in the documentation. Thanks for report. Thanks JP for
your quick response !

-Mathieu

 cvs ci -m"STYLE: add doc for GetValueFromTag. Thanks to David Lambiel
for report" itkGDCMImageIO.h
/cvsroot/Insight/Insight/Code/IO/itkGDCMImageIO.h,v  <--  itkGDCMImageIO.h
new revision: 1.33; previous revision: 1.32

On Nov 21, 2007 2:28 PM, David Lambiel <dlambielitk at gmail.com> wrote:
> You're right. That's it.
> Thank you.
> David
>
>
>
> On Nov 21, 2007 2:18 PM, Jean-Pierre Roux <jpr at creatis.insa-lyon.fr> wrote:
> >
> > David Lambiel wrote:
> > > Hello
> > > Thanks in advance for the help.
> > > I'm extracting some tags from a DICOM image set. Some tags are
> > > correct, some seem to be empty... But I checked with imageJ and they
> > > exists.
> > >
> > > For example: I'm getting the tags with something like this:
> > >
> > > itk::GDCMImageIO::Pointer dicomIO = itk::GDCMImageIO::New();
> > >
> > > [...]
> > >
> > > std::string patientID;
> > > std::string tagkey = "0010|0020";
> > > dicomIO->GetValueFromTag(tagkey, patientID);
> > > std::cout  << "    Patient ID: " << patientID << std::endl;
> > >
> > > std::string patientBirthDate;
> > > tagkey = "0010|0030";
> > > dicomIO->GetValueFromTag(tagkey, patientBirthDate);
> > > std::cout  << "    Patient BirthDate: " << patientBirthDate <<
> std::endl;
> > >
> > > [...]
> > >
> > > std::string studyInstanceUID;
> > > tagkey = "0020|000D";
> >
> > ==> I'm not 100% sure, but I remember some troubles with gdcm when we
> > mixed uper case and lower case hexadecimal values..
> > Did you try
> > tagkey = "0020|000d";
> >
> > Jean-Pierre Roux
> >
> >
> > > bool found = dicomIO->GetValueFromTag(tagkey, studyInstanceUID);
> > > std::cout  << "    Study Instance UID: " << studyInstanceUID <<
> std::endl;
> > >
> > > The 2 first are correct, but the third is empty. The getValueFromTag
> > > return me a 0. But imageJ give me for the same set:
> > >
> > > [...]
> > > 0010,0020  Patient ID: 278579
> > > [...]
> > > 0020,000D  Study Instance UID: 1.2.840.41213141111.2.9.3.400025584
> > >
> > > So I'm lost. Does someone has an idea where/what is the problem ?
> > > Perhaps I'm missing something, important or dumb...
> > >
> > > Thanks
> > >
> > > David Lambiel
> > > -----------------------------------------------------------------
> > > Swiss Federal Institute of Technology Lausanne (EPFL)
> > > Signal Processing Institute (ITS)
> > > Signal Processing Laboratory 5
> > > Station 11
> > > ELD 225 (Bâtiment ELD)
> > > 1015 Lausanne
> > > Switzerland
> > > ------------------------------------------------------------------------
> > >
> > > _______________________________________________
> > > Insight-users mailing list
> > > Insight-users at itk.org
> > > http://www.itk.org/mailman/listinfo/insight-users
> > >
> >
>
>
>
> --
>
>
> ---------------------------------------------------------------
> Swiss Federal Institute of Technology Lausanne (EPFL)
> Signal Processing Institute (ITS)
> Signal Processing Laboratory 5
> Station 11
> ELD 225 (Bâtiment ELD)
> 1015 Lausanne
> Switzerland
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
>



-- 
Mathieu


More information about the Insight-users mailing list