Print

Print


Hi,

I don't think this is a specific FLIRT error - it looks like it can't
read the nifti image correctly.  Two things are worth checking:
 - Is it in the right directory? The error looks like it cannot even
	find the file, so try going into that directory and/or specifying
	the full path to the file.  Also, check that it has a valid filename
	extension (.nii, .nii.gz, .hdr, .hdr.gz, .img, .img.gz)
 - Run "fslhd" on this image and see if that can read the information
	correctly.

If the first option doesn't help, but the second one works, also try
passing the image through "fslmaths" first (i.e. run:  fslmaths ref newref)
and then use newref instead and see if that works.

All the best,
	Mark

On 29 Jun 2011, at 18:10, Blake Dewey wrote:

> I have written two 2D images from MATLAB using the NIFTI toolbox. However when I try to run FLIRT with the -2D option it reports that it cannot read the header file of my .nii file. I have also tried creating the image using MIPAV. 
> 
> flirt -in input -ref ref -out temp -omat temp.mat -2D
> ** ERROR (nifti_image_read): failed to find header file for 'ref'
> ** ERROR: nifti_image_open(ref): bad header info
> Error: failed to open file ref
> ERROR: Could not open image ref
> Image Exception : #22 :: Failed to read volume ref
> terminate called after throwing an instance of 'RBD_COMMON::BaseException'
> Abort trap
> 
> Any suggestions?
> 
> Blake Dewey
> Vanderbilt University Institute of Imaging Science
>