anat_epi alignment

Dear AFNI experts,

I used align_epi_anat.py to align anat and epi files before running the proc py using the below script.

align_epi_anat.py
-epi2anat
-anat “$subj”.“$cond”_SurfVol.nii
-epi epi.“$subj”.“$cond”.slicemocoxy_afni.slomoco+orig
-epi_base 0
-anat_has_skull yes
-epi_strip 3dAutomask
-giant_move
-volreg off
-overwrite

Pre-alignment (upper image) was not bad but I wanted to make it better so ran the script, but I found that epi image became completely off from anat after running the align_epi_anat (below image). Could you please let me know how can I fix this?

Best,
JW

Hi-

If the alignment is good to start, you shouldn’t need “-giant_move”: that can push things further afield in the broadened parameter search. (Though I admit I am surprised to see that happen here.)

Just to check for other spatial information, what is the output of:


3dinfo -obliquity -prefix "$subj"."$cond"_SurfVol.nii  epi."$subj"."$cond".slicemocoxy_afni.slomoco+orig

?

–pt

Hi pt,

Thank you for checking this! Below is the result of the command you suggested.

0.000 “$subj”.“$cond”_SurfVol.nii
0.000 epi.“$subj”.“$cond”.slicemocoxy_afni.slomoco+orig

I rant the script without the -giant_move, but there are still misalignments (see the attached image).

Best,
JW

There isn’t a lot of structure in the EPI data, so the typical cost function (lpc/lpc+ZZ) probably won’t work. Try using the “-cost lpa”, “-cost lpa+ZZ” or “-cost nmi”. All these will work better for this kind of data.

Hi Daniel,

Added -cost lpa and it works. Thank you!

Best,
JW

Dear AFNI experts,

I have another issue with the alignment using the below script.

align_epi_anat.py
-epi2anat
-anat “$subj”.“$cond”_SurfVol.nii
-epi epi.“$subj”.“$cond”.slicemocoxy_afni.slomoco+orig
-epi_base 0
-anat_has_skull yes
-epi_strip 3dAutomask
-cost lpa
-volreg off
-overwrite

I wanted to fix the alignment in the left part using the script above, but there were no changes pre (upper image) and post (lower image) alignment. Could you please advise on this?

Best,
JW

You might try -big_move or -giant_move. The other cost functions might work for this too.