align_epi_anat for monkey EPI image wrong

Hi AFNI experts,

I have been working with the PRIME-DE primate dataset and have made modifications to the MACAQUE_DEMO code accordingly. The individual I am focusing on does not involve the use of MION contrast agents. Initially, I attempted to achieve a rough alignment of all images to a NMT template using 3dZeropad and Align_Centers(fig A), as the initial T1w and EPI images exhibited poor alignment.

However, when utilizing the afni_proc command to generate the epi to anat script, I encountered significant exaggerated parameters in the anatomical images aligned to vr_base using align_epi_anat., for example:

align_epi_anat.py -anat2epi -anat sub-032205_anat_ns+orig \
       -suffix _al_junk                                   \
       -epi vr_base+orig -epi_base 0                      \
       -anat_has_skull no                                 \
       -epi_strip 3dSkullStrip                            \
       -skullstrip_opts -monkey                           \
       -cost lpc+ZZ                              \
       -feature_size 4                                    \
       -giant_move
       -volreg off -tshift off

Despite adjusting various parameters such as cost, feature_size, giant_move/big_move, and including skullstrip_opts, and applying 3drotate to vr_base by -10 degree, I have not been able to improve the results.

I suspect the problem may stem from the contrast/voxelsize of EPI images or because I overlooked parameters, such as feature_size, that could contribute to the problem? Can manual alignment be considered for better functional-to-structural alignment? I am interested in your advice on whether there are specific parameters or alternative methods that could address the alignment issues more effectively.

I sincerely appreciate your expertise, guidance, and suggestions in resolving this problem!

Best regards,
Yipeng

This is the actual data I have used for testing purposes. Thanks a lot!

data.zip

Howdy-

OK, I took a spin with the data. The voxel size, tissue contrast and EPI distortion cause some challenges (but that is not too abnormal).

Something I found useful was to polish up the anatomical a bit. I had already been skullstripped, and I found that unifizing it and applying a veeeery slight anisotropic blur to that result helped:

# unifize + anisotropically blur a wee bit
3dUnifize -prefix UNI.nii.gz -GM -Urad 14 sub-032205_anat_ns+orig.
3danisosmooth -noneg -prefix ANI.nii.gz -3D -iters 1 UNI.nii.gz

Within your AEA command, the main thing I tweaked was the feature size---4 seemed quite large for macaque anatomical structure.

align_epi_anat.py                          \
    -anat2epi                              \
    -anat            ANI.nii.gz            \
    -suffix          _al_junk              \
    -epi             vr_base+orig          \
    -epi_base        0                     \
    -anat_has_skull  no                    \
    -epi_strip       3dSkullStrip          \
    -cost            lpc+ZZ                \
    -feature_size    0.5                   \
    -giant_move                            \
    -volreg          off                   \
    -tshift          off

I think the resulting alignment (ulay=output anatomical; olay=EPI dset) looks quite reasonable for this dataset:

How does that seem?

--pt

Hi Paul-

Thank you for your advice. I followed your suggestions and made adjustments to the anat image, I’m so happy that the registration of the most(11/12) of individuals has significantly improved result! However, there are still some minor errors present, which I suspect may be due to EPI distortion. Luckily, the dataset I am working with provides field map files for EPI distortion correction.

I plan to perform EPI correction and will report back with my results. Thank you once again for your kindly help!!

Best regards,

yipeng

Hi, Yipeng-

That's great, glad that is mostly broadly useful. Indeed, there is some visible EPI distortion, but many of the sulcal/gyral features and interior structures match up well.

Happy to hear about how the next steps go.

--pt