[Insight-users] Segfault in ~DICOMImageIO2 when loading PNG i f ITK imported after VTK

Miller, James V (Research) millerjv at crd . ge . com
Mon, 1 Dec 2003 10:41:40 -0500


A quick test may be to build the DICOMParser library as a static library.

Long term we may to namespace the DICOMParser uniquely in the two toolkits
like the kwsys library. 

I am guessing the problem is that the versions of the DICOMParser between
the two toolkits are different.  Otherwise, I would expect we would have the
same issues with libjpeg, libpng, etc.

Jim



-----Original Message-----
From: Charl P. Botha [mailto:c . p . botha at ewi . tudelft . nl]
Sent: Monday, December 01, 2003 9:09 AM
To: insight-users at itk . org
Subject: [Insight-users] Segfault in ~DICOMImageIO2 when loading PNG if
ITK imported after VTK


Dear list,

Attached is a very simple Python sample (the INSIGHT_ROOT variable has
to be set to your Insight source directory).  With latest CVS ITK, VTK
and Python wrappings compiled, this segfaults.  See the attached
backtrace.

The segfault occurs in the DICOMImageIO2 dtor when this->AppHelper is
deleted, even when a non-DICOM image is loaded, for example a PNG.  This
is obviously because the image loaders are tried in turn until one
works.  

If one imports InsightToolkit BEFORE importing vtk however, there is no
segfault.  This looks like it could have something to do with the
DICOMParser and DICOMAppHelper which are present in both VTK and ITK.

Does anyone have any ideas about this bug?  Unfortunately, it doesn't
seem like the CMake setup supports easily disabling the DICOM support
anymore.

Thanks,
Charl

-- 
charl p. botha http://cpbotha . net/ http://visualisation . tudelft . nl/