[pymvpa] writing a NIfTI file from PyMVPA
Yaroslav Halchenko
debian at onerussian.com
Thu Mar 12 15:02:20 UTC 2009
o o -- that example had no magic function exposed...
use
dataset.map2Nifti(sl_map).save('bugi.nii.gz')
or
dataset.map2Nifti(sl_map).save('bugi.img', filetype='ANALYZE')
for analyze iirc
On Thu, 12 Mar 2009, Jo Etzel wrote:
> I would like to write a NifTI (or even better, Analyze img/hdr format;
> but I can convert a NifTI file of course) from within PyMVPA. Is there
> an easy way to do this?
> Specifically, I've been trying some variations of the searchlight_2d.py
> example with my own (3D) images, and would like to view the output
> (sl_map in the example) as a 3D image. I think that the
> orig_sl_map = dataset.mapReverse(N.array(sl_map))
> masked_orig_sl_map = N.ma.masked_array(orig_sl_map, mask=orig_sl_map == 0)
> lines from the example put the sl_map into the right space, but I'm not
> sure what to do next.
> Thanks in advance for your help,
> Jo
> _______________________________________________
> Pkg-ExpPsy-PyMVPA mailing list
> Pkg-ExpPsy-PyMVPA at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/pkg-exppsy-pymvpa
--
Yaroslav Halchenko
Research Assistant, Psychology Department, Rutgers-Newark
Student Ph.D. @ CS Dept. NJIT
Office: (973) 353-1412 | FWD: 82823 | Fax: (973) 353-1171
101 Warren Str, Smith Hall, Rm 4-105, Newark NJ 07102
WWW: http://www.linkedin.com/in/yarik
More information about the Pkg-ExpPsy-PyMVPA
mailing list