Hmmmm, not sure how to answer that. They are the same shape but there are
not 133 copies of the mask but there are of the dataset is that the
problem? It automatically applies the flattening as well. Is that going to
be a problem?

Mask and data are of the following types

<type 'numpy.ndarray'>
<type 'numpy.ndarray'>

There are 217387 elements in the mask.
There are 902629 elements in one element of the array but the array is 133
elements long.

I have not tried fmri_dataset. Is this compatible with structural scans?

Tom

On Sat, Nov 29, 2014 at 12:18 PM, Nick Oosterhof <
[email protected]> wrote:

>
> On 28 Nov 2014, at 14:35, Thomas Nickson <[email protected]> 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.
>
>
>
> _______________________________________________
> Pkg-ExpPsy-PyMVPA mailing list
> [email protected]
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa
>
_______________________________________________
Pkg-ExpPsy-PyMVPA mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa

Reply via email to