What I can update here is that, if I inverse-apply the anat.un_shft.1D (given by auto_warp.py) to the output (i.e., inverse-warped atlas), it gave a somewhat good match between the inverse-warped atlas and the individual's anatomical image in the native space. However, a few top slices of the inverse-warped atlas were missing (see the sagittal view of my previous post), probably due to the previous displacement. So I just added the anat.un_shft.1D (firstly converted to anat.un_shft.aff12.1D) at the end of -nwarp option in 3dNwarpApply shown as below:
3dNwarpApply -master subject_t1.nii -dxyz 2 -source atlas_masks.nii -iwarp -nwarp 'anat.un.aff.qw_WARP.nii anat.un.aff.nii.Xaff.1D anat.un_shft.aff12.1D' -ainterp NN -prefix atlas_native_space.nii
Then, it gave a near-perfect match between the inverse-warped atlas and the anatomical image in the native space. I am not sure if this is the correct way to achieve my goal, although the outcome looks good. It is probably because at the very beginning of auto_warp.py, the program made such a shift to the image, but have not included it when considering the -iwarp option. Any thoughts?
Best,
Qiuhai