[pymvpa] Load nifti
Yaroslav Halchenko
debian at onerussian.com
Wed Mar 20 17:46:53 GMT 2019
On Wed, 20 Mar 2019, Alyson Saenz wrote:
> Dear PyMVPA community,
> I'm trying to load cope files from FSL to then use in PyMVPA, I search
> through functions listed in the PyMVPA manual and I found some candidates,
> but these functions don't appear when I import the PyMVPA libraries this
> is an example:
> getNiftiFromAnySource(src)
> Is there another way to load nifti files? Or how should I import the
> libraries to use that function?
I believe you can just use fmri_dataset .
For some reason I felt some urge I guess, so here is a complete helper:
https://github.com/PyMVPA/PyMVPA/pull/603/files
so you could just point to a .feat directory and get a nice dataset,
e.g.
$> PYTHONPATH=/home/yoh/proj/pymvpa/pymvpa python -c 'from mvpa2.misc.fsl import load_stats; print(load_stats(".", ["cope", "tstat"]))'
<Dataset: 14x143360 at float32, <sa: indexes,stats,targets>, <fa: voxel_indices>>
Feel welcome to improve that PR, not sure if I would jump to finish it
up any time soon
--
Yaroslav O. Halchenko
Center for Open Neuroscience http://centerforopenneuroscience.org
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
More information about the Pkg-ExpPsy-PyMVPA
mailing list