MRI image orientation

I have two mri images, both LAS orienation. But fsleyes tells me “Displaying Images with different orientation/fields of view”

Do they have the same orienation or is left and right somehow swapped?

They both have the same orientation, and the two header are almost identical, the only difference I see is the TR value: 2300 msec for one image 0 msec for the other.

If you want to compare two files, the diff command can be useful:

-  fslhd image1.nii.gz >> out1.txt
-  fslhd image2.nii.gz >> out2.txt
- diff out1.txt out2.txt

I agree with @jsein - the single precision floats store ~7 decimal places. Your prior output showed far fewer decimal places. I suspect these images are equivalent but not identical. Perhaps fsleyes should have a tolerance built in. Have you tried to overlay these images with MRIcroGL.

If you are particularly keen, you may want to look at my notes on Identical Versus Equivalent Results. The way computers store real numbers is extremely clever, but it is not how humans raised on the decimal system think about numbers.

1 Like

So these two images are different. I am just caring about the orientation and that in both images the left side is really the left side and for the right side vice versa.
Because I use fslswapdim and fslorient for the anatomical data to reorient to LAS then run freesurfer and fmrirprep. Fmriprep outputs in RAS, so I use fslswapdim and fslorient again for reorientation to LAS.
Best,
Stephan