2012/2/14 Stéfan van der Walt <stefan@sun.ac.za>
Hey Neil
On Mon, Feb 13, 2012 at 8:44 PM, Neil Yager <yager.neil@gmail.com> wrote:
1. One thing that I think would be very useful is some simple interactive tools for examining with images. For example, 2 simple additions to the basic matplotlib's imshow would be to show the pixel intensity of the current mouse location (it already shows the x, y coordinates). Also, it would be nice to be able to click at 2 points and display the profile of intensities between them. Would adding functionality like this cause too many compatibility issues, or be moving too far away from skimage's core strength?
Not at all! Would you like to update the fancy viewer? It already does most of what you want:
from skimage import io, data io.use_plugin('qt') io.imshow(data.camera(), fancy=True)
This is strange: imshow (with or without "fancy") isn't working for me with the qt backend. Or actually, imread_qt isn't working for me (see traceback below; also imshow works if I force skimage to use a different imread, although the window disappears immediately). I'm not really sure how to debug a MemoryError. What's weird is that I'm certain I've used the fancy viewer since the addition of imread_qt (July 2011). I updated (Py)Qt but that didn't help. -Tony python(34737,0x7fff70b93cc0) malloc: *** mmap(size=140734799798272) failed (error co de=12) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug Traceback (most recent call last): File "qtshow.py", line 9, in <module> io.imshow(data.camera(), fancy=True) File "/Users/Tony/python/devel/skimage/skimage/data/__init__.py", line 34, in came ra return load("camera.png") File "/Users/Tony/python/devel/skimage/skimage/data/__init__.py", line 27, in load return imread(_os.path.join(data_dir, f)) File "/Users/Tony/python/devel/skimage/skimage/io/_io.py", line 72, in imread img = call_plugin('imread', fname, plugin=plugin, **plugin_args) File "/Users/Tony/python/devel/skimage/skimage/io/_plugins/plugin.py", line 88, in call return func(*args, **kwargs) File "/Users/Tony/python/devel/skimage/skimage/io/_plugins/qt_plugin.py", line 102 , in imread_qt img = np.array(arrayptr) MemoryError
participants (1)
-
Tony Yu