Hi, thanks for your report.
On Thu, Sep 13, 2007 at 04:20:43PM -0400, Yaroslav Halchenko wrote: > $> python showbug.py > Differ: vox_offset 352.0 348.0 > ** ERROR (nifti_set_filename): failed to set prefix for '' > ** ERROR: nifti_convert_nhdr2nim: bad filename > Traceback (most recent call last): > File "showbug.py", line 58, in ? > ni2.updateHeader(hdr2) > File "/usr/lib/python2.4/site-packages/nifti/niftiimage.py", line 766, in > updateHeader > raise RuntimeError, \ > RuntimeError: Could not recreate NIfTI image struct from updated header. > > so we have absent filename and also vox_offset differs in saved and > not-saved versions. This look indeed like a bug -- I'm going to have a look at it today. > another issue I encountered is that other nifti files I saw they have 1 > in higher dimensions (in dim I mean) and I believe dim[5]==1 has some > meaning for something in nifti header format. > > I could not adjust it via modifying header's dim list -- after saving > they all remained 0s. So I guess they simply better be set to 1 whenever > we create niftiimage out of numpy array. This is already done/fixed in the latest release (0.20070905.1-1; currently in unstable). In particular FSLView didn't like 3d volumes with dim[4] set to 0 and crashed. Since 0.20070905.1 the whole dim array is initialized to ones. > cheers... sleep well... see you in few weeks ;-) ;-) Cheers, Michael -- GPG key: 1024D/3144BE0F Michael Hanke http://apsy.gse.uni-magdeburg.de/hanke ICQ: 48230050
signature.asc
Description: Digital signature