Reputation: 614
This is not a duplicate, please take the few seconds it'll take to read my question, I would be glad.
I'm currently using the RegistrationMethodClass from simpleITK registration. Due to there being a lot of noise in the fixed image (which could then be selected as comparison points in the metric, which selects points from fixed image), I wanted to try to register the other way around, using the clean mask image as the fixed image, and then applying the inverse of the returned transformation to this very same mask using the GetInverseTransform method from transform class.
Somethind like:
Resample(
img_mv, img,
Reg.Execute(img, img_mv).GetInverseTransform(), Linear, 0.0, img.GetPixelIDValue()
)
However, when I run into this line, I get the error:
AttributeError: 'Transform' object has no attribute 'GetInverseTransform'
Searched a while but there doesn't seem to be anything saying it's deprecated or it's been replaced by something else. There aren't many simpleITK users out there and little doc can be found aside from their official doc, which says I can use GetInverseTransform..
Does any of you know why this is happening / what would be the good alternative / replacement to get the inverse of the transformation ? I've been thinking it might be related to the "Simple" wrapper or the fact that it is a python bind of the c doc I linked, but couldn't find anything on that either.
Any help is appreciated, have a nice day !
Upvotes: 0
Views: 1465
Reputation: 1431
You appear to not have found the SimpleITK documentation for interface to the itk::SimpleITK::Transform class:
https://itk.org/SimpleITKDoxygen/html/classitk_1_1simple_1_1Transform.html
The error message indicates that SimpleITK Transform object does not have a "GetInverseTransform" method. The proper method to call is just "GetInverse".
What SimpleITK documentation says there is a GetInverseTransform method?
Upvotes: 1