[Insight-users] WrapITK Problem

Gheorghe Postelnicu gheorghe.postelnicu at gmail.com
Wed Oct 25 09:54:21 EDT 2006


Hi,

I have 2 question regarding the Python WrapITK CVS distribution:

1. when I use the syntax

from itk import * in a python script, I get the message:

Python 2.3.4 (#1, Mar 10 2006, 06:12:09)
[GCC 3.4.5 20051201 (Red Hat 3.4.5-2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from itk import *
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/local/lib/InsightToolkit/WrapITK/Python/itkLazy.py", line 18,
in __getattribute__
    itkBase.LoadModule(module, namespace)
  File "/local/lib/InsightToolkit/WrapITK/Python/itkBase.py", line 85,
in LoadModule
    if not swigModuleName in sys.modules: module = loader.load(swigModuleName)
  File "/local/lib/InsightToolkit/WrapITK/Python/itkBase.py", line 192, in load
    return imp.load_module(name, fp, pathname, description)
  File "/local/lib/InsightToolkit/WrapITK/lib/IntensityFiltersPython.py",
line 1, in ?
    tionImageFilterINS_5ImageItLj2EEES2_E13CreateAnotherEv
NameError: name
'tionImageFilterINS_5ImageItLj2EEES2_E13CreateAnotherEv' is not
defined

2. It seems the Python examples in the ITK directories follow some
slightly different syntax, namely they use import InsightToolkit.
However, the install of the WrapITK produces the itk namespace. Is
this normal?

THanks,
-- 
Gheorghe Postelnicu, PhD
MGH, Harvard Medical School


More information about the Insight-users mailing list