[ITK] [ITK-users] Using ITK python wrapper
Michka Popoff
michkapopoff at gmail.com
Mon Mar 31 05:01:00 EDT 2014
Hi
seems your path is not correctly set. The path should be : sys.path.append('C:/Toolkits/ITK-4.5.1/build_x64_VS2008_withLTK/Wrapping/Generators/Python')
There is no Release folder in the Python folder.
Maybe you'll have to play a little bit with the path, you are under windows so perhaps the slashes need to be replaced by backslashes ?
Michka
Le 31 mars 2014 à 10:38, Chiara Caborni a écrit :
> Hello,
>
> I'm writing on behalf of Nicole in cc, which has subscribed to insight-users at itk.org, but still cannot send mails directly to the community, can you do something about that? thank you
>
>
> I'm trying to use the python wrapped ITK, but I'm running into trouble setting up my image type.
>
>
>
> My code so far:
>
> import sys
>
> sys.path.append('C:/Toolkits/ITK-4.5.1/build_x64_VS2008_withLTK/Wrapping/Generators/Python/Release')
>
> import itk
>
> pixelType = itk.UC
>
> imageType = itk.Image[pixelType,3]
>
>
>
> Traceback (most recent call last):
>
> File "<console>", line 1, in <module>
>
> File "C:/Toolkits/ITK-4.5.1/build_x64_VS2008_withLTK/Wrapping/Generators/Python/Release\itkLazy.py", line 37, in __getattribute__
>
> itkBase.LoadModule(module, namespace)
>
> File "C:/Toolkits/ITK-4.5.1/build_x64_VS2008_withLTK/Wrapping/Generators/Python/Release\itkBase.py", line 95, in LoadModule
>
> LoadModule(dep, namespace)
>
> File "C:/Toolkits/ITK-4.5.1/build_x64_VS2008_withLTK/Wrapping/Generators/Python/Release\itkBase.py", line 95, in LoadModule
>
> LoadModule(dep, namespace)
>
> File "C:/Toolkits/ITK-4.5.1/build_x64_VS2008_withLTK/Wrapping/Generators/Python/Release\itkBase.py", line 95, in LoadModule
>
> LoadModule(dep, namespace)
>
> File "C:/Toolkits/ITK-4.5.1/build_x64_VS2008_withLTK/Wrapping/Generators/Python/Release\itkBase.py", line 95, in LoadModule
>
> LoadModule(dep, namespace)
>
> File "C:/Toolkits/ITK-4.5.1/build_x64_VS2008_withLTK/Wrapping/Generators/Python/Release\itkBase.py", line 95, in LoadModule
>
> LoadModule(dep, namespace)
>
> File "C:/Toolkits/ITK-4.5.1/build_x64_VS2008_withLTK/Wrapping/Generators/Python/Release\itkBase.py", line 103, in LoadModule
>
> if not swigModuleName in sys.modules: module = loader.load(swigModuleName)
>
> File "C:/Toolkits/ITK-4.5.1/build_x64_VS2008_withLTK/Wrapping/Generators/Python/Release\itkBase.py", line 213, in load
>
> fp, pathname, description = imp.find_module(name)
>
>
>
> Can anyone help me understand why this is happening and what I can do about it?
>
>
>
> Cheers,
>
> Nicole
> --
> Chiara
>
> _____________________________________
> 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://www.itk.org/mailman/listinfo/insight-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20140331/9fd964ef/attachment-0002.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://www.itk.org/mailman/listinfo/insight-users
More information about the Community
mailing list