I will preface by apologizing for the silly question…

My general pipeline uses the script, however, I have 2 animals where the original EPI and anatomical images have better alignment than the output from the align_epi_anat script. Is it necessary to perform alignment between those images prior to registering to a template if it doesn’t align as well as the originals do?

Thanks in advance,


No, but I’d like to figure out why. If you like, you can upload the datasets to me.

Hi Daniel!

Would you like me to send it to your email or upload it here?



I PM’ed you instructions.

The contrast in the EPI dataset doesn’t have bright CSF relative to the tissue, and the default alignment relies on that. However, the alignment works well with lpa or nmi cost functions instead of the default for anat to epi alignment cost function of lpc or lpc+ZZ. -cost lpa -multi_cost nmi -anat anat_strip+orig. -dset2_strip None -epi rest_am+orig. -epi_base 0 -dset1_strip None -suffix _al2epi2 -deoblique off -overwrite