Native space MPRAGE image origin

Dear AFNI experts,

I have a question regarding how AFNI sets the image origin (0,0,0) of the mprage (in native space) and EPI images (both in native space).

I have been using both AFNI and SPM to view MPRAGE/ANAT images, and some subjects data show no problem - same origin actually for both programs. But for certain subjects, the origin viewed using AFNI seems to be bit off from the medial (towards right), whereas the same image viewed under SPM, the origin is located in the center (in the medial location). But when I overlay EPI image (converted to nifti) on top of the anatomical image, the alignment is off when I view the images under SPM, while AFNI somehow flickers during viewing and re-adjusts (?), to show aligned image.

I am concerned as I preprocessed all of my data under AFNI, and converted the files to nifti, and I’m analyzing my data under MATLAB and sometimes call SPM functions to read data (using the voxel coordinates)/write them. I checked my functionals mask that I generated under MATLAB were not well aligned to its native MPRAGE when I viewed them under SPM, but it looks fine under AFNI (even I am viewing exactly the same images) - but not for all subjects, for certain ones it is severe.

I wonder whether there are some extra options I have to specify when I convert BRIK files to nifti format…? or need an extra 3drefit call required?? This is not a concern about the orientation flip, SPM viewer flips automatically to neurological order, whereas AFNI shows in RAI…

Thanks in advance!

My guess is that differences come about from the way the programs handle oblique data, but there are also differences in the way we handle missing coordinate information from the headers of the data. AFNI displays data only as if it were cardinal data. The closest cardinal orientation is assumed. Differing obliquity won’t match properly in the GUI until alignment brings them onto the same orientation grid. You can see more about that there. In contrast to other packages, AFNI will not assume any orientation for data that is missing information in the header, and it will report an error. You may want to make copies of the datasets and remove the obliquity of all aligned datasets. I would expect all the viewers to show the datasets equivalently at that point.

Dear Daniel

Thank you very much for your input!
I think the viewer actually seem to pad some extra spaces when the coordinate along Left-Right is not completely symmetric (under SPM) while AFNI doesn’t do so.

Best, Michelle