[Insight-users] WG: private Tags

Torsten Schön Torsten.Schoen at soft-gate.de
Tue Sep 20 09:24:00 EDT 2011


Hi John,

thank you for your quick reply.
Is there no possibility to get the private tags with the "standard" itk installation 3.20.0 ?


Torsten Schön

Softwareentwicklung

 

softgate gmbh

nägelsbachstr. 26

91052 erlangen

tel.: +49 (9131) 81270-82

fax: +49 (9131) 81270-99

www.soft-gate.de

Geschäftsführung: Dipl.-Inf. Udo Nyga
Sitz der Gesellschaft: Erlangen
Registergericht: Fürth, HRB 4855

-----Ursprüngliche Nachricht-----
Von: John Drescher [mailto:drescherjm at gmail.com] 
Gesendet: Mittwoch, 14. September 2011 15:18
An: Torsten Schön
Cc: insight-users at itk.org
Betreff: Re: [Insight-users] WG: private Tags

2011/9/14 Torsten Schön <Torsten.Schoen at soft-gate.de>:
>
>
> Hi All,
>
>
>
> I try to read some private tags from a DICOM image file.
>
> I am using the following code:
>
>
>
> // Pixel type
>
>        typedef signed short       PixelType;
>
>        // dimension
>
>        const unsigned int         Dimension = 2;
>
>        typedef itk::Image< PixelType, Dimension >      ImageType;
>
>        typedef itk::ImageFileReader< ImageType >     ReaderType;
>
>        typedef itk::GDCMImageIO ImageIOType;
>
>        typedef itk::MetaDataDictionary DictionaryType;
>
>        typedef itk::MetaDataObject< std::string > MetaDataStringType;
>
>        typedef itk::MetaDataObject< int > MetaDataIntegerType;
>
>
>
>        ReaderType::Pointer reader = ReaderType::New();
>
>        ImageIOType::Pointer dicomIO = ImageIOType::New();
>
>
>
>        dicomIO->SetLoadPrivateTags(true);
>
>        dicomIO->LoadPrivateTagsOn();
>
>        dicomIO->SetMaxSizeLoadEntry(0xffff);
>
>
>
>       reader->SetFileName( m_sImageFileName );
>
>        reader->SetImageIO( dicomIO );
>
>        reader->Update();
>
>
>
>        std::string value;
>
>        bool res = dicomIO->GetValueFromTag("0017|101e",value);
>
>
>
> In the documentation I wrote, that SetLoadPrivateTags(true); and
> LoadPrivateTagsOn() has no effect in the latest versions of gdcm.
>
> How can I read a private tag from the image?
>
>
You need to use system GDCM 2.0.X or ITK-4.0.X

John


More information about the Insight-users mailing list