Part of ants registration suite
ANTSUseDeformationFieldToGetAffineTransform \,zzzWarp.nii.gz load_ratio(ex: 0.01) \/[\,rigid | affine\/] \,OutAffine.txt \/[\,mask.nii.gz\/]
we expect the input deformation field in the same physical space as the images you want to
load_ratio: ratio of points to be loaded from deformation field (to save memory)
the mask gives the region from which points will be selected ...