[Dcmlib] DICOM Header
Mathieu Malaterre
mathieu.malaterre at kitware.com
Wed Nov 1 19:15:31 CET 2006
Clemens Hentschke wrote:
> Hi Mathieu,
>
> unfortunately, the regarding header sequences are changing from DICOM to DICOM. Its not possible to set them to a constant.
> It is with GDCM possible to read these sequence items tags? If so, it is possible to send me some code how it could work?
Alright then try solution #2, which will require some minor tweaks
unfortunately.
Here are the steps I follow to complete that:
#1. Get familiar with GDCM. Please post to dcmlib at creatis.insa-lyon.fr
instead of me. Just to keep track of your evolution.
#2. Once you understand how to use a gdcm::File. Write a small cxx code
that will load in a DICOM file. And print the value of your require
tags. See exExtractTag.cxx from the GDCM example directory.
#3. Once this is working all you need is an integration with ITK. This
is not very difficult, but require a little understanding of the PIMPL
idiom. Basically itkGDCMImageIO does not explose its internal. so you
don't have access to the gdcm::File being used for reading a file.
You'll have to add a function in the itkGDCMImageIO.h header file:
Something like
gdcm::File *GetInternalGDCMFile() {
return DICOMHeader.m_Header;
}
#4 (optional) If you get those 3 steps quickly. You could instead of
doing everything in your 'int main()' function. Instead you could modify
directly the file itkGDCMImageIO.cxx to load some specific sequence and
push some particular item in the MetaHeader. This solution being by far
the most clean. Unfortunately you have to make sure the tags will be unique
I hope this is not too much details for you, do not hesitate to ask
question on dcmlib. The email load is pretty low right now.
Good luck !
Mathieu
More information about the Dcmlib
mailing list