[pymvpa] Dimension mismatch error

Geethmala geethmala at gmail.com
Sun Dec 27 00:54:32 UTC 2009


Hi,
I have a problem in executing the the following code. The error I get is
dimension mismatch in PyMVPA (the dimensions are getting changed!)
But SPM shows the mask and data have the same dimension.

--------------------------------------
python code:

dataset = NiftiDataset(samples='data/wrbold1_0000.nii',
mask='data/mask.img')

---------------------
error:

Traceback (most recent call last):
  File "start_easy1.py", line 28, in <module>
    dataset = NiftiDataset(samples='data/wrbold1_0000.nii',
mask='data/mask.img')
  File "/usr/lib/python2.5/site-packages/mvpa/datasets/nifti.py", line 215,
in __init__
    distance_function=cartesianDistance))
  File "/usr/lib/python2.5/site-packages/mvpa/mappers/array.py", line 93, in
__init__
    % (mask.shape, shape)
ValueError: The mask dataspace shape (64, 64, 40) is not compatible with the
provided shape (35, 63, 53).
----------------------

Matlab output:

>> spm_vol('mask.img')

ans =

      fname: 'mask.img'
        mat: [4x4 double]
        dim: [53 63 35]
         dt: [2 0]
      pinfo: [3x1 double]
          n: [1 1]
    descrip: 'spm_spm:resultant analysis mask'
    private: [1x1 nifti]

>> spm_vol('wrbold1_0000.nii')

ans =

      fname: 'wrbold1_0000.nii'
        mat: [4x4 double]
        dim: [53 63 35]
         dt: [4 0]
      pinfo: [3x1 double]
          n: [1 1]
    descrip: 'spm - 3D normalized'
    private: [1x1 nifti]

-----------------------------------------------

Can anyone explain what's PyMVPA doing to the data?
I would appreciate any feedback.



Thanks,
Geethmala
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/attachments/20091226/f9e2623e/attachment.htm>


More information about the Pkg-ExpPsy-PyMVPA mailing list