[Dcmlib] Problems with Python Wrapper on Gdcm
Jean-Pierre Roux
jpr at creatis.insa-lyon.fr
Thu Dec 6 18:05:21 CET 2007
Paulo Henrique Junqueira Amorim wrote:
> Hi Jean-Pierre,
>
> Thank you for helping with vtkDICOMImageReader in the mailing list of
> VTK.
>
> We have developed a free software (license gpl2) of medical visualization
> called InVesalius [1]. It is written in Python and uses VTK.
>
> We would like to study and possibly use GDCM library in our project,
> but we
> are having some difficulty on porting it to Python. I am trying to
> generate the
> wrapper for Python 2.5 but when I try to compile GDCM, it presents
> several
> mistakes.I've used both Visual Studio 6 and 2005, but they presented the
> same mistakes.
Hi, Paulo.
The wrapping breaks (Widows+Linux) on a feature we added recently :
dealing with "Segmented Palette Color".
(I only saw ONE image like that in my life . We get a piece of code,
that works, from a contributor.
We didn't even try to wrap it in Python...
I suppose you'll *never* meet a "Segmented Palette Color" image (only
from very old ultrasound imagers ...)
To do a quick patch :
- Open the src/gdcmPixelReadConvert.cxx file
- Comment out the line #include "gdcmSegmentedPalette.h"
- Comment out the lines frm 242 to 260 (inside the { and } of
// Is it a Segmented Palette ? Check if we find the red one:
if( file->GetDocEntry(0x0028,0x1221) ) // no need to check for
blue & green
{
...
}
- Move out the file src/gdcmPixelReadConvert.h
It should solve your troubles (I'm not a Python wrapper specialist -the
class is templated, it will not be very easyto do the stuff)
If you have some problems with gdcm, feel free to contact us
(use the gdcm mailing list, dcmlib at creatis.univ-lyon1.fr, maybe
somebody more clever than I am will answer you.)
Jean-Pierre
>
> Could you help me, or do you know someone who could give a hand on
> this? The log text
> generated by Visual Studio is attached.
>
> Best regards,
>
> Paulo
>
>
> [1] Software Public Portal: http://www.softwarepublico.gov.br (if you
> have any problems
> on accesing the page - the site is in Portuguese but the software has
> English user interface also, please, contact me)ws+Unix)
More information about the Dcmlib
mailing list