Dear Shawn,
I'm afraid this warning message is actually very serious and goes way beyond a problem in the header.
It is saying that you are missing data values, and no amount of changing the header will restore this (unless the size of the image was incorrect in the header and a mismatch for the data).
In general the only solution to this problem is to reconvert from the original source (e.g. dicom) as this is almost certainly a corruption of the image.
All the best,
Mark
On 19 Feb 2014, at 19:21, Shawn Wang <[log in to unmask]> wrote:
> Hi all,
>
> Any idea on how to do this?
>
> It's long story: We got reconstructed .nii files from collaborators. Somehow when I looked at these file using fslview, there's something like this "WARNING: nifti_read_buffer data bytes needed = 2411010 data bytes input = 2411006
> number missing = 4 (set to 0)". I can't do registration correctly, either. Then I tried trouble shooting by comparing the nifti head of these .nii filed with those one which can be normally processed using FSL without warning msg. I find the differences are: vox_units, time_units, sfrom_orient (x/y/z) are set to "UNKOWN" in the problematic .nii file.
>
> My Questions are:
> 1. Could this (the missing info in the nifti head) be the underlying problem (causing the WARING and registration failure)?
> 2. How to fix the nifti head, i.e how to set the vox_units, time_units, sfrom_orient (x/y/z) value to something? (seems fsledithd cannot do the trick on these)
>
> Thanks!
>
> -Shawn-
|