[ITK-users] [Spam:8.0 SpamScore] Re: matplotlib bug with SimpleITK
Audette, Michel A.
maudette at odu.edu
Thu Jul 30 11:51:09 EDT 2015
Hi Brad,
Siavash correctly noted that I had failed to invoke the show() instruction after imshow... That wasn't clear from the instructions on the Notebook.
Thanks for your kind consideration. I'm hoping that this SimpleITK release proves feasible to use by my high-school-level researchers. You and the ITK Consortium have done a nice job. It would be nice if the whole installation could be done by one mouse-click, so that it could scale to a larger population of students, but let's see where it goes with the two who are working on this project now.
Best wishes,
Michel
Michel Audette, Ph.D.
Assistant Professor,
Department of Modeling, Simulation and Visualization Engineering,
Old Dominion University,
Norfolk, VA.
________________________________________
From: Bradley Lowekamp [blowekamp at mail.nih.gov]
Sent: Thursday, July 30, 2015 10:10 AM
To: Audette, Michel A.
Cc: insight-users at itk.org; Selwyn Hector; jschmidt757 at cox.net
Subject: [Spam:8.0 SpamScore] Re: [ITK-users] matplotlib bug with SimpleITK
Hello,
1) Easiest way to get a SciPy stack.
Unfortunately, this is different depending on depending on the operating system, and even architecture, additionally it has changed though time too.
It sounds like you are using Python 64 on windows. I use those same packages provided by the third party. However, for windows 32 those packages and available on pipy, and pip install works.
You may want to look into providers of the python distributions for scientific computing such as Anaconda or Canopy. Additionally linux package managers work quite well for getting a non-cutting edge version of the SciPy stack.
http://www.itk.org/Wiki/SimpleITK/FAQ#I_am_using_the_binary_distribution_of_SimpleITK_for_Anaconda.2C_why_do_I_get_an_error_about_libpng.3F
2) Don't worry about the SCALE_UNKNOW
We should update the image in the the notebook repository. Did you know the classic "cthead1.png" file in ITK, is actually an RGB image?
3) Why can I see Image in matplotlib
I have no idea. I don't know how you are running that code. I don't know what matplotlib backend you are using. I don't know if you are trying to view a RGB or a gray scale image or apply a color map. It could be as simple as a intensity scaling issue.
Matplotlib is nice to render results inline in notebooks to share. But to do really work with 3D images an external viewer is needed. This sitk::Show command defaults to ImageJ, but can easily be reconfigured to work with 3D Slicer or ITK SNAP.
HTH,
Brad
On Jul 29, 2015, at 5:10 PM, Audette, Michel A. <maudette at odu.edu> wrote:
> Dear ITK users,
>
> I'm trying to set up a project with SimpleITK's Python interface for high school-level researchers. I've had to use some Python resources available at Christoph Gohlke's website because I had the C++ compilation error (error: Unable to find vcvarsall.bat) when I tried the usual pip installation route. I felt that I had no choice but to use his .whl files for numpy and matplotlib at http://www.lfd.uci.edu/~gohlke/pythonlibs/ .
>
> However, I now am seeing the following bug...
>>>> import SimpleITK as sitk
>>>> from pylab import *
>>>> image1 = sitk.ReadImage("C:\Python27\InsightSoftwareConsortium-SimpleITK-Notebooks\Data\cthead1.jpg")
>>>> nda = sitk.GetArrayFromImage(image1)
>>>> imshow(nda)
> <matplotlib.image.AxesImage object at 0x0000000005DE0320>
> (no display)
>
> Matplotlib seems to be doing something, but produces no display.
>
> (Btw, the software was complaining when I tried to use this set of instructions with cthead1.png: PNGImageIO was giving me two warnings related to SCALE_UNKNOWN detected... )
>
> Can anyone suggest a solution that will allow me to run the Pythonic Image tutorial in the SimpleITK Notebooks website?
>
> Thanks for your kind support.
>
> Michel
> Michel Audette, Ph.D.
> Assistant Professor,
> Department of Modeling, Simulation and Visualization Engineering,
> Old Dominion University,
> Norfolk, VA.
> _____________________________________
> 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://public.kitware.com/mailman/listinfo/insight-users
--
BEGIN-ANTISPAM-VOTING-LINKS
------------------------------------------------------
Teach CanIt if this mail (ID 03OWCaAEQ) is spam:
Spam: https://www.spamtrap.odu.edu/canit/b.php?i=03OWCaAEQ&m=1f3e82ef3df7&t=20150730&c=s
Not spam: https://www.spamtrap.odu.edu/canit/b.php?i=03OWCaAEQ&m=1f3e82ef3df7&t=20150730&c=n
Forget vote: https://www.spamtrap.odu.edu/canit/b.php?i=03OWCaAEQ&m=1f3e82ef3df7&t=20150730&c=f
------------------------------------------------------
END-ANTISPAM-VOTING-LINKS
More information about the Insight-users
mailing list