[Insight-users] sorry, im again with wrappers
Gaetan Lehmann
gaetan.lehmann at jouy.inra.fr
Tue Jul 26 10:07:04 EDT 2005
Hi Brad,
Since your fix in cableswig, I get a wrapping gap warning for
LabelStatisticsImageFilter (a some other classes) :
Generating wrap_itkLabelStatisticsImageFilterPython.cxx
Warning
itk::Statistics::Histogram<double,1,itk::Statistics::DenseFrequencyContainer<float>
>
has a class hierarchy that has wrapping gaps.
The class hierarchy wrapping is as follows:
Not wrapped: itk::Statistics::Sample<(itk::FixedArray<(double,1)>)>
Wrapped: itk::Object
Wrapped: itk::LightObject
I have wrapped itk::Statistics::Sample (see attached patch), and now I get
another warning when building LabelStatisticsImageFilter :
Generating wrap_itkLabelStatisticsImageFilterPython.cxx
:1: Warning(401): Nothing known about class
'itk::Statistics::Sample<itk::FixedArray<double,1 > >'. Ignored.
:1: Warning(401): Maybe you forgot to instantiate
'itk::Statistics::Sample<itk::FixedArray<double,1 > >' using %template.
Sample builds without warning, but finally, I can't load InsightToolkit
module in python :
1> import InsightToolkit
---------------------------------------------------------------------------
exceptions.ImportError Traceback (most
recent call last)
/usr/lib/InsightToolkit/<console>
/usr/lib/InsightToolkit/python/InsightToolkit.py
----> 1 from itkalgorithms import *
2 from itkio import *
/usr/lib/InsightToolkit/python/itkalgorithms.py
----> 1 from itkbasicfilters import *
2 from itknumerics import *
3 __itk_import_data__ = itkbase.preimport()
4 from ITKAlgorithmsPython import *
5 itkbase.postimport(__itk_import_data__)
/usr/lib/InsightToolkit/python/itkbasicfilters.py
2 __itk_import_data__ = itkbase.preimport()
3 from ITKBasicFiltersAPython import *
----> 4 from ITKBasicFiltersBPython import *
5 from ITKBasicFiltersCPython import *
6 itkbase.postimport(__itk_import_data__)
/usr/lib/InsightToolkit/ITKBasicFiltersBPython.py
78 from itkExpandImageFilter import *
79 from itkIntensityWindowingImageFilter import *
---> 80 from itkLabelStatisticsImageFilter import *
81 from itkLaplacianRecursiveGaussianImageFilter import *
82 from itkLaplacianSharpeningImageFilter import *
/usr/lib/InsightToolkit/itkLabelStatisticsImageFilter.py
56 import vnl_vector
57 import vnl_vector_ref
---> 58 import itkSample
59 import itkImage_2D
60 import ITKRegions
/usr/lib/InsightToolkit/itkSample.py
3 # This file is compatible with both classic and new-style classes.
4
----> 5 import _itkSample
6
7 def _swig_setattr(self,class_type,name,value):
ImportError: No module named _itkSample
Do you know why Sample is not wrapped and how it can be fixed ?
Regards,
Gaetan
On Wed, 22 Jun 2005 18:52:58 +0200, Brad King <brad.king at kitware.com>
wrote:
> Gaetan Lehmann wrote:
>> Hi,
>> Finally I took time to look at this problem :-)
>> Adding ScalarImageToHistogramGenerator(const Self&); //purposely
>> not implemented
>> void operator=(const Self&); //purposely not implemented
>> in private section of
>> Insight/Code/Numerics/Statistics/itkScalarImageToHistogramGenerator.h
>> solve my build problems.
>> ScalarImageToHistogramGenerator appears as it should in InsightTookit
>> module... it just need to be tested now :-)
>
> Oops, I had that change on my local disk and did not commit it after
> committing the CableSwig fixes. I've committed it now.
>
> -Brad
--
Gaetan Lehmann <gaetan.lehmann at jouy.inra.fr>
Tel: +33 1 34 65 29 66
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
Web: http://voxel.jouy.inra.fr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wrap_itkSample.cxx
Type: application/octet-stream
Size: 1679 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/insight-users/attachments/20050726/c9e40a54/wrap_itkSample.obj
More information about the Insight-users
mailing list