-
-
Notifications
You must be signed in to change notification settings - Fork 383
Warp and reorient a diffusion tensor image
Philip Cook edited this page Mar 17, 2016
·
28 revisions
Moving image: dt.nii.gz
Fixed image: fixed.nii.gz
-
Run
antsRegistration
orantsRegistrationSyN[quick].sh
, registering the DT (by proxy, eg using FA, B0, or some other scalar image in the DT space) to the fixed image. This produces the warpsmovingDT_ToFixed1Warp.nii.gz
andmovingDT_ToFixed0GenericAffine.mat
. -
Apply these transforms to deform the tensor image. After this the tensors will be correctly located in the fixed space, but they retain their original orientation.
antsApplyTransforms -d 3 -e 2 -r fixed.nii.gz -i dt.nii.gz \
-o dtDeformed.nii.gz -t movingDT_ToFixed1Warp.nii.gz \
-t movingDT_ToFixed0GenericAffine.mat -r fixed.nii.gz
- Compose the warps into a single warp file for
ReorientTensorImage
antsApplyTransforms -d 3 -r fixed.nii.gz -o [dtCombinedWarp.nii.gz,1] \
-t movingDT_ToFixed1Warp.nii.gz -t movingDT_ToFixed0GenericAffine.mat \
-r fixed.nii.gz
- Apply the reorientation to the deformed tensor image
ReorientTensor 3 dtDeformed.nii.gz dtReoriented.nii.gz \
dtCombinedWarp.nii.gz