Hi, afni experts
I am using align_epi_anat.py to align some epi and anat data. I used -anat2epi option. After I obtained the transformation file, I warped anat to epi, and also epi to anat. The epi2anat data seems sane, indicating a good alignment. But the anat2epi file looks weird. One issue is that, my epi and anat data were collected in different sessions, and thus they are apart.
I did something as below
do the alignment
-epi epi.nii.gz -epi_base 0
-volreg off -tshift off -overwrite -giant_move -rigid_body\
convert the xfm
!cat_matvec -ONELINE anat_anat2epi.nii.gz_mat.aff12.1D -I > epi2anat.aff12.1D
warp epi 2 anat
!3dAllineate -base anat.nii.gz
-mast_dxyz 2 -overwrite
warp anat 2 epi
!3dAllineate -base epi.nii.gz
-master epi.nii.gz -overwrite
Are either of those data sets appreciably oblique?
3dinfo -obliquity DSET
You should be able to check your align_epi_anat.py results by overlaying the output file with the “_anat2epi*” suffix on it on the base EPI data set. How does that look if you open those up in AFNI?
Try viewing these in the afni GUI instead. The obliquity is handled differently in the GUI than in some other packages, and that may confusing you. Also consider using the -epi2anat option on align_epi_anat.py to invert and apply the transformation. The rigid_body option is rarely used, so that’s surprising to see here. Usually we try to take care of some distortion with the full affine transformation. The rigid body parameters here limit the alignment to only translation and rotation, and not shearing or scaling. That’s fine if you want it, but just be aware of what it is. These parameters are also not the rigid equivalent transformation parameters computed using the full affine transformation, but extracting only the rigid part of that transformation, perhaps a subtle but important difference.