You could iterate through your desired deformation field image, and for each pixel check whether it belongs to one of the masks, and if so calculate displacement for it using TransformContinuousIndexToPhysicalPoint and TransformPhysicalPointToIndex from image and TransformPoint from the corresponding linear transform. Pay attention to the direction of transform (moving to registered). Good luck!
1 Like