Hi,<br>I have a problem in executing the the following code. The error I get is dimension mismatch in PyMVPA (the dimensions are getting changed!)<br>But SPM shows the mask and data have the same dimension. <br><br>--------------------------------------<br>
python code:<br><br>dataset = NiftiDataset(samples='data/wrbold1_0000.nii', mask='data/mask.img')<br><br>---------------------<br>error:<br><br>Traceback (most recent call last):<br> File "start_easy1.py", line 28, in <module><br>
dataset = NiftiDataset(samples='data/wrbold1_0000.nii', mask='data/mask.img')<br> File "/usr/lib/python2.5/site-packages/mvpa/datasets/nifti.py", line 215, in __init__<br> distance_function=cartesianDistance))<br>
File "/usr/lib/python2.5/site-packages/mvpa/mappers/array.py", line 93, in __init__<br> % (mask.shape, shape)<br>ValueError: The mask dataspace shape (64, 64, 40) is not compatible with the provided shape (35, 63, 53).<br>
----------------------<br><br>Matlab output:<br><br>>> spm_vol('mask.img')<br><br>ans = <br><br> fname: 'mask.img'<br> mat: [4x4 double]<br> dim: [53 63 35]<br> dt: [2 0]<br>
pinfo: [3x1 double]<br> n: [1 1]<br> descrip: 'spm_spm:resultant analysis mask'<br> private: [1x1 nifti]<br><br>>> spm_vol('wrbold1_0000.nii')<br><br>ans = <br><br> fname: 'wrbold1_0000.nii'<br>
mat: [4x4 double]<br> dim: [53 63 35]<br> dt: [4 0]<br> pinfo: [3x1 double]<br> n: [1 1]<br> descrip: 'spm - 3D normalized'<br> private: [1x1 nifti]<br><br>-----------------------------------------------<br>
<br>Can anyone explain what's PyMVPA doing to the data? <br>I would appreciate any feedback.<br><br><br><br>Thanks,<br>Geethmala<br>