[ITK] ITK v4 & MedPy 0.2.2

Didier Cassereau didier.cassereau at upmc.fr
Tue Jan 13 10:37:42 EST 2015


On 13/01/2015 16:06, Matt McCormick wrote:
> Hi Didier,
>
> Does this example work with your ITK Python installation?
>
>   http://itk.org/ITKExamples/src/Filtering/Smoothing/ApplyMedianFilter/Documentation.html

No problem with this test with Python


> Did you install WrapITK?  Did you add add WrapITK.pth to your sys.path?

Do you mean the WrapITK that can be found in the development files of ITK?
My compilation options of ITK are:
INSTALL_WRAP_ITK_COMPATIBILITY: ON
ITKV3_COMPATIBILITY: ON
ITK_WRAP_PYTHON: ON
ITK_WRAP_SWIGINTERFACE: ON
ITK_WRAP_*: (*=double, float, ...) some are ON and some are OFF,
unchanged from the default

And no I did not change sys.path as I thought WrapITK would have been
part of ITK itself.


Do you see something wrong in that?

Best regards
Didier



>
> Thanks,
> Matt
>
> On Tue, Jan 13, 2015 at 9:25 AM, Didier Cassereau
> <didier.cassereau at upmc.fr> wrote:
>> Dear all,
>>
>> I am new to ITK & MedPy and I encounter a difficulty for which I cannot
>> find any solutioN. I tried several workarounds and did not succeed.
>> My configuration is
>> - Linux Fedora FC 20
>> - ITK 4.7.0 compiled locally
>> - Python 2.7.5 and MedPy 0.2.2
>>
>> From here I just try to load one test image found in the ITK archive
>> with the following:
>>
>>>>> import vtk
>>>>> from medpy.io import load
>>>>> image_data, image_header = load('/tmp/test.mha')
>> I obtain the following error message:
>>
>> Traceback (most recent call last):
>>   File "<stdin>", line 1, in <module>
>>   File "build/bdist.linux-x86_64/egg/medpy/io/load.py", line 201, in load
>> medpy.core.exceptions.ImageLoadingError: Failes to load image
>> /tmp/test.mha as Itk/Vtk MetaImage (.mhd, .mha/.raw). Reason signaled by
>> third-party module: 'module' object has no attribute 'swig'
>>
>> In my generation options I find:
>> - ITK_USE_SYSTEM_SWIG = OFF
>> - SWIG_DIR = folder to swig/3.0.2 in the bin folder of ITK (exists and
>> not empty)
>> - SWIG_EXECUTABLE = path to swig executable file (exists)
>>
>> If anybody has some idea or suggestion, any help would be greatly
>> appreciated.
>>
>> Best regards to all
>>
>> D. Cassereau / Je suis Charlie
>>
>> _______________________________________________
>> Community mailing list
>> Community at itk.org
>> http://public.kitware.com/mailman/listinfo/community


-- 
----------------------------------------------------
Didier CASSEREAU
Laboratoire d'Imagerie Biomédicale
Site des Cordeliers
15 Rue de l'Ecole de médecine 75006 Paris, France
Tél : (+33.1) 44.41.49.71



More information about the Community mailing list