[Insight-users] WrapITK Python and SWIG
Gaetan Lehmann
gaetan.lehmann at jouy.inra.fr
Thu Mar 1 04:18:57 EST 2007
On Wed, 28 Feb 2007 18:29:22 +0100, Erik Anderson <eranders at sci.utah.edu>
wrote:
> Gaetan,
> Sorry it took so long to check this out, but when I changed my
> PYTHONPATH from my BUILDPATH (as you describe in the first solution) to
> the one for the installation, it worked perfectly.
Great !
Please let us know if you have some new problems,
Gaetan
>
> Thanks again,
> Erik
>
> Gaëtan Lehmann wrote:
>>
>> Hi,
>>
>> Everything seems to be ok with your build. I think you have a problem
>> with your python path. You have 2 options:
>> - continue to use wrapitk in th build tree. If you do so, you must put
>> 2 paths in you PYTHONPATH:
>> - BUILDPATH/bin
>> - BUILDPATH/Wrapping/WrapITK/Python
>> - install ITK and WrapITK, and simply set your PYTHONPATH to
>> /usr/local/lib/InsightToolkit/WrapITK/Python (adapt to your prefix)
>>
>> please let me know if udapting the PYTHONPATH make things work :-)
>>
>> Gaetan
>>
>>
>>
>> Le Fri, 23 Feb 2007 22:33:35 +0100, Erik Anderson
>> <eranders at sci.utah.edu> a écrit:
>>
>>> Gaetan,
>>> Thanks for your prompt reply. Here are the results of ctest:
>>>
>>> 1/ 48 Testing PythonTestDirectory Passed
>>> 2/ 48 Testing PythonTestObject Passed
>>> 3/ 48 Testing PythonFilterCoverage Passed
>>> 4/ 48 Testing PythonFindEmptyClasses Passed
>>> 5/ 48 Testing PythonTypemaps Passed
>>> 6/ 48 Testing PythonTemplate Passed
>>> 7/ 48 Testing PythonExtras Passed
>>> 8/ 48 Testing PythonModuleToModule Passed
>>> 9/ 48 Testing PythonBinaryDilateImageFilter Passed
>>> 10/ 48 Testing PythonBinaryErodeImageFilter Passed
>>> 11/ 48 Testing PythonBinaryThresholdImageFilt Passed
>>> 12/ 48 Testing PythonCastImageFilter Passed
>>> 13/ 48 Testing PythonGrayscaleDilateImageFilt Passed
>>> 14/ 48 Testing PythonBoxGrayscaleDilateImageF Passed
>>> 15/ 48 Testing PythonGrayscaleErodeImageFilte Passed
>>> 16/ 48 Testing PythonMeanImageFilter Passed
>>> 17/ 48 Testing PythonMedianImageFilter Passed
>>> 18/ 48 Testing PythonSigmoidImageFilter Passed
>>> 19/ 48 Testing PythonThresholdImageFilter Passed
>>> 20/ 48 Testing PythonResampleImageFilterTest1 Passed
>>> 21/ 48 Testing PythonResampleImageFilterTest2 Passed
>>> 22/ 48 Testing PythonResampleImageFilterTest3 Passed
>>> 23/ 48 Testing PythonResampleImageFilterTest4 Passed
>>> 24/ 48 Testing PythonCurvatureAnisotropicDiff Passed
>>> 25/ 48 Testing PythonCurvatureFlowImageFilter Passed
>>> 26/ 48 Testing PythonSmoothingRecursiveGaussi Passed
>>> 27/ 48 Testing PythonLaplacianImageFilter Passed
>>> 28/ 48 Testing PythonFFTImageFilter Passed
>>> 29/ 48 Testing PythonGradientMagnitudeRecursi Passed
>>> 30/ 48 Testing PythonGradientAnisotropicDiffu Passed
>>> 31/ 48 Testing PythonGeodesicActiveContourLef Passed
>>> 32/ 48 Testing PythonFastMarchingLeftVentricl Passed
>>> 33/ 48 Testing PythonFastMarchingRightVentric Passed
>>> 34/ 48 Testing PythonFastMarchingWhiteMatterT Passed
>>> 35/ 48 Testing PythonFastMarchingGrayMatterTe Passed
>>> 36/ 48 Testing PythonThresholdSegmentationLev Passed
>>> 37/ 48 Testing PythonThresholdSegmentationLev Passed
>>> 38/ 48 Testing PythonThresholdSegmentationLev Passed
>>> 39/ 48 Testing PythonCannyEdgeDetectionImageF Passed
>>> 40/ 48 Testing PythonWatershedSegmentation1 Passed
>>> 41/ 48 Testing PythonSpatialObject Passed
>>> 42/ 48 Testing PythonAntiAliasBinaryImageFilt Passed
>>> 43/ 48 Testing PythonSimplePipelineUS2 Passed
>>> 44/ 48 Testing PythonSimplePipelineF2 Passed
>>> 45/ 48 Testing PythonSimplePipelineUC2 Passed
>>> 46/ 48 Testing PythonSimplePipelineUS3 Passed
>>> 47/ 48 Testing PythonSimplePipelineF3 Passed
>>> 48/ 48 Testing PythonSimplePipelineUC3 Passed
>>>
>>> 100% tests passed, 0 tests failed out of 48
>>>
>>>
>>> To be a little more thorough, I have built everything from the ITK cvs
>>> repository and am running on an x86_64 Ubuntu distribution.
>>>
>>> Thanks again,
>>> Erik
>>>
>>> Gaetan Lehmann wrote:
>>>>
>>>> Hi,
>>>>
>>>> Can you tell us is the command
>>>>
>>>> ctest -R Python
>>>>
>>>> give some errors ?
>>>>
>>>> thanks,
>>>>
>>>> Gaetan
>>>>
>>>> On Fri, 23 Feb 2007 17:33:51 +0100, Erik Anderson
>>>> <eranders at sci.utah.edu> wrote:
>>>>
>>>>> I have recently gotten WrapITK built and installed, but I am running
>>>>> into some strange behavior.
>>>>>
>>>>> After importing itk, I issue the following:
>>>>>
>>>>> >>> ptype = itk.UC
>>>>> >>> dim = 2
>>>>> >>> itype = itk.Image[ptype,dim]
>>>>>
>>>>> And the following error is raised:
>>>>>
>>>>> Traceback (most recent call last):
>>>>> File "<stdin>", line 1, in ?
>>>>> File "/home/eranders/env/itk/Wrapping/WrapITK/Python/itkLazy.py",
>>>>> line 18, in __getattribute__
>>>>> itkBase.LoadModule(module, namespace)
>>>>> File "/home/eranders/env/itk/Wrapping/WrapITK/Python/itkBase.py",
>>>>> line 24, in LoadModule
>>>>> swig.__dict__.update(this_module.swig.__dict__)
>>>>> AttributeError: 'module' object has no attribute 'swig'
>>>>>
>>>>> Just to be sure, I re-installed swig and cable swig but the error
>>>>> persists. Has anyone run into this or might be able to shed some
>>>>> light on the error?
>>>>>
>>>>> Thanks,
>>>>> Erik Anderson
>>>>> _______________________________________________
>>>>> 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