Hi Doug,
Yes, we spotted a problem with the sourceforge niftiio library the
other day.
They define the number of voxels as an int, rather than long. We
changed
this internally about two weeks ago and it seems to work. So just
change
nifti1_io.h and nifti1_io.c according to the diffs below.
Cheers,
MJ
nifti1_io.h
85c85
< long nvox ; /*!< number of voxels =
nx*ny*nz*...*nw */
---
> int nvox ; /*!< number of voxels =
nx*ny*nz*...*nw */
nifti1_io.c
4190c4190
< else fprintf(stderr,"** ERROR: N_image_load: bad params (%p,
%d,%ld)\n",
---
> else fprintf(stderr,"** ERROR: N_image_load: bad params
(%p,%d,%d)\n",
4527c4527
< "** ERROR: NWAD: wrote only %d of %ld bytes to file\n",
---
> "** ERROR: NWAD: wrote only %d of %d bytes to file\n",
5389c5389
< sprintf( buf+strlen(buf) , " nvox = '%ld'\n" , nim->nvox ) ;
---
> sprintf( buf+strlen(buf) , " nvox = '%d'\n" , nim->nvox ) ;
5893c5893
< fprintf(stderr,"** NVd: nvox does not match dimension product
(%ld, %d)\n",
---
> fprintf(stderr,"** NVd: nvox does not match dimension product
(%d, %d)\n",
On 20 Nov 2008, at 19:49, Doug Greve wrote:
> I'm having problems using some of the fsl tools on a large nifti file:
>
> Using 4.1.1,
>
> ls -l /tmp/dti.nii
> -rw-rw-rw- 1 benner benner 5677056352 Nov 17 15:13 /tmp/dti.nii
>
> fslhd /tmp/dti.nii
> ** ERROR: nifti_image_open(/tmp/dti): bad header info
> Error: failed to open file /tmp/dti
> ERROR: Could not open file
>
> file /autofs/space/lyon_006/pubsw/Linux2-2.3-x86_64/packages/fsl.
> 64bit/4.1.1/bin/fslhd
>
> /autofs/space/lyon_006/pubsw/Linux2-2.3-x86_64/packages/fsl.64bit/
> 4.1.1/bin/fslhd: ELF 64-bit LSB executable, AMD x86-64, version 1
> (SYSV), for GNU/Linux 2.4.0, dynamically linked (uses shared libs),
> for GNU/Linux 2.4.0, not stripped
>
> AFNI seems to fail on it too, but our (FreeSurfer) tools are fine.
>
> Any ideas?
>
> thanks
>
> doug
>
>
>
>
> --
> Douglas N. Greve, Ph.D.
> MGH-NMR Center
> [log in to unmask]
> Phone Number: 617-724-2358 Fax: 617-726-7422
>
> In order to help us help you, please follow the steps in:
> surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
>
|