[pymvpa] selecting features by mask

John Clithero john.clithero at gmail.com
Thu Aug 27 23:22:03 UTC 2009


Hi all,

Another relatively simple question (I think).
I can load/create a dataset as follows:

dataset_wb = NiftiDataset((wb_file),
	labels=attr.labels,
	chunks=attr.chunks,
	mask=os.path.join(roidir,'wb.nii.gz'))

And then, after this, I want to use SelectFeatures based on a mask I
have to run some additional classifiers on a subset of the features
using a new mask, say:

roi_mask=os.path.join(roidir,'vmpfc.nii.gz')

It is advantageous for me to create the dataset_wb as wholebrain using
the 'wb.nii.gz' mask and then after analyses, use this other mask on
the dataset (I want to detrend etc. at the whole-brain, not the ROI
level).
It seems like something that used to exist,
"selectFeaturesByMask(mask, plain=False)"
would have been perfect for this. It seems that now, based on a post
earlier, a list of Ids from my roi_mask is needed for selectFeatures.

My question then, is given all of my fMRI data are in the same 3D
space (or, each timepoint is in the same 3D space as my masks), there
must be some way to use getOutId to get a list of Ids (say, Z) from
roi_mask to plug into

new_dataset_roi=dataset_wb.selectFeatures(Z).

I think my understanding of getOutId is limited :-) How do I get this
list of Ids, Z?
Thanks again.

Cheers,
John



More information about the Pkg-ExpPsy-PyMVPA mailing list