[ITK] [ITK-users] Using ITK with python wrapping

CHENET Aude (External) Aude.CHENET-ext at galderma.com
Wed May 4 10:15:00 EDT 2016


Hello

I've built ITK 4.9 with Python wrapping. Compilation is OK.
I tried to use ITK in my python code :

import itk
pixelType = itk.UC
imageType = itk.Image[pixelType,2]
readerType = itk.ImageFileReader[imageType]
reader = readerType.New()
reader.SetFileName('test.tif')

There is the following error :

Traceback (most recent call last):
  File "C:\test.py", line 12, in <module>
    imageType = itk.Image[pixelType,2]
  File "C:\Python27\Lib\site-packages\itkLazy.py", line 42, in __getattribute__
    itkBase.LoadModule(module, namespace)
  File "C:\Python27\Lib\site-packages\itkBase.py", line 118, in LoadModule
    LoadModule(dep, namespace)
  File "C:\Python27\Lib\site-packages\itkBase.py", line 118, in LoadModule
    LoadModule(dep, namespace)
  File "C:\Python27\Lib\site-packages\itkBase.py", line 118, in LoadModule
    LoadModule(dep, namespace)
  File "C:\Python27\Lib\site-packages\itkBase.py", line 118, in LoadModule
    LoadModule(dep, namespace)
  File "C:\Python27\Lib\site-packages\itkBase.py", line 128, in LoadModule
    module = loader.load(swigModuleName)
  File "C:\Python27\Lib\site-packages\itkBase.py", line 245, in load
    return imp.load_module(name, fp, pathname, description)
  File "C:\Python27\Lib\site-packages\itk\ITKCommonPython.py", line 32, in <module>
    _ITKCommonPython = swig_import_helper()
  File "C:\Python27\Lib\site-packages\itk\ITKCommonPython.py", line 28, in swig_import_helper
    _mod = imp.load_module('_ITKCommonPython', fp, pathname, description)
ImportError: DLL load failed: Le module spécifié est introuvable.


Can someone help me to use itk in my code?

Aude
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20160504/918202d5/attachment-0001.html>
-------------- next part --------------
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-users


More information about the Community mailing list