Hi all:

       The following code gives me a very strange result; here, there are 5
ROIs in my maskimg, indexed 1 to 5, respectively. In my mind, the output1
and output2 is right, but output3 is very confusing, why ROI 2 is missing?

The pymvpa I used is ver .5. Could you please help me find the problem?
Thanks in advance.



Best



Zonglei



attr = SampleAttributes(os.path.join(dpath,attributes))

patimg  = nifti.NiftiImage(os.path.join(dpath,pat))

maskimg = nifti.NiftiImage(os.path.join(dpath,'masks',fmask))



rois = np.unique(maskimg.getDataArray())

rois = rois[rois!=0]

pirnt rois => [1, 2, 3, 4,5] # output 1, 5 ROIs, indexed 1 to 5



alldata = fmri_dataset(samples=patimg,targets=attr.targets,

                                chunks=attr.chunks,mask=maskimg)

zscore(alldata)



img = maskimg.copy().getDataArray()

print np.unique(img)  => [0,1, 2, 3, 4,5] # output 2



mask = alldata.mapper[:2].forward1(img) # flatten and feature selection

print np.unique(mask) => [0,1, 3, 4,5] # output 3, where is ROI 2?
_______________________________________________
Pkg-ExpPsy-PyMVPA mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/pkg-exppsy-pymvpa

Reply via email to