[Insight-users] Similarity Transform

Luis Ibanez luis . ibanez at kitware . com
Wed, 23 Jul 2003 17:56:23 -0400


Hi Thomas,

The Similarity2DTransform is encoding parameters as
follows:

parameter[0] = scale
parameter[1] = rotation angle
parameter[2] = X coordinate of rotation center
parameter[3] = Y coordinate of rotation center
parameter[4] = Translation along X
parameter[5] = Translation along Y

It is possible for the transform to have translations
that are larger than the images. In such cases you probably
will receive messages (from itk exceptions) saying that the
moving image does not overlap the fixed image anymore.

That will indicate a failed registration, and you probably
will have to reconsider the registration parameters, in
particular the initial step length and the learning rate
(depending on the optimizer you are using).

But,... before going too far you may want do the
following checks:

1) Check the origin coordinates of the
    fixed and moving images. This is returned by
    the method image->GetOrigin().

2) Check the pixel spacing of the fixed and
    moving images. This is returned by the method
    image->GetSpacing().

3) Check the dimensions (number of pixels) of both
    images.


Combining this information you may want to verify the
overlap between both images in physical space (world
coordinates) before and after the registration.

Details on this are described in the SoftwareGuide
http://www . itk . org/ItkSoftwareGuide . pdf
Section 5.7.1, pdf-page 163: Resample Image Filter
The concepts of resampling are fundamental for
understanding the registration framework in ITK.

---

It is a bit surprising that the registration works
better if you permute rotation and translation...
rotation is measured in radians, while the scale is
a multiplicative factor.   I would suspect that the
center of rotation has not been set correctly....
Did you used the Center initializer for defining
the rotation center before starting the registration
process ?


Note that this transform having customized center of
rotation, its effect may be quite counter intuitive.
It is usually a good exercise to manually transform
a couple of points, in order to get a better feeling
of the effect of the transform parameters. For example,
the selection of the center of rotation allows to
induce any arbitrary translation. To be formal, this
transform doesn't need to have a explicit translation
since any translation can be obtained a the secondary
effect of a rotation around a carefully selected center
of rotation.

It may help you to print out the matrix + offset as
returned by the base class Rigid2DTransform with the
methods

    transform->GetRotationMatrix()
    transform->GetOffset()

You will notice that the Offset is not the same as
the translation returned by the Similarity transform
simply because it now combines the translation induced
by the rotation.

It is sometimes easier to evaluate the transform by
simply using it for resampling the moving image, instead
of trying to interpret the transform parameters. This is
done in most of the examples in Insight/Examples/Registration.



   Regards,


     Luis


--------------------------
thomas jejkal wrote:
> Hi!
> 
> I have an question about the similarity transform at "itk".
> Is it possible that there are some problems with the parameters?
> The results i got and the according transformation do not match because
> the final parameter 5 (xTranslation?) and 6 (yTranslation?) are  about 
> 100 or 200 millimeters and this isn't possible at image sizes of about 100 pixels. 
> But if i ignore the translation it is nearly correct. So, can you tell me what it could 
> be and why it also works quite well if the parameters 1 (Rotation?) and 2 (Scalation?) 
> are permuted!?
> 
> Thanks for your help!
> Greetings, Thomas.
> ______________________________________________________________________________
> ComputerBild (15-03) empfiehlt den besten Spam-Schutz:
> WEB.DE FreeMail - Deutschlands beste E-Mail - http://s . web . de/?mc=021125
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk . org
> http://www . itk . org/mailman/listinfo/insight-users
>