[pymvpa] 3D images with NiftiDataset?

Dylan David Wagner dylan.d.wagner at Dartmouth.EDU
Thu Sep 18 05:27:21 UTC 2008

Hey list,

I've been mucking about trying to get NiftiDataset to grab my images (3d 
maps of beta weights from a GLM) and mask but keep running into this error:

ValueError: The mask dataspace shape [(54, 65, 53)] is not compatible 
with the shape of the provided data samples [(65, 53)].

The mask and data are in the same space (dimensions, voxel size, etc.). 
I also tried just using the same file as both mask and sample just to 
make sure, and still get the error. If I'm reading the API reference 
correctly (which isn't even remotely within the vicinity of being a safe 
bet as I only started learning python this morning) it seems 
NiftiDataset is expecting 4d images for samples (i.e. line 114 of module 
mvpa.datasets.nifit and other places). I believe what is happening is 
it's treating the first dimension it finds as 'time" and then using the 
remaining dimensions to define the data. The mask, obviously, stays in 3d.

So! Is there a way to import 3d images?  (fyi: I'm looking to classify 
subjects not events, in a fashion similar to this paper which used 
anatomical images: 

Many thanks,

p.s. while I have your attention, any chance of making available the 
tutorial/example dataset that the manual refers to? And any plans to 
release windows binaries for 0.3.1?

More information about the Pkg-ExpPsy-PyMVPA mailing list