[Insight-users] ImportError: No module named ITKMetricsv4Python

Bradley Lowekamp blowekamp at mail.nih.gov
Wed Apr 18 09:18:37 EDT 2012


Hello Mathieu,

I unfortunately can't help you with your WrapITK issue. But expanding VectorImage support for SimpleITK was in my agenda for this week.

On Apr 18, 2012, at 7:02 AM, Mathieu Stumpf wrote:

> Hello,
> 
> Having to open a 4D image, I can't use SimpleITK which doesn't support
> it yet (I get the error : Images of Vector Pixel types currently are not
> supported).

I would like to know more about this error. It is generated when you have a VectorImage and try to get a numpy array?

Also how did you read in your image?

Did you try using the VectorIndexSelctionCast function to select a component of the VectorImage? Then convert it numpy?

I very much would like know the features that are missing in SimpleITK to better support VectorImages for 4D image processing.

Thanks,
Brad


> 
> So I turn back to ITK and its included python wrapper. So I looked in
> the nice Examples to see how to open some files, but I'm not able to run
> a simple example :
>        ~/src/itk-git/ITK/Examples$ python IO/DicomSliceRead.py 
>        Traceback (most recent call last):
>          File "IO/DicomSliceRead.py", line 24, in <module>
>            from InsightToolkit import *
>          File "/usr/local/lib/ITK-4.1/Python/InsightToolkit.py", line 75, in <module>
>            from ITKMetricsv4Python import *
>        ImportError: No module named ITKMetricsv4Python
> 
> What's wrong, the only installed ITKMetrics file I found in my
> installation directory was :
>        /usr/local/lib/cmake/ITK-4.1/Modules/ITKMetricsv4.cmake
> 
> ITK was already compiled and installed with the python wrapper, so I
> don't see what eventual step I messed.

Did you compile WrapITK your self? Did you try running out of the build directories? Perhaps there is some step missing in the current installation.

> 
> Kind regards,
> mathieu
> 
> _____________________________________
> 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

========================================================
Bradley Lowekamp  
Medical Science and Computing for
Office of High Performance Computing and Communications
National Library of Medicine 
blowekamp at mail.nih.gov



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20120418/b1d4268b/attachment.htm>


More information about the Insight-users mailing list