[Insight-users] gdcm 2.0 - single tag/key
Rashindra Manniesing
r.manniesing at erasmusmc.nl
Mon Dec 8 03:47:43 EST 2008
HI Mathieu,
Thanks!
I was referring to Utilities/DICOM/DICOMApphelper and other files in that
directory (eg DICOMParser) - they are used in eg itkDICOMImageIO2.
rashindra
-----Original Message-----
From: Mathieu Malaterre [mailto:mathieu.malaterre at gmail.com]
Sent: Monday, December 08, 2008 9:41
To: Rashindra Manniesing
Cc: insight-users at itk.org
Subject: Re: [Insight-users] gdcm 2.0 - single tag/key
On Sun, Dec 7, 2008 at 5:07 PM, Rashindra Manniesing
<r.manniesing at erasmusmc.nl> wrote:
>
> I am using gdcm 2.0 in itk now, and I was wondering how to read an
> user-defined single tag/key pair from the header other than provided by
> the dicomapphelper.
What is dicomapphelper ? there is no such beast in gdcm AFAIK.
In ITK/GDCM:
std::string tagkey = "0008|1050";
std::string labelId;
if( itk::GDCMImageIO::GetLabelFromTag( tagkey, labelId ) )
{
std::string value;
std::cout << labelId << " (" << tagkey << "): ";
if( dicomIO->GetValueFromTag(tagkey, value) )
{
std::cout << value;
}
else
{
std::cout << "(No Value Found in File)";
}
std::cout << std::endl;
}
else
{
std::cerr << "Trying to access inexistant DICOM tag." << std::endl;
}
2cts
--
Mathieu
More information about the Insight-users
mailing list