Hello AFNI,
Thanks to --pt I have now the solution for the coregistration of the functional images in macaques:
I had difficulty with nonlinear warping because large shifts were involved:
"basically, the memory usage can be quite high, because the warp field must cover a box that covers both input and output datasets-- and a large shift means that one would need a large box (memory consumption grows like an edge length cubed, because of the three dimensionality of dsets).
So, at present @animal_warper assumes that your input datasets are well centered; there is actually a bit of inconsistency in how it deals with the 'original' and shifted dsets. I think what we will do is the following:
+ have a "native space" skullstripped anatomical that is overlays perfectly on the "shifted" dataset there, that way there won't be any relative offset between input anat dsets, and the WARP field won't get made quite large.
+ and then, one would want the EPI to overlay well on that shifted anat, again, so that the (concatenated) WARP used in the end is not huge.
here is the script I used to adjust this in your data, and the alignment looked good at the end (final_epi_vr_base_min_outlier+tlrc.BRIK and anat_final.sub-003+tlrc.BRIK both overlay each other and the NMT template well);
---------------------------------------------------------------------------------------------
# recenter anat to be on the "shifted" dset from @animal_warper: that
# is really where warps are made to/from
set ref_dset = ${aw_dir}/a00_deob_shft.nii.gz
set new_ori = `3dinfo -orient ${ref_dset}`
# recenter the '-copy_anat ..' dset
3dresample \
-prefix a00_deob_ns_RECEN.nii.gz \
-orient ${new_ori} \
-input ${aw_dir}/a00_deob_ns.nii.gz
3drefit \
-duporigin ${ref_dset} \
a00_deob_ns_RECEN.nii.gz
#### Recenter the EPI '-dsets ..' dset(s)
# also, move the EPI to be centered (approximately) on that new spot,
# so the WARP dset doesn't have to stretch too far
@Align_Centers \
-cm \
-base a00_deob_ns_RECEN.nii.gz \
-dset LONGER_e00_deob.nii \
-prefix LONGER_e00_deob_RECEN.nii
afni_proc.py \
-subj_id ${subj} \
-script proc.${subj} \
-scr_overwrite \
-out_dir ${subj}.results \
-blocks tshift align tlrc volreg \
-dsets LONGER_e00_deob_RECEN.nii \
-copy_anat a00_deob_ns_RECEN.nii.gz \
-anat_has_skull no \
-volreg_align_to MIN_OUTLIER \
-volreg_align_e2a \
-volreg_tlrc_warp \
-align_opts_aea \
-epi_strip 3dAutomask \
-cost lpc+zz \
-giant_move \
-check_flip \
-tlrc_base ${refvol} \
-tlrc_NL_warp \
-tlrc_NL_warped_dsets \
${aw_dir}/a00_deob_warp2std_nsu.nii.gz \
${aw_dir}/a00_deob_shft_al2std_mat.aff12.1D \
${aw_dir}/a00_deob_shft_WARP.nii.gz \
-html_review_style pythonic \
-execute
"
--pt
I big thank you at --pt that solve this problem!
Clément