[Insight-developers] Re: [Wrapping] Problems while wrapping itkSpatialObject

Gaetan Lehmann gaetan.lehmann at jouy.inra.fr
Wed Aug 10 06:48:57 EDT 2005


Hi Benoit,

I tried to wrapped SpatialObject and it fails with a message similar to  
yours (on a linux box with gcc 3.4)
cableswig seems to be confused by the double declaration of GetTreeNode in  
itkSpatialObject.h :

   typename TreeNodeType::Pointer GetTreeNode() {return m_TreeNode;}
   typename TreeNodeType::ConstPointer GetTreeNode() const {return  
m_TreeNode;}

I disable the const one, and it works... until the next failure :-( :

/home/glehmann/itk/itk-mima2/Insight/Code/SpatialObject/itkSpatialObject.h:288:  
error: cannot convert `const double*' to `const long int*' in return
/home/glehmann/itk/itk-mima2/Insight/Code/SpatialObject/itkSpatialObject.txx:  
In member function `void itk::SpatialObject<TDimension>::SetProperty(const  
itk::SpatialObjectProperty<float>*) [with unsigned int TDimension = 3u]':

But this one doesn't seem to be related to wrapper...

Gaetan


On Tue, 09 Aug 2005 15:50:02 +0200, Benoit Regrain  
<benoit.regrain at creatis.insa-lyon.fr> wrote:
> Hi,
>
> I would wrap the itkSpatialObject class. It's not
> actually made in the current ITK wrapping.
>
> I have found a first bug while wrapping this class :
> There is no copy constructor or opertor = in the private part
> of the class. So, to correctly wrap them, it's needed.
>
> Secondly, I have the following error while the wrapping. I
> don't find any solution. It's compiled on MSVC .Net 2003.
> wrap_itkSpatialObjectBasePython.cxx(6171) : error C2679: binary '=' : no  
> operator found which takes a right-hand operand of type  
> 'itk::SpatialObjectTreeNode<TDimension>::Pointer' (or there is no  
> acceptable conversion)
>
> with
>
> [
>
> TDimension=3
>
> ]
>
> wrap_itkSpatialObjectBasePython.cxx(10601) : error C2679: binary '=' :  
> no operator found which takes a right-hand operand of type  
> 'itk::SpatialObjectTreeNode<TDimension>::Pointer' (or there is no  
> acceptable conversion)
>
> with
>
> [
>
> TDimension=2
>
> ]
>
> The wrap_itkSpatialObject.cxx file is attached to the mail.
> Cheers.
>
> -----------------------------------------------------------------
> Benoit Regrain
> Ingénieur d'études CNRS (Creatis)
> email : regrain at creatis.insa-lyon.fr
> phone : (+33) (0) 4.72.43.82.58
> fax : (+33) (0) 4.72.43.85.26
> address :
>    CREATIS - CNRS UMR5515
>    INSA - Bâtiment Blaise Pascal
>    7, avenue Jean Capelle
>    F - 69621 Villeurbanne Cedex
> -----------------------------------------------------------------



-- 
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


More information about the Insight-developers mailing list