Inverting Elastix transform

The registration module assumes that the fixed image = parent and moving image = child in the transform tree.

Therefore, if you have contours defined in the parent’s coordinate system and you need that in the child’s coordinate system then you need to invert the transform and apply it to the contour in the parent’s coordinate system.

Note that internally a transform can store “to parent” (and compute “from parent”) or store “from parent” (and compute “to parent”). Since computation of inverse can take magnitudes more time, usually image registration methods compute the “from parent”, because images require the “from parent” transform for resampling (points and meshes require “to parent” transform, as you don’t resample them but directly transform their point coordinates).