[Insight-users] Displaying .mat files

Ing. Arturo Vargas Olivares ing.arturo.vargas at gmail.com
Tue May 8 14:23:37 EDT 2012


I'm trying to display a picture but I'm not sure why I can't.
(Commands in blue, outputs in green)

Any ideas?


*inputImage = sitk.ReadImage( 'lena_color.bmp' )*
*inputImage
Out[89]: <SimpleITK.Image; proxy of <Swig Object of type 'std::vector<
itk::simple::Image >::value_type *' at 0x0000000019BE6C60> >*
*sitk.Show( inputImage )
**
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
C:\Users\Student3\Desktop\MRI images\<ipython-input-90-868b377c2eaa> in
<module>()
----> 1 sitk.Show( inputImage )*
*C:\Python27\lib\site-packages\simpleitk-0.4.0-py2.7-win-amd64.egg\SimpleITK.pyc
in Show(*args, **kwargs)
   3155 def Show(*args, **kwargs):
   3156   """Show(Image image, string title = "")"""
-> 3157   return _SimpleITK.Show(*args, **kwargs)
   3158 class ImageFilter(_object):
   3159     """Proxy of C++ itk::simple::ImageFilter class"""*
*RuntimeError: Exception thrown in SimpleITK Show: C:\Users\Bradley
Lowekamp\Documents\Source\SimpleITK\Code\IO\src\sitkShow.cxx:54:
sitk::ERROR: Can not find location of*





On Tue, May 8, 2012 at 11:16 AM, Ing. Arturo Vargas Olivares <
ing.arturo.vargas at gmail.com> wrote:

> Hi Bradley
>
> Have you ever tried to test the 'SimpleGaussian.py' example? how can I
> test it?
>
> I'm interested in test this example, I think it has sitk methods that can
> help me to understand the tool. I'm new in ITK and I'm trying with
> SimpleITK first.
>
>
>
>
> On Mon, May 7, 2012 at 10:24 PM, Bradley Lowekamp <brad at lowekamp.net>wrote:
>
>> Hello,
>>
>> I am not sure that ITK can directly read all .mat images. There is the
>> HDF5 image IO that may work for a subset, but I have never tried this
>> combination my self.
>>
>> If you are using SimpleITK with Python, you may look for mat image reader
>> in another python package such as scipy. They should be able to export the
>> image to a numpy array, then this can be imported into SimpleITK with the
>> sitk.CreateimageFromArray() method.
>>
>> By default SimpleITK uses ImageJ to display images from the sitk.Show
>> method. More information about getting this setup can be found here:
>>
>>
>> http://www.itk.org/Wiki/ITK_Release_4/SimpleITK/GettingStarted#Recommended_Software
>>
>> Brad
>>
>> On May 7, 2012, at 8:56 AM, Ing. Arturo Vargas Olivares wrote:
>>
>> > Hello friends.
>> > I need your help.
>> > I'm new in the world of SimpleITK and I'm starting a PhD research and I
>> need to know more about image segmentation tools. By the mean time I'd like
>> to know how to open or display images using SimpleITK. The images are in
>> the .mat format (MATLAB) and I also have python and installed in my PC.
>> > Any help will be very appreciated.
>> > BR
>> > Arturo V.
>> > _____________________________________
>> > 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://www.itk.org/pipermail/insight-users/attachments/20120508/56c08c7d/attachment.htm>


More information about the Insight-users mailing list