[pymvpa] writing a NIfTI file from PyMVPA
Jo Etzel
j.a.etzel at med.umcg.nl
Thu Mar 12 15:31:08 UTC 2009
Thanks!!
That works perfectly. I'd found .map2Nifti but not the .save part.
Jo
Yaroslav Halchenko wrote:
> 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
>
>
More information about the Pkg-ExpPsy-PyMVPA
mailing list