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.
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