[Insight-developers] still some VectorImage problems

Karthik Krishnan Karthik.Krishnan at kitware.com
Tue Mar 28 11:04:25 EST 2006


Gaetan,

Thanks for reporting this. I just committed a fix to CVS to 
itkVectorImage.h.
Can you let me know if the fix works for the Java wrappers  as well ?

Thanks
-karthik

Gaetan Lehmann wrote:

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


More information about the Insight-developers mailing list