[ITK-users] Errors on warping ITK with JAVA

Matt McCormick matt.mccormick at kitware.com
Wed Sep 23 21:48:53 EDT 2015


Hi Zhuangming,

There have been many improvements in the wrapping infrastructure, but
ITK's Java wrapping is not yet well tested.

For problem 1), you may need to dig into the generated code to
understand what is happening.

Regarding problems 2) and 3), some very long filepaths are being
generated, which Windows has difficulty handling and that can result
in confusing errors. It may be worthwhile attempting a build on Linux
or Mac to isolate the problem.  Limit the path length of your build
folder so it is as short as possible. Ultimately, a strategy to limit
the path lengths may be required.

Matt

On Wed, Sep 23, 2015 at 8:50 PM, 沈庄明 <zhuangming.shen at sphic.org.cn> wrote:
> Hi all,
>
>
> I would like to warp ITK with Java. So I complied CastXML and downloaded
> SWIGwin first. When I used them to compile ITK source code, I successfully
> compiled most of the source code and got some .jar such as
> org.itk.itkcommon.jar, but I still met some errors in Visual Studio 2013.
>
>
> 1. In
> ${ITK_Build}\Wrapping\Modules\ITKImageFunction\itkInterpolateImageFunctionJava.cpp(884):
> error C2440: '=' : cannot convert from 'itkInterpolateImageFunctionIVF22D *'
> to 'itkImageFunctionIVF22DD *'
>
>            Types pointed to are unrelated; conversion requires
> reinterpret_cast, C-style cast or function-style cast
>
>     In
> ${ITK_Build}\Wrapping\Modules\ITKImageFunction\itkInterpolateImageFunctionJava.cpp(892):
> error C2440: '=' : cannot convert from 'itkInterpolateImageFunctionIVF33D *'
> to 'itkImageFunctionIVF33DD *'
>
>             Types pointed to are unrelated; conversion requires
> reinterpret_cast, C-style cast or function-style cast
>
>
>
> 2. The aforementioned errors may be cause the following errors.
>
>     Unable to open file
> ${ITK_Build}\Wrapping\Generators\Java\Proxies\src\org\itk\itkmesh\SWIGTYPE_p_itk_MapContainerT_unsigned_long_itk_CellInterfaceT_double_itk_CellTraitsInfoT_2_double_float_unsigned_long_unsigned_long_unsigned_long_itk__PointT_double_2_t_itk__MapContainerT_unsigned_long_itk__PointT_double_2_t_t_std__setT_unsigned_long_std__lessT_unsigned_long_t_t_t_t_p_t.java:
> No such file or directory
>
>      C:\Program Files
> (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(170,5):
> error MSB6006: "cmd.exe" exited with code 1.
>
>
> 3. And more errors shows
>
>
> ${ITK_Build}\Wrapping\Generators\Java\Proxies\src\org\itk\itkquadedgemesh\itkBoundingBoxUL2FMCULQEMPF2.java:11:
> error: package org.itk.itkmesh does not exist
>
>     import org.itk.itkmesh.*;;import org.itk.itkcommon.*;;import
> org.itk.itkimagefilterbase.*;;import org.itk.itkstatistics.*;;import
> org.itk.itktransform.*;;import org.itk.itkjavabase.*;
>
>
>
>    So, how can I fix those errors? Thanks!
>
>
>    p.s. I use ITK 4.8.0, SWIGwin 3.0.7, and latest CastXML.
>
>
>
>
>    Regards,
>
>
> Zhuangming Shen
>
>
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/insight-users
>


More information about the Insight-users mailing list