[Nipy-devel] Zip problems with the _open function

Matthieu Brucher matthieu.brucher@gmail....
Fri Apr 18 10:04:08 CDT 2008


Hi,

Long time no see ;)

We are currently adapting our image readers so that they can be used with
NiPy (the image class). We added our own format reader to the registry, and
we are currently wrapping pynifti, trying to replace the Nifti1 reader.
And then we ran into several issues :
- Nifti1 seems to unzip a nifti compressed file in the same folder, but
never deletes it afterwards. We often read images from a remote read-only
repository, so this is amazing, we should read it directly, without
uncompressing it, shouldn't we ?
- we can't use the _open() with pynifti directly because _open() first cuts
the ".gz" at the end of the filename. But the official nifticlib uses the
filename to know if it should uncompress the file on the fly or not (and as
my last point hinted it, we don't want to uncompress a file, because we are
not allowed to or we want to save disk space) and this leads to segmentation
faults with the classical image test (ATest....).

So is there a way to get around the stripzipext() function ? Is it really
mandatory for all the formats to work ? Shouldn't each format handle how it
uses the filename ? Because this means that the registry will not be able to
manage some readers, like pynifti, in an efficient way (meaning, not
deriving from BinaryFormat, not uncompressing the file, ...) For instance,
the stripzipext() could be called only in the constructor of the
BinaryFormat class.

Matthieu
-- 
French PhD student
Website : http://matthieu-brucher.developpez.com/
Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92
LinkedIn : http://www.linkedin.com/in/matthieubrucher
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.neuroimaging.scipy.org/pipermail/nipy-devel/attachments/20080418/b7710984/attachment.html 


More information about the Nipy-devel mailing list