[pymvpa] problem with fmri_dataset
Yangyue Huang
hyy0615a at gmail.com
Thu Apr 7 15:27:45 UTC 2011
Dear pymvpa helper
I use a mask which has 6768 voxels marked with number 1,but I use
fmri_dataset to read the image data,there just are 2457 voxels marked with
number 1.The main code is following:
from mvpa.suite import *
import numpy as N
import nifti as nb
import os
#load all data
attr = SampleAttributes(os.path.join(dpath,attributes))
patimg = nb.NiftiImage(os.path.join(dpath,pat))
maskimg = nb.NiftiImage(os.path.join(dpath,'masks',fmask))
alldata =
fmri_dataset(samples=patimg,targets=attr.targets,chunks=attr.chunks,mask=maskimg)
#choose the NO.1 ROI
mask = alldata.mapper[:2].forward1(maskimg.data)
dataset = alldata[ts,np.logical_not(mask!=1)]
I see that:
N.sum(maskimg.data==1)
6768
dataset.nfeatures
2457
I don't know why the features in NO.1 ROI decrease from 6768 to 2457
Can you help me,THX!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/attachments/20110407/8125a2fd/attachment.htm>
More information about the Pkg-ExpPsy-PyMVPA
mailing list