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=&#39;data/wrbold1_0000.nii&#39;, mask=&#39;data/mask.img&#39;)<br><br>---------------------<br>error:<br><br>Traceback (most recent call last):<br>  File &quot;start_easy1.py&quot;, line 28, in &lt;module&gt;<br>
    dataset = NiftiDataset(samples=&#39;data/wrbold1_0000.nii&#39;, mask=&#39;data/mask.img&#39;)<br>  File &quot;/usr/lib/python2.5/site-packages/mvpa/datasets/nifti.py&quot;, line 215, in __init__<br>    distance_function=cartesianDistance))<br>
  File &quot;/usr/lib/python2.5/site-packages/mvpa/mappers/array.py&quot;, 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>&gt;&gt; spm_vol(&#39;mask.img&#39;)<br><br>ans = <br><br>      fname: &#39;mask.img&#39;<br>        mat: [4x4 double]<br>        dim: [53 63 35]<br>         dt: [2 0]<br>
      pinfo: [3x1 double]<br>          n: [1 1]<br>    descrip: &#39;spm_spm:resultant analysis mask&#39;<br>    private: [1x1 nifti]<br><br>&gt;&gt; spm_vol(&#39;wrbold1_0000.nii&#39;)<br><br>ans = <br><br>      fname: &#39;wrbold1_0000.nii&#39;<br>
        mat: [4x4 double]<br>        dim: [53 63 35]<br>         dt: [4 0]<br>      pinfo: [3x1 double]<br>          n: [1 1]<br>    descrip: &#39;spm - 3D normalized&#39;<br>    private: [1x1 nifti]<br><br>-----------------------------------------------<br>
<br>Can anyone explain what&#39;s PyMVPA doing to the data? <br>I would appreciate any feedback.<br><br><br><br>Thanks,<br>Geethmala<br>