[ITK] ITK v4 & MedPy 0.2.2

Matt McCormick matt.mccormick at kitware.com
Tue Jan 13 10:06:30 EST 2015


Hi Didier,

Does this example work with your ITK Python installation?

  http://itk.org/ITKExamples/src/Filtering/Smoothing/ApplyMedianFilter/Documentation.html

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

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


More information about the Community mailing list