[Insight-developers] Re: sorry, im again with wrappers
Gaetan Lehmann
gaetan.lehmann at jouy.inra.fr
Wed Jan 25 04:52:01 EST 2006
Hi Brad,
I come back to an old discussion.
I still have a problems with nested namespaces. I get warnings during
build:
Generating wrap_itkScalarImageToHistogramGeneratorPython.cxx
:1: Warning(401): Nothing known about class
'itk::Statistics::Sample<itk::FixedArray<unsigned char,1 > >'. Ignored.
:1: Warning(401): Maybe you forgot to instantiate
'itk::Statistics::Sample<itk::FixedArray<unsigned char,1 > >' using
%template.
And after that, the ScalarImageToHistogramGenerator is not usable: the
object just doesn't have the methods of the class, only GetPointer,
IsNotNull, IsNull, Print, this and thisown.
The object is nearly empty, but the class contains all the methods
The GetPointer() method of the ScalarImageToHistogramGenerator
SmartPointer return a string
('_d0a26b08_p_itk__Statistics__ScalarImageToHistogramGeneratorTitk__ImageTunsigned_char_2_t_t'),
so it seems that the pointer is not wrapped.
Can we have a look at this problem ?
I'm using cable swig 2.4.0
Thanks,
Gaetan
On Tue, 21 Jun 2005 23:04:06 +0200, Brad King <brad.king at kitware.com>
wrote:
> Gaetan Lehmann wrote:
>> You're right, I also have a problem, but not at compile time with
>> python.
>> In InsightToolkit, I have only
>> itkScalarImageToHistogramGeneratorUS2_Pointer and
>> itkScalarImageToHistogramGeneratorUS2_PointerPtr.
>> itkScalarImageToHistogramGenerator,
>> itkScalarImageToHistogramGeneratorUS2,
>> itkScalarImageToHistogramGeneratorUS2Ptr and
>> itkScalarImageToHistogramGeneratorUS2_New are missing.
>> Once again, I'm not able to solve the problem, but I'm interested in
>> the solution :-)
>> Can you see where is the problem Brad ?
>
> It looks like SWIG does not support nested namespaces. I've put a hack
> in CableSwig.cxx that tricks it into working by pretending the deepest
> namespace is the only namespace ("Statistics") and then adding a using
> directive for the rest in the generated wrapper source file ("using
> namespace itk").
>
> -Brad
--
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66 fax: 01 34 65 29 09
http://voxel.jouy.inra.fr
More information about the Insight-developers
mailing list