Resampling a displacement-field transformed image

Hi guys,
I am using a DisplacementField transformation and resample the image with the ResampleImageFilter. Everything is working great! Now I am wondering how the resample method is working? Does it invoke the InverseDisplacementFieldImageFilter to compute the inverse transformation to make use of the backward mapping method or is there another method used?

Would really appreciate a short feedback! Thanks a lot!

Welcome to the community Nino!

In ITK, transforms directly provide mapping from moving image to the fixed image, so no inversion is necessary to apply a DisplacementField. And it is done this way precisely so no inversion is necessary for the resampling of the source image to the target image grid.

1 Like

Note that you still need to invert the resampling transform to transform points, lines, surface meshes, etc. It would be great if ITK had dynamic inverse computation as VTK has (VTK can compute inverse transforms at arbitrary points - without computing a full inverse field - using an iterative scheme and smooth boundary constraint; as described here).

Hi Andras, thanks for the link. If I find some time I would be happy to contribute that to the ITK community :slight_smile:

1 Like

Thanks a lot for the fast reply Dzenan.! I truly forgot that a transform in a resampling operation defines the transform from the output space to the input space .

1 Like

Note that it is already implemented in VTK, so you just need to port it to the ITK transforms framework.

Hi guys!
I am not following history of ITK but there is already InverseDisplacementFieldImageFilter for inversion of DisplacementField. But back to the implementation of various inversions, is there any progress in the implementation of GetInverseTransform() in DisplacementFieldTransform and also in BSplineTransform in ITK? It is already in VTK and it is working like a charm in Slicer which I am using for checking my results and planning new things, but I am lacking it in ITK. Is anybody working on it or what is the plan since this functionality is really missing? Last note: My registration app simply crashes when I am trying to get the inverse of BSplineTransform inside CompositeTransform.