I have some questions about the inverse of transformation.
Now I have contours in fixed volume and would like to get transformed one in moving volume. I first created linear transformation (moving2fixed, rigid+scale+affine) using General Registration (BRAINS). I clicked “Invert” button in “Edit” section, but found that only when the “Information” was “Transform from parent” did the inverse transform be correct. This was totally different from the transform created by elastix and also bspline transform in General (BRAINS) (“Transform to parent” be correct which I think is probably the right one?).
Besides, only when I ticked “Force grid output transform” square box in elastix “Advanced” section (I recently find it in nightly 4.11.0-2019-08-10) did the inverse transform be correct. If I did not click on the box then I got linear and b-spline registration results separately using “generic (all)” preset (shown in transform “Information” section). And the inverse transform also went wrong. The results are shown below.
I am not quite sure about the cause. Could you give some ideas? Thanks a lot!
Parsing Elastix transform files and retrieving native linear and bspline transform is a very new feature. Based on our testing so far, it works well, but there may be still issues with certain transforms. We have made a couple of fixes since August 10, so please try again with the latest Slicer preview version (or update your SlicerElastix extension in latest Slicer stable version).
By the way, why do you need the inverse transform manually? Slicer uses the forward/inverse transform as appropriate, depending on what nodes you need to transform (e.g., uses “from parent” transform for images and “to parent” for models and points).
Thank you for your efforts. This problem does not exist in the latest Slicer preview version (Slicer-4.11.0-2019-08-13-win-amd64 revision 28438).
Besides, I am sorry that I don’t quite understand your answer. I think “from parent” and “to parent” indicate the transform direction (“from parent” means from moving to fixed while “to parent” means from fixed to moving?), regardless of the nodes you need to transform (image, segment or point)?
For example, I have contours in fixed volume and would like to get transformed one in moving volume. Then only when the “Transform Information” was “Transform to parent” did the transform be correct (If not I need to manually click “Invert” button in “Edit” section).
I wonder if I have misused the function. Thanks a lot.
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).