Hi all,
I would be grateful for some more help…
As I said in the previous thread, my goal is to align an NHP T2 to the NMT template. Direct alignment does not work (in my hands) so I am using the same animal’s T1 as an intermediate.
Step 1 is to align T1 to the template using @animal_warper and that works fine.
Step 2 is to align T2 and T1 and I am using align_epi_anat.py for that. I decided to go with rigid body alignment - both T1 and T2 have problems due to headpost artifacts and, in case of T2, incompleteness, and did not want these to possibly mess up with the entire volume by trying to introducing shear or size change. Direct comparison on a test animal does suggest that rigid body fits more sensibly than affine.
However, T2, though in the same animal, has a crucial difference - an enlargement of a gyrus due to treatment. This leads to misalignment of this region using rigid body - and that’s bad, because this is the area that interests me. I wish I had a T1 taken at the same time with the enlargement, but I don’t.
So I tried
Step 3, which is following the rigid body alignment with an additional non-linear warp using 3dQwarp. The logic (naive?) was that if the volumes are initially well aligned using rigid body, the non-linear warp will not mess to much and mostly affect the enlarged gyrus. With some tuning (mainly -noZdis and -nmi) this seems to be working.
The question is how I put all of this together. I have a linear and nonlinear T1-template warps from Step 1, a linear T2-T1 warp from Step2, and a non-linear T2-T1 warp from Step3.
My plan is to combine the linear warps using cat_matvec and the nonlinear ones with 3dNwarpCat, and then apply them to T2 with 3dNwarpApply, ending up with the T2 in the template space.
I can do the former, but the latter fails because the nonlinear warps are on different grids.
What is the best way to address that? My first idea was to resample the subject T1 using NMT as the master, and then perform Step 3. The alignment worked, but not only the FOV (correct term?) was wrong with much of the bottom of the brain outside the image, but 3dNwarpCat again said “warp from dataset ‘/media/sf_ACC_LESION/ALIGN/FROH/T2_NL_result/FROH_T2post_RB_NL_WARP+tlrc’ doesn’t match earlier input geometry”>
So I guess this not the correct approach… but what is?
Commands I’ve been using:
Step 1:
@animal_warper -base ${templNMT} \
-input ${subj}_T1pre_crop+orig \
-atlas_followers ${atlasNMT} \
-outdir aw_results_T1 \
-no_surfaces \
-align_centers_meth cm \
-skullstrip ${brainmaskNMT} \
-maxlev 10 \
-base_abbrev NMT \
-input_abbrev ${subj} \
-atlas_abbrevs ARM
Step 2
align_epi_anat.py -epi ${subj}_T2post_crop+orig \
-anat ${aligndir}${subj}/${subj}_T1pre_crop+orig \
-epi_base 0 \
-epi2anat \
-partial_coverage \
-rigid_body \
-suffix _al_RB \
-anat_has_skull yes \
-epi_strip None \
-tshift off \
-volreg off \
-ex_mode echo \
-output_dir AEA_results_T2 \
-big_move \
-cmass cmass+xz \
-master_epi BASE
Step 3
3dQwarp -base ${subj}_T1pre_crop+orig \
-source ${subj}_T2post_crop_al_RB+orig \
-prefix ${subj}_T2post_RB_NL \
-resample \
-nmi \
-expad 10 \
-noZdis \
-minpatch 19