I’m trying to calculate the inverse transformation of a BSpline Transformation and I’m following the instructions of this link here in the Discourse. Here is the code I’m using:
#Calculating the inverse of the Bspline disp_field_bs = sitk.DisplacementFieldTransform(BS_result) BS_inverse = disp_field_bs.GetInverseDisplacementField()
The problem is that I’m getting some error:
sitk::ERROR: Transform is not of type DisplacementFieldTransform!
I’ve checked the documentation and the DisplacementFieldTransform class has a constructor which accepts a Transformation. So what is the problem here?