When I do the registration of two analogous images, the angles of the transform (Similarity3DTransform) gives as had not registred. Where I can change the script to do that rotation parameter right? Seems that the script is such that the registration is not done in one angle.
Another question, when I use the metric Mutual Information the scaling parameter comes 0.98XXX and with the metric MSE the scaling parameter comes 1.02XXX. The Mutual Information one seems Ok. How you explain that?
The right scale of the image is 0.99XX. Because it is made, in the registration, first the scale a next rotation and translation compensation did not gave good results.
I am getting good results doing a registration on Rotation+Translation and next a registration on Scale+Rotation+Translation. In the second registration the Rotation and Translation is almost not compensated as it was already compensated in the first registration.
Are there some way to do a single registration and define to compensate first the Rotation and Translation and next the Scale instead of Scale First?
The error you are getting is due to the fact that a composite transform can contain all transformation types and hence may not have a transform type with center which is required by the initializer (e.g. BSplineTransform).
As @dzenanz nicely suggested, one option of performing a multi-stage registration where you increase the degrees of freedom at each stage is to use a composite transform. Please note that with the upcoming release of SimpleITK 2.0 the generic Transform will no longer represent a CompositeTransform, we now have an explicit class called CompositeTransform. You can install the latest pre-release build and see the transformation notebook for usage examples.
Now in your case, you can simplify this and do not need to use the CompositeTransform:
Run the registration using the initial_transform (SetInitialTransform possibly with inPlace=True).
Create a Similarity3DTransform from the Euler3DTransform obtained in the previous step (see the transformations notebook section titled “Rigid to Similarity [3D]”).
Run the registration using the similarity transform you created as the initial transform, compute in place.