[ITK] ITK v4 & MedPy 0.2.2

Didier Cassereau didier.cassereau at upmc.fr
Tue Jan 13 09:25:48 EST 2015


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



More information about the Community mailing list