Underlaid and overlaid images are not matched in the same position in AFNI viewer ,Ubuntu, win 10

Hi all,

I’m a novice in AFNI. Recently, I installed it on Ubuntu 18.0.4 on WSL in my laptop with win 10 OS. It goes well calling the inbuilt AFNI functions to perform analysis by ubuntu command window. However, in the major GUI window of AFNI, if I choose to load n structural nifti image as an underlay, a functional nifti image as an overlay, the two images won’t be fit together. Instead, they will be away from each other (I have attached the snapshot of the weird display in AFNI to this post). I wonder if anyone could give me some advice to fix this problem!



Well, there can be a couple things making this happen.

The header information in each of the datasets might be correct as is, and the recorded field of view (FOV) for each dset might be right. The scanner coordinates for each of those dsets might be correctly recorded, based on how the data was acquired.

It is possible that the scanner coordinate information for one or more of those datasets is incorrect, as well-- perhaps either in the original DICOM data stored from the scanner, or perhaps in going from DICOM to NIFTI (or other dset) format. How did you convert the DICOMs for this data?

It is possible that one or more of these datasets was acquired in oblique coordinates-- that is, there is an extra transformation stored in the header that records how to move the dset to the scanner coordinates, but the AFNI GUI will show them in their oblique coordinates. And if one or both of those dsets are in oblique coordinates, which for different acquisitions are generally not the same, then the dsets wouldn’t appear to overlap as well as they would in scanner coords. To check if either of your dsets has obliquity information (that isn’t being applied by the viewer), you can run this command on them:

3dinfo -obliquity DATASETNAME

… and see if it returns a nonzero result. (Obliquity is defined by a 3x4 matrix of numbers—and affine transformation—but this will calculate the largest angle of axis rotational change, and report that.)


Thank you for your sharing! I’m gonna follow your advice to understand more about the data structure that could be dealt with by AFNI. I’m a little bit struggling with it. But your information did help me to realize AFNI run in a different way from other neuroimaging programs and give me some tips to understand the differences between them.