[Dcmlib] switching from gdcm 1.3 to 2.0
Mathieu Malaterre
mathieu.malaterre at gmail.com
Fri Aug 22 10:54:57 CEST 2008
Hi Greg,
Long story short, the API has been completely rewritten from
scratch. I have done some project update myself and it is definitely
possible. The basic idea is in GDCM 1.x you had:
gdcm::File file:
file.SetFilename( 'input.dcm' );
file.Load()
now in GDCM 2.x you have a clear separation between the data structure
and the filter:
gdcm::ImageReader reader:
reader.SetFilename( 'input.dcm' );
reader.Read();
file = reader.GetFile();
So the main structure remains a gdcm::File, but other than that all
the tiny details have also changed. If there is something you do not
know how to convert, please send it to this mailing list.
Most of the GDCM users would not even know all those tiny details, as
they were only using the ITK or VTK filter on top of the lib. For
those people transition will be much easier.
Sorry for the troubles, but that was a necessity. Even bigger projects
sometimes have to break API, that's unfortunate, but it happen
http://it.slashdot.org/article.pl?sid=08/02/01/1624247 (Python 3.0 To
Be Backwards Incompatible). By redesigning completely from scratch the
API, and adjusting name to match the one in the DICOM standard, no
such API breakage should happen again (you take that to the bank).
-Mathieu
On Thu, Aug 21, 2008 at 12:07 AM, Greg Book <gbook at gbook.org> wrote:
> I'd like to switch over to using gdcm 2.0.8 instead of 1.3.2, but I notice
> the API has changed significantly.. Is there any documentation on what
> functions have changed? I can look through the examples for the new API
> functions, but if there is an easier way I'd like to try it.
>
> -Greg
>
> _______________________________________________
> Dcmlib mailing list
> Dcmlib at creatis.insa-lyon.fr
> http://www.creatis.insa-lyon.fr/mailman/listinfo/dcmlib
>
--
Mathieu
More information about the Dcmlib
mailing list