[pymvpa] Question about NiftiDataset

Yaroslav Halchenko debian at onerussian.com
Mon Apr 6 13:54:24 UTC 2009


I just want to complement Michael's response with a little bit more
transparent workaround:

      ds_ =  NiftiDataset(samples=abs_filename(betafile),
             labels=label , chunks=chunk , mask=m)
     if ds is None:  ds = ds_
	 else:           ds += ds_

or even better if you loop only to read them in and all are 3D volumes:
ds = NiftiDataset(samples=['file1.nii.gz', 'file2.nii.gz'],
	              labels=labels, ...)


> -- looping stuff ---

>     if ds is None:
>         ds =  NiftiDataset(samples=abs_filename(betafile),
>             labels=label , chunks=chunk , mask=m)
>     else:
>         ds +=  NiftiDataset(samples=abs_filename(betafile),
>             labels=label , chunks=chunk , mask=m)


> Thanks for your advice.

> V-

> _______________________________________________
> 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