Elastix, why applying a transform on image does not produce same image as the generated output at registration time?


I have two MR images (fixed, moving) and do the Elastix “rigid” registration in Slicer (5.0.2):

after this process finishes, I have a generated (registered) moving image (called Volume_7) and a transformation (called Transform_1):

now I transform the moving image with the Transform_1 and expect its output should be the same as Volume_7. I thought it should be a valid assumption, unless I misunderstood a part or so?

this is moving after being transformed by this transformation:

and this is moving after being registered on fixed:

could you please help me in this?

Both are correct and about the same in physical space, they just have different geometry (origin, spacing, axis directions).

Elastix is based on the ITK library. ITK cannot easily extrapolate transforms, so usually it only computes transformed moving image in the fixed volume’s geometry. It simply cuts off any parts of the transformed moving image that is outside of the fixed image.

Slicer uses both ITK and VTK, and it takes advantage of VTK’s more advanced transform infrastructure, which can smoothly extrapolate and invert any transforms on-the-fly. The result is that Slicer can harden the transform on the moving image without cutting off any part of the image. If harden a rigid transform then operation is lossless (the image is not resampled). If you prefer setting a specific geometry then you can resample the image on a chosen reference image.

1 Like