[Insight-developers] still some VectorImage problems

Gaetan Lehmann gaetan.lehmann at jouy.inra.fr
Tue Mar 28 13:42:48 EST 2006


On Tuesday 28 March 2006 18:04, Karthik Krishnan wrote:
> 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 ?

Yes, it works

Thanks :-)

Gaetan

>
> 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/itk
> >VectorImageUC2.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/itk
> >VectorImageUC2.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__VectorImageTu
> >nsigned_char_2_t_t GetNeighborhoodAccessor() {
> >
> > ^
> > /home/glehmann/src/contrib-itk/WrapITK/build-java/Java/InsightToolkit/itk
> >VectorImageUC2.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__VariableLengthVe
> >ctorTunsigned_char_t_t
> >
> >   public SWIGTYPE_p_itk__DefaultVectorPixelAccessorTunsigned_char_t
> > GetPixelAccessor() {
> >                                                                     ^
> > /home/glehmann/src/contrib-itk/WrapITK/build-java/Java/InsightToolkit/itk
> >VectorImageUC2.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_unsigne
> >d_char_t
> >
> > required:
> > InsightToolkit.SWIGTYPE_p_itk__ImportImageContainerTunsigned_long_itk__Va
> >riableLengthVectorTunsigned_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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
Url : http://www.itk.org/mailman/private/insight-developers/attachments/20060328/f2396d5f/attachment.pgp


More information about the Insight-developers mailing list