[Insight-users] gdcm 2.0 - single tag/key

Mathieu Malaterre mathieu.malaterre at gmail.com
Mon Dec 8 03:50:44 EST 2008


So why do you refer to gdcm in the subject line of your post ? the
default DICOM reader is GDCM, why do you force the DICOM reading to
DICOMImageIO2. Did you find any issue using the default GDCM mechanism
?

thanks

On Mon, Dec 8, 2008 at 9:47 AM, Rashindra Manniesing
<r.manniesing at erasmusmc.nl> wrote:
>
> 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
>
>



-- 
Mathieu


More information about the Insight-users mailing list