On Thu, 05 Dec 2013, Nikolaas N. Oosterhof wrote:

>    In mvpa2/support/afni/lib_plot_slices.py:

>  > @@ -336,6 +336,8 @@ def make_plot(ulay, olay, dims, pos, title=None,
>  >          dimensions to plot (0=x, 1=y, 2=z)
>  >      pos: list of float
>  >          relative positions to slice (in range 0..1)
>  > +    title: str or None

>    AFNI-specific: loading AFNI files and resampling overlay to underlay space
>    are AFNI-specific

hm, how so?

all the load functions here theoretically should be implemented in
generic interface of nibabel (we could even just monkey patch nibabel to
do that not-so-beautiful-convert-BRIK-to-nii in load_afni) and then
similar resampling/overlay could be done for any image without relying
on AFNI's cmdline, and not just for AFNI volumes

while looking at it -- load_nii, is more like get_3d_nifti_data since
enforces 3d (but nothing like that for load_afni).

btw -- for conversion temporal file please use
tempfile.NamedTemporaryFile()
since the location of where original file could be read-only thus you
would not be able to create the temp file... would remove this
racing-condition/security-hazard-prone loop as well

>    non-specific: making blended overlay and underlay plots from two volumes,
>    which are assumed to be in the same space.

yeap -- and then the rest is completely not AFNI specific

cmap's should be also parts of make_plot... 

later (now if you like) we should generalize it for any number of
overlays anyways

anyways -- all of the above is pretty much "TODO", and since you have
this idea to kick it all into AFNI some time in the future -- not sure
in general what number of functions duplicating functionality with
'stock' PyMVPA should we have or where should the line be drawn... thus
merging meanwhile as is

-- 
Yaroslav O. Halchenko, Ph.D.
http://neuro.debian.net http://www.pymvpa.org http://www.fail2ban.org
Senior Research Associate,     Psychological and Brain Sciences Dept.
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834                       Fax: +1 (603) 646-1419
WWW:   http://www.linkedin.com/in/yarik