Besides what @jdtournier said, here is a working example on how to register two 3D images (anatomical and b0) and applying the warp to the DWI data using mrtransform.
antsRegistration --verbose 1 --dimensionality 3 --float 0 --output [out,outWarped.nii.gz,outInverseWarped.nii.gz] --interpolation Linear --use-histogram-matching 0 --winsorize-image-intensities [0.005,0.995] --initial-moving-transform [anat.nii,b0.nii,1] --transform Rigid[0.1] --metric MI[anat.nii,b0.nii,1,32,Regular,0.25] --convergence [1000x500x250x100,1e-6,10] --shrink-factors 8x4x2x1 --smoothing-sigmas 3x2x1x0vox --transform Affine[0.1] --metric MI[anat.nii,b0.nii,1,32,Regular,0.25] --convergence [1000x500x250x100,1e-6,10] --shrink-factors 8x4x2x1 --smoothing-sigmas 3x2x1x0vox --transform SyN[0.1,3,0] --metric CC[anat.nii,b0.nii,1,4] --convergence [100x70x50x20,1e-6,10] --shrink-factors 8x4x2x1 --smoothing-sigmas 3x2x1x0vox
antsApplyTransforms -d 3 -e scalar -i b0.nii -r anat.nii -o b0_ants_out.nii.gz --interpolation Linear --transform out1Warp.nii.gz --transform out0GenericAffine.mat
warpinit dwi.nii identity_warp[].nii -force
for i in {0..2}; do
WarpImageMultiTransform 3 identity_warp${i}.nii mrtrix_warp${i}.nii -R anat.nii out1Warp.nii.gz out0GenericAffine.mat;
done;
warpcorrect mrtrix_warp[].nii mrtrix_warp_corrected.mif -force
mrtransform dwi.mif -warp mrtrix_warp_corrected.mif warped_fod_image.mif -force
mrview warped_fod_image.mif -overlay.load anat.nii -overlay.load b0_ants_out.nii.gz