<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:14pt">Hi all,<br><br><br>I have a problem with CSWIG cable and ITKwrapping and I would be thankful if you could help. I sent similar post two weeks back when I wanted to test python and ITK on my 64bit machine. Since I realized that python2.5 and CSWIG and ITK on 64bit cannot get along with each other, I wanted to test it on my laptop (32bit). This time, it was compiled although it crashed once complaining about a bug in gcc but I resume compiling typing "make" again. After compilation was finished (it took hours !!), I add following lines to my .bashrc file:<br> PATH=/home/kayhan/bin/InsightToolkit-3.2.0/Wrapping/WrapITK/Python:$PATH<br> export PATH<br> export
PYTHONPATH=/home/kayhan/bin/InsightToolkit-3.2.0/Wrapping/WrapITK/Python:$PYTHONPATH<br> export LD_LIBRARY_PATH=/home/kayhan/bin/InsightToolkit-3.2.0/bin:$LD_LIBRARY_PATH<br> Once I wanted to try it on python (ipython environment), these error messages turn out:<br> In [1]: import itk<br> In [2]: dim = 3<br> In [3]: PixelType = itk.UC<br> In [4]: Image = itk.image[P<br> PendingDeprecationWarning PixelType <br> In [4]: Image = itk.image[PixelType, dim]<br> ---------------------------------------------------------------------------<br> <type 'exceptions.TypeError'> Traceback (most recent call last)<br><br>-
Ignored:<br> /home/kayhan/<ipython console> in <module>()<br> <br> <type 'exceptions.TypeError'>: 'function' object is unsubscriptable<br> <br> <br> first I thought that there might be something wrong with ITKWrapping, therefore I add CSWIG path to PYTHONPATH variable and tried to check using itk through python using CSWIG, I got following:<br> <br> kayhan@kayhan-laptop:~$ export PYTHONPATH=/home/kayhan/bin/InsightToolkit-3.2.0/Wrapping/CSwig/Python/:$PYTHONPATH<br> kayhan@kayhan-laptop:~$ python<br> Python 2.5.1 (r251:54863, May 2 2007, 16:56:35)<br> [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2<br> Type "help", "copyright", "credits" or "license" for more information.<br> >>> from InsightToolkit import
*<br> Traceback (most recent call last):<br> File "<stdin>", line 1, in <module><br> File "/home/kayhan/bin/InsightToolkit-3.2.0/Wrapping/CSwig/Python/InsightToolkit.py", line 1, in <module><br> from itkalgorithms import *<br> File "/home/kayhan/bin/InsightToolkit-3.2.0/Wrapping/CSwig/Python/itkalgorithms.py", line 1, in <module><br> from itknumerics import *<br> File "/home/kayhan/bin/InsightToolkit-3.2.0/Wrapping/CSwig/Python/itknumerics.py", line 1, in <module><br> from itkcommon import *<br> File "/home/kayhan/bin/InsightToolkit-3.2.0/Wrapping/CSwig/Python/itkcommon.py", line 1, in <module><br> from
vxlnumerics import *<br> File "/home/kayhan/bin/InsightToolkit-3.2.0/Wrapping/CSwig/Python 2.5.1 (r251:54863, May 2 2007, 16:56:35) Python 2.5.1 (r251:54863, May 2 2007, 16:56:35) Python/vxlnumerics.py", line 4, in <module><br> from VXLNumericsPython import *<br> File "VXLNumericsPython.py", line 33, in <module><br> from vcl_complex import *<br> File "vcl_complex.py", line 5, in <module><br> import _vcl_complex<br> ImportError: No module named _vcl_complex<br> <br> <br> <br> <br> Do you think that there is something wrong with configuration or I should redo compilation or ...? By the way, here is my machine
specification:<br> <br> Linux Ubuntu 7.04 (32bit)<br> gcc: version 4.1.2 (Ubuntu 4.1.2-0ubuntu4)<br> ITK ver.: InsightToolkit-3.2.0<br> python ver.: Python 2.5.1 (r251:54863, May 2 2007, 16:56:35)<br> <br> <br> I would be thankful if you reply me back.<br> <br> <br> Regards,<br> Kayhan <br></div><br>
<hr size=1><a href="http://us.rd.yahoo.com/evt=49938/*http://tools.search.yahoo.com/toolbar/features/mail/">Never miss an email again!<br>Yahoo! Toolbar</a> alerts you the instant new Mail arrives.<a href="
http://us.rd.yahoo.com/evt=49937/*http://tools.search.yahoo.com/toolbar/features/mail/"> Check it out.</a></body></html>