[Insight-users] GDCM 1.2 update status.

Hans Johnson hans-johnson at uiowa.edu
Mon Feb 6 19:59:56 EST 2006


Mathieu,

I just wanted to let you know that some of the API changes in GDCM_LEGACY
are not working fully.

=== Old Code That Causes Segfaults ===
gdcm::File GdcmHeader(path);

=== New Code That Works ===
gdcm::File GdcmHeader;
GdcmHeader.SetFileName(path);
GdcmHeader.Load();

=======================


>From gdcmFile.h:
GDCM_LEGACY(File( std::string const &filename ));


My guess is that the GDCM_LEGACY(File...) call does not properly initialize
the class.

We have already made all the necessary changes to support the new interface,
but I thought you would like to know.

Regards,
Hans
 


On 2/3/06 10:51 AM, "Mathieu Malaterre" <mathieu.malaterre at kitware.com>
wrote:

> Hello happy gdcm users,
> 
> So I believe I am done with the update of gdcm 1.0 to gdcm 1.2. Let's
> start with the bad news:
> 
> API Change(*)
> - By default I decided to turn legacy silent off. If you edit your
> CMakeCache.txt you'll find a variable: GDCM_LEGACY_SILENT:OFF. What that
> mean is (if you use a decent compiler) that every time you use a
> deprecated method the compiler will yell at you. If you do not want
> that, then you have to manually change this variable to ON, to allow
> compiler to go on without warnings.
> - If you decide to turn GDCM_LEGACY_REMOVE:ON, what this means is that
> the legacy code will simply be removed from the library. Therefore you
> won't get warning, but compiler errors ! Turn to ON only if you want to
> make sure you are using the latest and greatest of gdcm :)
> 
> 
> Now for the good news:
> User have finally a more flexible way to restrict Series.
> 1. Using AddRestriction. In the past using SetUseSeriesDetails(true)
> would set by default the following DICOM tags to be inspected in order
> to find out DICOM file potentially out of a particular Series. Now you
> can explicitly specify which tag to use. What this also means, to ensure
> full backward compatibility is that in order to use AddRestriction the
> old default values are taken into account, and there is currently no way
> to remove those default values.
> See DicomSeriesReadImageWrite2 for an example of use
> 
> 2. Using operators. Let say you have a series of 1000 slices and you are
> only interested in let say slice 500-600. Since the filenames does not
> always explicitly says which slice they represent, you can tell the
> GDCMSeriesFileNames to look for those slices for you.
> See itkGDCMSeriesReadImageWrite for an example of use.
> 
> 3. Full support of JPEG2000 DICOM file ! Thanks to the OpenJPEG team we
> have a working J2K implementation that compress/decompress even 16bits
> images(**).
> 
> 4. Load time is now speared from construct time. This mean you can now
> specify what skip operation you want to do (skip shadow group, skip
> sequence...)
> 
> 5. More support of private dictionaries. Look into gdcm/Dicts to have a
> list of shadows DICOM tag. You can either add them at compile time, or
> at run time.
> 
> 6. More DICOMDIR support.
> 
> 
> Ps: I tried my best to keep full backward compatibility, if you think I
> missed something, please let me know ASAP.
> Mathieu
> 
> 
> (*)
> http://insightsoftwareconsortium.org/wiki/index.php/Administration-BackwardCom
> patibility#Current_Draft_of_the_ISC_Policy_on_Backward_Compatibility
> 
> (**) gdcm for a while was using JasPer another open source J2K
> implementation but it suffers from a serious decompression bug for
> 16bits lossless images.
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
> 




More information about the Insight-users mailing list