[Insight-users] need help using itk with python

Gaëtan Lehmann gaetan.lehmann at jouy.inra.fr
Thu Mar 15 17:38:29 EST 2007


That's bad :-/

Do you have built all ITK with the Release configuration ?
Can you give the result of

   ctest -C Release -R PythonTestDirectory -V

Thanks,

Gaetan


Le Thu, 15 Mar 2007 23:20:19 +0100, Matei Stroila  
<matei.stroila at gmail.com> a écrit:

> On 3/15/07, Gaëtan Lehmann <gaetan.lehmann at jouy.inra.fr> wrote:
>>
>> can you run the command
>>
>>    ctest -C Release -R Python
>>
>> and send the result ?
>
> Yes, here it is:
>
> D:\build\InsightToolkit-3.2.0-bin>ctest -C Release -R Python
> Start processing tests
> Test project D:/build/InsightToolkit-3.2.0-bin
>   1/240 Testing PythonTestDirectory           ***Failed
>   2/240 Testing PythonTestObject              ***Failed
>   3/240 Testing PythonFilterCoverage             Passed
>   4/240 Testing PythonFindEmptyClasses        ***Failed
>   5/240 Testing PythonTypemaps                ***Failed
>   6/240 Testing PythonTemplate                ***Failed
>   7/240 Testing PythonExtras                  ***Failed
>   8/240 Testing PythonModuleToModule          ***Failed
>   9/240 Testing PythonBinaryDilateImageFilter ***Failed
>  10/240 Testing PythonBinaryErodeImageFilter  ***Failed
>  11/240 Testing PythonBinaryThresholdImageFilt***Failed
>  12/240 Testing PythonCastImageFilter         ***Failed
>  13/240 Testing PythonGrayscaleDilateImageFilt***Failed
>  14/240 Testing PythonBoxGrayscaleDilateImageF***Failed
>  15/240 Testing PythonGrayscaleErodeImageFilte***Failed
>  16/240 Testing PythonMeanImageFilter         ***Failed
>  17/240 Testing PythonMedianImageFilter       ***Failed
>  18/240 Testing PythonSigmoidImageFilter      ***Failed
>  19/240 Testing PythonThresholdImageFilter    ***Failed
>  20/240 Testing PythonResampleImageFilterTest1***Failed
>  21/240 Testing PythonResampleImageFilterTest2***Failed
>  22/240 Testing PythonResampleImageFilterTest3***Failed
>  23/240 Testing PythonResampleImageFilterTest4***Failed
>  24/240 Testing PythonCurvatureAnisotropicDiff***Failed
>  25/240 Testing PythonCurvatureFlowImageFilter***Failed
>  26/240 Testing PythonSmoothingRecursiveGaussi***Failed
>  27/240 Testing PythonLaplacianImageFilter    ***Failed
>  28/240 Testing PythonFFTImageFilter          ***Failed
>  29/240 Testing PythonGradientMagnitudeRecursi***Failed
>  30/240 Testing PythonGradientAnisotropicDiffu***Failed
>  31/240 Testing PythonGeodesicActiveContourLef***Failed
>  32/240 Testing PythonFastMarchingLeftVentricl***Failed
>  33/240 Testing PythonFastMarchingRightVentric***Failed
>  34/240 Testing PythonFastMarchingWhiteMatterT***Failed
>  35/240 Testing PythonFastMarchingGrayMatterTe***Failed
>  36/240 Testing PythonThresholdSegmentationLev***Failed
>  37/240 Testing PythonThresholdSegmentationLev***Failed
>  38/240 Testing PythonThresholdSegmentationLev***Failed
>  39/240 Testing PythonCannyEdgeDetectionImageF***Failed
>  40/240 Testing PythonWatershedSegmentation1  ***Failed
>  41/240 Testing PythonSpatialObject           ***Failed
>  42/240 Testing PythonAntiAliasBinaryImageFilt***Failed
>  43/240 Testing PythonSimplePipelineUC2       ***Failed
>  44/240 Testing PythonSimplePipelineUS2       ***Failed
>  45/240 Testing PythonSimplePipelineF2        ***Failed
>  46/240 Testing PythonSimplePipelineUC3       ***Failed
>  47/240 Testing PythonSimplePipelineUS3       ***Failed
>  48/240 Testing PythonSimplePipelineF3        ***Failed
>
> 2% tests passed, 47 tests failed out of 48
>
> The following tests FAILED:
>           1 - PythonTestDirectory (Failed)
>           2 - PythonTestObject (Failed)
>           4 - PythonFindEmptyClasses (Failed)
>           5 - PythonTypemaps (Failed)
>           6 - PythonTemplate (Failed)
>           7 - PythonExtras (Failed)
>           8 - PythonModuleToModule (Failed)
>           9 - PythonBinaryDilateImageFilter (Failed)
>          10 - PythonBinaryErodeImageFilter (Failed)
>          11 - PythonBinaryThresholdImageFilter (Failed)
>          12 - PythonCastImageFilter (Failed)
>          13 - PythonGrayscaleDilateImageFilter (Failed)
>          14 - PythonBoxGrayscaleDilateImageFilter (Failed)
>          15 - PythonGrayscaleErodeImageFilter (Failed)
>          16 - PythonMeanImageFilter (Failed)
>          17 - PythonMedianImageFilter (Failed)
>          18 - PythonSigmoidImageFilter (Failed)
>          19 - PythonThresholdImageFilter (Failed)
>          20 - PythonResampleImageFilterTest1 (Failed)
>          21 - PythonResampleImageFilterTest2 (Failed)
>          22 - PythonResampleImageFilterTest3 (Failed)
>          23 - PythonResampleImageFilterTest4 (Failed)
>          24 - PythonCurvatureAnisotropicDiffusionImageFilter (Failed)
>          25 - PythonCurvatureFlowImageFilter (Failed)
>          26 - PythonSmoothingRecursiveGaussianImageFilter (Failed)
>          27 - PythonLaplacianImageFilter (Failed)
>          28 - PythonFFTImageFilter (Failed)
>          29 - PythonGradientMagnitudeRecursiveGaussianImageFilterTest  
> (Failed)
>          30 - PythonGradientAnisotropicDiffusionImageFilterTest (Failed)
>          31 - PythonGeodesicActiveContourLeftVentricleTest (Failed)
>          32 - PythonFastMarchingLeftVentricleTest (Failed)
>          33 - PythonFastMarchingRightVentricleTest (Failed)
>          34 - PythonFastMarchingWhiteMatterTest (Failed)
>          35 - PythonFastMarchingGrayMatterTest (Failed)
>          36 - PythonThresholdSegmentationLevelSetVentricleTest (Failed)
>          37 - PythonThresholdSegmentationLevelSetWhiteMatterTest (Failed)
>          38 - PythonThresholdSegmentationLevelSetGrayMatterTest (Failed)
>          39 - PythonCannyEdgeDetectionImageFilterTest (Failed)
>          40 - PythonWatershedSegmentation1 (Failed)
>          41 - PythonSpatialObject (Failed)
>          42 - PythonAntiAliasBinaryImageFilterTest (Failed)
>          43 - PythonSimplePipelineUC2 (Failed)
>          44 - PythonSimplePipelineUS2 (Failed)
>          45 - PythonSimplePipelineF2 (Failed)
>          46 - PythonSimplePipelineUC3 (Failed)
>          47 - PythonSimplePipelineUS3 (Failed)
>          48 - PythonSimplePipelineF3 (Failed)
> Errors while running CTest
>
> D:\build\InsightToolkit-3.2.0-bin>
>
> Thanks,
>
> Matei
>
>
>
>
>>
>> Thanks,
>>
>> Gaetan
>>
>>
>> Le Thu, 15 Mar 2007 21:04:04 +0100, Matei Stroila
>> <matei.stroila at gmail.com> a écrit:
>>
>> > I did a clean build in Release mode (InsightToolkit-3.2.0) with
>> > WrapITK ON, VS 2005.
>> > Using WrapITK, it gives the same error:
>> >
>> > D:\Documents and Settings\mstroila>python
>> > Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit
>> > (Intel)] on win
>> > 32
>> > Type "help", "copyright", "credits" or "license" for more information.
>> >>>> import itk
>> >>>> reader = itk.ImageFileReader[itk.UC,2].New()
>> > Traceback (most recent call last):
>> >   File "<stdin>", line 1, in <module>
>> >   File
>> >  
>> "D:\build\InsightToolkit-3.2.0-bin\Wrapping\WrapITK\Python\Release\itkLaz
>> > y.py", line 18, in __getattribute__
>> >     itkBase.LoadModule(module, namespace)
>> >   File
>> >  
>> "D:\build\InsightToolkit-3.2.0-bin\Wrapping\WrapITK\Python\Release\itkBas
>> > e.py", line 77, in LoadModule
>> >     LoadModule(dep, namespace)
>> >   File
>> >  
>> "D:\build\InsightToolkit-3.2.0-bin\Wrapping\WrapITK\Python\Release\itkBas
>> > e.py", line 77, in LoadModule
>> >     LoadModule(dep, namespace)
>> >   File
>> >  
>> "D:\build\InsightToolkit-3.2.0-bin\Wrapping\WrapITK\Python\Release\itkBas
>> > e.py", line 85, in LoadModule
>> >     if not swigModuleName in sys.modules: module =
>> > loader.load(swigModuleName)
>> >   File
>> >  
>> "D:\build\InsightToolkit-3.2.0-bin\Wrapping\WrapITK\Python\Release\itkBas
>> > e.py", line 192, in load
>> >     return imp.load_module(name, fp, pathname, description)
>> >   File
>> > "D:\build\InsightToolkit-3.2.0-bin\bin\Release\VXLNumericsPython.py",  
>> lin
>> > e 5, in <module>
>> >     import _VXLNumericsPython
>> > ImportError: No module named _VXLNumericsPython
>> >
>> > Thanks for help,
>> >
>> > Matei
>> >
>> > On 3/15/07, Matei Stroila <matei.stroila at gmail.com> wrote:
>> >> On 3/15/07, Gaetan Lehmann <gaetan.lehmann at jouy.inra.fr> wrote:
>> >> > Can you verify that your PYTHONPATH contain the path to the dll  
>> files
>> >> ?
>> >>
>> >> I did add it with no success. Same error message.
>> >>
>> >> I will look at WrapITK.
>> >>
>> >> Thanks,
>> >>
>> >> Matei
>> >>
>> >> >
>> >> > Thanks,
>> >> >
>> >> > Gaetan
>> >> >
>> >> > PS: It will not fix your problem, but if your intersted in using  
>> itk
>> >> with
>> >> > python, you should look at WrapITK, which is also included in ITK
>> >> 3.2.0
>> >> >
>> >> >
>> >> >
>> >> > On Wed, 14 Mar 2007 20:43:48 +0100, Matei Stroila
>> >> > <matei.stroila at gmail.com> wrote:
>> >> >
>> >> > > I built the new ITK release (3.2.0) with Visual Studio 2005 and  
>> no
>> >> > > errors.
>> >> > > I set the PYTHONPATH to the CSwig dir:
>> >> > > D:\build\InsightToolkit-3.2.0-bin\Wrapping\CSwig\Python\Release
>> >> > > and added to the PATH the build dir:
>> >> > > D:\build\InsightToolkit-3.2.0-bin\bin\release
>> >> > >
>> >> > > When I try to use Python I get the following:
>> >> > >
>> >> > >  Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit
>> >> > > (Intel)] on win
>> >> > > 32
>> >> > > Type "help", "copyright", "credits" or "license" for more
>> >> information.
>> >> > >>>> from InsightToolkit import *
>> >> > > Traceback (most recent call last):
>> >> > >   File "<stdin>", line 1, in <module>
>> >> > >   File
>> >> > >
>> >>  
>> "D:/build/InsightToolkit-3.2.0-bin/Wrapping/CSwig/Python\Release\InsightT
>> >> > > oolkit.py", line 1, in <module>
>> >> > >     from itkalgorithms import *
>> >> > >   File
>> >> > >
>> >>  
>> "D:/build/InsightToolkit-3.2.0-bin/Wrapping/CSwig/Python\Release\itkalgor
>> >> > > ithms.py", line 1, in <module>
>> >> > >     from itknumerics import *
>> >> > >   File
>> >> > >
>> >>  
>> "D:/build/InsightToolkit-3.2.0-bin/Wrapping/CSwig/Python\Release\itknumer
>> >> > > ics.py", line 1, in <module>
>> >> > >     from itkcommon import *
>> >> > >   File
>> >> > >
>> >>  
>> "D:/build/InsightToolkit-3.2.0-bin/Wrapping/CSwig/Python\Release\itkcommo
>> >> > > n.py", line 1, in <module>
>> >> > >     from vxlnumerics import *
>> >> > >   File
>> >> > >
>> >>  
>> "D:/build/InsightToolkit-3.2.0-bin/Wrapping/CSwig/Python\Release\vxlnumer
>> >> > > ics.py", line 4, in <module>
>> >> > >     from VXLNumericsPython import *
>> >> > >   File "VXLNumericsPython.py", line 5, in <module>
>> >> > >     import _VXLNumericsPython
>> >> > > ImportError: No module named _VXLNumericsPython
>> >> > >
>> >> > > I checked the build dir and _VXLNumericsPython.dll is there. I  
>> don't
>> >> > > understand why is not finding that module.
>> >> > >
>> >> > > Thanks a lot for help,
>> >> > >
>> >> > > Matei
>> >> > > _______________________________________________
>> >> > > Insight-users mailing list
>> >> > > Insight-users at itk.org
>> >> > > http://www.itk.org/mailman/listinfo/insight-users
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > 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
>> >> >
>> >>
>>
>>
>>
>> --
>> 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
>>



-- 
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-users mailing list