|
From: Angus M. <am...@gm...> - 2007-01-01 20:34:42
|
Hi Eric, On 30/12/06, Eric Emsellem <ems...@ob...> wrote: > Hi, > > I am writing a small module to easily load images and interact with > them. Sorry for getting to this thread late - back from a quick holiday now. I have written an image browser module that does what it sounds like you're trying to do (and works with 3-D image stacks as well). It's still quite rudimentary, and I hadn't really planned on sharing it in its current state, but it may be that you can find some useful ideas in the code. The image browser is a matplotlib canvas embedded in a wx window, and I use the WxAgg backend - I've no idea how that will change things from your setup. I run it interactively from ipython -pylab as shown below. Usage is pretty simple: In [1]: import pyvis In [2]: pv = pyvis.pyvis() In [3]: pv.AddImg(arange(10000).reshape(100,100), 'my gradient') then play around with the menus. More than one image can be loaded at a time. I haven't had a close look at the memory usage, but it has been working adequately for quite large image stacks (1024x1024x250x8-bit). Feel free to use the code as you like. Angus. -- AJC McMorland, PhD Student Physiology, University of Auckland |