Given ROIs fixedLabels.nii.gz, to be resampled into the space of movingImage.nii.gz
, we would use the same warps:
${ANTSPATH}antsApplyTransforms \-d 3 \-i fixedImage.nii.gz \-r movingImage.nii.gz \
-t [movingToFixed_0GenericAffine.mat, 1] \
-t movingToFixed_1InverseWarp.nii.gz \-n GenericLabel-o fixedToMovingDeformed.nii.gz
but we add the option -n GenericLabel
to specify interpolation that preserves label intensities
antsRegistrationSyN.sh -d 3 -n 20 -f bo.nii.gz -m MNI152_T1_1mm_brain.nii.gz -o regmni2t
antsApplyTransforms -d 3 -i mask.nii.gz -o testmask2template.nii.gz -r bo.nii.gz -t regmni2t1Warp.nii.gz -t regmni2t0GenericAffine.mat -n GenericLabel