Elastix displacement vector field output

Operating system: Win7
Slicer version: 4.11.0-2019-08-13 r28438

Hi all,

I am registering two ct images using SlicerElastix (Preset-generic (all)). Now I want to get the displacement field merely indicating bspline transform. Can I just subtract the linear part and how to accomplish this using python interactor? Besides, I would like to get the displacement of specific points in moving image. Could I invert displacement field and save it to nrrd file? I have looked through the discussion thread but still have no idea how to do that.

Hope for some advice! Your help is highly appreciated!!

Crayon

You can “Split” button in Transforms module (or call Split method of the transform node) to split a composite transform to its components.

You can set all your input points in a vtkMRMLMarkupsFiducialNode, apply the transform, and get the transformed point coordinates using GetNthControlPointPositionWorld. There are also convenience functions in slicer.util to get/set point positions in Python from numpy arrays.

You can invert a transform by clicking “Invert” click (or call Inverse method of the transform node) and export it to displacement field using “Convert” section of Transforms module (or from Python, using transforms module logic).