[ITK-users] matplotlib bug with SimpleITK

Audette, Michel A. maudette at odu.edu
Wed Jul 29 17:10:36 EDT 2015


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.


More information about the Insight-users mailing list