Inverse of BSpline transform

I’m using the following code to generate an inverse transform of a BSpline transform. However, no matter what my “outputTransform” is, the “inverseOutputTransform” is all zeros. Is there anything wrong of using GetInverse() on BSpline transform? It worked fine when I used rigid transform.

Thanks a lot!

TransformType::Pointer outputTransform = TransformType::New();
TransformType::Pointer inverseOutputTransform = TransformType::New();


Hello Ray,

The computation of the inverse of a BSpline transform is not implemented in ITK. The way to do it is (as discussed in this mailing list thread):

  • Compute the deformation field corresponding to your BSpline
  • Inverse your deformation field (there are multiple implementations in ITK to do this, such as 1 and 2). There is also a remote module that allows to compute this.
  • Use this inverse transform after making sure that it has been sampled in the output image space

Hope this helps,