Can you verify that the file is the right size?
Ian Malone wrote:
Hi,
I'm finding that mri_convert produces a read error when trying to convert some short analyze files to mgz, invoked as the following: mri_convert -it analyze -i `pwd`/reslice/00125-003-1.img -o reslice/mni.mgz
The output contains (the dimensions shown are correct): ERROR: premature end of file ERROR: Success (0) frame = 0, slice = 219, k=219, row = 155 nread = 171, nexpected = 172 fname = height = 156 width = 172 depth = 220
and: analyzeRead2(): error reading from file reslice/00125-003-1.img
The file in question is 11806080 bytes.
Using strace I can see that when the .img file is opened 1 byte is read from it before reading in blocks of 1024, and a final read of 383 bytes. Trying another short file (which works) this initial 1 byte read does not happen. Is this is bug? I can provide the files in question if needed.
Build stamp: freesurfer-Linux-rh9-stable-pub-v4.0.3
Kernel info: Linux 2.6.21.5-smp i686
Thanks, Ian Malone _______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer