[Insight-developers] still some VectorImage problems

Gaetan Lehmann gaetan.lehmann at jouy.inra.fr
Tue Mar 28 08:01:59 EST 2006


Hi Karthik,

I thought everything was working with VectorImage, but I was wrong.
While trying to build java wrappers, I get the following error:

  Scanning dependencies of target ITKSpatialObjectJava
Linking CXX shared module ../bin/libITKSpatialObjectJava.so
Scanning dependencies of target ITKAlgorithmsJava
Linking CXX shared module ../bin/libITKAlgorithmsJava.so
Generating InsightToolkit/VXLNumericsJava.class
Generating InsightToolkit/ITKCommonAJava.class
/home/glehmann/src/contrib-itk/WrapITK/build-java/Java/InsightToolkit/itkVectorImageUC2.java:49:  
GetBufferPointer() in InsightToolkit.itkVectorImageUC2 cannot override  
GetBufferPointer() in InsightToolkit.itkVectorImageUC2_Superclass;  
attempting to use incompatible return type
found   : InsightToolkit.SWIGTYPE_p_unsigned_char
required: InsightToolkit.itkVariableLengthVectorUC
   public SWIGTYPE_p_unsigned_char GetBufferPointer() {
                                   ^
/home/glehmann/src/contrib-itk/WrapITK/build-java/Java/InsightToolkit/itkVectorImageUC2.java:58:  
GetNeighborhoodAccessor() in InsightToolkit.itkVectorImageUC2 cannot  
override GetNeighborhoodAccessor() in  
InsightToolkit.itkVectorImageUC2_Superclass; attempting to use  
incompatible return type
found   :  
InsightToolkit.SWIGTYPE_p_itk__VectorImageNeighborhoodAccessorFunctorTitk__VectorImageTunsigned_char_2_t_t
required:  
InsightToolkit.SWIGTYPE_p_itk__NeighborhoodAccessorFunctorTitk__ImageTitk__VariableLengthVectorTunsigned_char_t_2_t_t
   public  
SWIGTYPE_p_itk__VectorImageNeighborhoodAccessorFunctorTitk__VectorImageTunsigned_char_2_t_t  
GetNeighborhoodAccessor() {
                                                                                                      ^
/home/glehmann/src/contrib-itk/WrapITK/build-java/Java/InsightToolkit/itkVectorImageUC2.java:70:  
GetPixelAccessor() in InsightToolkit.itkVectorImageUC2 cannot override  
GetPixelAccessor() in InsightToolkit.itkVectorImageUC2_Superclass;  
attempting to use incompatible return type
found   :  
InsightToolkit.SWIGTYPE_p_itk__DefaultVectorPixelAccessorTunsigned_char_t
required:  
InsightToolkit.SWIGTYPE_p_itk__DefaultPixelAccessorTitk__VariableLengthVectorTunsigned_char_t_t
   public SWIGTYPE_p_itk__DefaultVectorPixelAccessorTunsigned_char_t  
GetPixelAccessor() {
                                                                     ^
/home/glehmann/src/contrib-itk/WrapITK/build-java/Java/InsightToolkit/itkVectorImageUC2.java:74:  
GetPixelContainer() in InsightToolkit.itkVectorImageUC2 cannot override  
GetPixelContainer() in InsightToolkit.itkVectorImageUC2_Superclass;  
attempting to use incompatible return type
found   :  
InsightToolkit.SWIGTYPE_p_itk__ImportImageContainerTunsigned_long_unsigned_char_t
required:  
InsightToolkit.SWIGTYPE_p_itk__ImportImageContainerTunsigned_long_itk__VariableLengthVectorTunsigned_char_t_t
   public  
SWIGTYPE_p_itk__ImportImageContainerTunsigned_long_unsigned_char_t  
GetPixelContainer() {
                                                                             ^
4 errors


It seems that with java, the return type of an overloded method must be  
exactly the same than the one of the superclass, which is not the case  
here.
Do you know how to fix that problem ?

Gaetan

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