[Nipy-devel] Visualization code refactor

Gael Varoquaux gael.varoquaux@normalesup....
Thu Jan 14 16:01:19 CST 2010


On Thu, Jan 14, 2010 at 08:55:09PM +0000, Matthew Brett wrote:
> It's very nice, the demos scattered around, a la Mayavi.

Yes, that basicaly what it is, currently, some half baked demos.
Hopefully as I understand better the usecases of neuroimaging, I'll boil
down actual usable functions.

> I ran into this:

> NameError: global name 'vmin' is not defined

Good catch, will fix. There is a lot of stuff that needs cleaning up.

> and it wasn't clear to me how to fix it, sorry to say.

> Attempting to run ortho_slicer.py as a script gave me the relative
> import errors that Mike noticed.

Yes, the main needs to be killed. Will do this this week end.

> Trying to replicate the __main__ example there gave me:

> In [8]: pl.show()

> produces a nice plot.

Cool.

> It seems like a good feature to allow cut_coords to the plot_map call,
> but I didn't look hard to see why that might not work.

The idea was that in the long run, other objects will expose the same
'plot_map' interface as OrthoSlicer, but they may be other kind of
slicing, for instance successive slices at z constant. This is why I
don't want to enforce coordinates in the plot_map method, if this is what
you are talking about. The OrthoSlicer would become a subclass of a
SlicingContext class, and thus it would be easier to overlay maps and
information on a view of the 3D space. Of course this is just an idea,
and I don't know if it will survive usage. I have little time for coding,
so I tend to implement things as I need them.

> - the idea being something like this:

> mni_2mm = nipy.templates.MNI2mm()

> t1_img = mni_2mm['t1']['raw']
> t1_brainmask = mni_2mm['t1']['brainmask']

> maybe not that interface, but you get the idea.

Yes, this is useful. I noticed that the IO was taking a lot of time, this
is why I added the cache.

> Thanks for putting it up for review,

Thanks for your review.

Gaël



More information about the Nipy-devel mailing list