Is there a way to GetMatrix from the base transform returned from ImageRegistrationMethod.Execute(…)? final_transform = registration_method.Execute(fixed_image, moving_image)
Final_transform doesn’t have access to GetMatrix even though str(final_matrix) shows the Matrix in string form.
The final_transform is a generic wrapper around a CompositeTransform, so if you only have one transformation inside you can get the specific transform this way:
There is an issue discussing if the return type should be changed here:
If you pass inPlace=True to SetInitialTransform then the same transform object provided in the argument is updated. This may be preferred to the additional conversions in the code @zivy provided.