[Insight-users] itk::GDCMImageIO - GetValueFromTag
David Lambiel
dlambielitk at gmail.com
Wed Nov 21 06:48:07 EST 2007
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";
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20071121/5416cd50/attachment.html
More information about the Insight-users
mailing list