[Pkg-exppsy-pynifti] pyNifti shifts images
Michael Hanke
michael.hanke at gmail.com
Tue Mar 16 18:00:13 UTC 2010
Hey,
On Tue, Mar 16, 2010 at 04:00:04PM +0100, Bertelsen, Alvaro wrote:
> Hello everyone,
>
> pyNifti is producing a shift in my images for a reason I don't
> understand and I would be grateful if anybody could help me to fix
> this.
>
> For example, I tested the following script:
>
> >>> import nifti nim = nifti.NiftiImage('before.nii.gz')
> >>> nim.setFilename('after.nii.gz') nim.save()
>
> ...which should produce identical images. However, after.nii.gz is
> shifted in the LR direction, almost by half of its field-of-view. Does
> anyone know why this problem happens and how to fix it? I am attaching
> both images with this message.
Nobody has discovered the actual cause of this problem, but it only
exists for certain combinations of libnifti and libz. If you switch off
compression it will save proper images.
This one
http://nipy.sourceforge.net/nibabel/
should do it right and will hopefully come to life very soon.
Sorry,
Michael
--
GPG key: 1024D/3144BE0F Michael Hanke
http://mih.voxindeserto.de
More information about the Pkg-exppsy-pynifti
mailing list