[pymvpa] PyNIfTI/nifticlib/zlib bug on win32

Michael Hanke michael.hanke at gmail.com
Thu Apr 2 12:55:00 UTC 2009


Hi all,

[cross-posting to pymvpa list too, since there are probably most users]

we have a bug!

It looks like PyNIfTI is not working properly on win32 (and maybe on
MacOS too). The bug shows up when writing an image to a _compressed_ NIfTI
file. I am attaching a screenshot that shows an axial view of an image
that is shipped as part of the PyMVPA sources ('example4d.nii.gz'). The
grayscale image is the original and the reddish one is the resulting
image of the following operation:

 1. Open the compressed image with pynifti (on win32).
 2. Write it again to a compressed file (on win32).

The bug does not show up when 2.) writes to an _uncompressed_ image --
which somewhat indicates a zlib issue (I guess most people are using
zlib 1.2.3 now).

As PyNIfTI is not statically linked to zlib you can replace the library
with an unaffected one. There were reportes that zlib 1.2.2 is not
affected, but so far I cannot confirm that.

In my opinion this bug is a little too specific to be a general zlib
issue -- very unlikely that such a widely used library shows such a
gross bug. More likely is a bug in the handling of compressed files in
the nifticlib.

However, it needs more work and time to track this bug down. In the
meantime I'd recommend to test whether your installation is affected and
revert to uncompressed images in that case.

It would be helpful if you could report to the pynifti mailinglist
(pkg-exppsy-pynifti at lists.alioth.debian.org) if you hit this bug and
tell us what system you are using (zlib version, nifticlib version (if
you are not using the one built into pynifti), and finally pynifti
version).

On the Debian systems I have tested so far I cannot reproduce this bug,
but I see it on a Win 2003 Server with the lastest pynifti and zlib
1.2.3.


Michael

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



More information about the Pkg-ExpPsy-PyMVPA mailing list