[pymvpa] Mask in from_wizard generates no data.

Nick Oosterhof n.n.oosterhof at googlemail.com
Sat Nov 29 12:18:56 UTC 2014


On 28 Nov 2014, at 14:35, Thomas Nickson <thomas.nickson at gmail.com> wrote:

> When I construct a dataset using Dataset.from_wizard() and supply a brain mask all I get in return is a dataset that's all 0. 
> 
> I show the code below:
> 
> #get image data reshape and flatten
> rotatedImageData = rotateShape(getImageData(DATA_LOCATION))
> 
> #Get mask data
> mask = getImageData(MASK)#.nonzero()[0]
> 
> #Load dataset
> ds = Dataset.from_wizard(rotatedImageData, targets=metaData['diagnosesT1'], mask=mask)

Some ideas:
- are the mask and rotatedImageData of compatible shape?
- what is the datatype of mask? 
- how many voxels are non-zero in the mask?
- how many voxels are non-zero in rotatedImageData?
- have you tried using fmri_dataset instead?

If that doesn’t help in resolving the issue, could you provide the data you are using somewhere online so we can try to reproduce the issue.





More information about the Pkg-ExpPsy-PyMVPA mailing list