[Pkg-exppsy-pynifti] PyNIfTI 0.20090303.1

Michael Hanke michael.hanke at gmail.com
Sun Mar 29 15:12:51 UTC 2009


On Sun, Mar 29, 2009 at 04:26:11PM +0200, Matthias Ekman wrote:
> OK thanks.
> 
> I was asking, because I have strange problem with map2Nifti on OS X.
> I thought it might be a bug in the previous version of PyNIfTI, but
> now i figured out, that the same problem also occurs under Windows
> (sorry ;-)) with the 'actual' version. On Debian everything works
> fine.
> 
> so simply loading and storing your example Nifti file:
> 
> attr = SampleAttributes(os.path.join(pymvpa_dataroot, 'attributes.txt'))
> dataset = NiftiDataset(samples=os.path.join(pymvpa_dataroot, 'bold.nii.gz'),
>                        labels=attr.labels,
>                        chunks=attr.chunks,
>                        mask=os.path.join(pymvpa_dataroot, 'mask.nii.gz'))
> 
> # save
> dataset.map2Nifti(dataset).save('tmp.nii.gz')
> 
> I attached a screenshot of the (weird looking) tmp.nii.gz. I am
> getting the same result on Windows and OS X. Also tested with
> different Nifti files.

Strange. Have you tried this with pure PyNIfTI? The above code causes a
number of reshapings, maskings and such. Do you get the same bug with
just:

  nim=NiftiImage(os.path.join(pymvpa_dataroot, 'bold.nii.gz'))
  nim.save('tmp.nii.gz')

?

I somewhat dout that this is PyNIfTI's fault, but rather PyMVPA's
mapper... but just guessing. Please try the pure PyNIfTI variant and
let's see. I also cannot see anything platform specific per se in this
behavior. Are you using identical versions on all platforms? Which ones
in any case?

Thanks,

Michael

-- 
GPG key:  1024D/3144BE0F Michael Hanke
http://apsy.gse.uni-magdeburg.de/hanke
ICQ: 48230050



More information about the Pkg-exppsy-pynifti mailing list