[Insight-users] Re: Quaternion Parameters

Luis Ibanez luis.ibanez at kitware.com
Sat Oct 2 20:31:52 EDT 2004


Hi Andy,

The four components of an unit quaternion can be associated
to a rotation axis and a rotation angle. The four first
components that you get in the parameter array are:

        p0 =  sin( angle / 2 ) * Ax
        p1 =  sin( angle / 2 ) * Ay
        p2 =  sin( angle / 2 ) * Az
        p3 =  cos( angle / 2 )

Where (Ax,Ay,Az) are the components of the rotation axis.
and "angle" is the rotation angle.

The Quaternion operation that correspond to a rotation
by half the current one is the *square root* of the
quaternion.

If you use the quaternion components and initialize with them
an itk::Versor, then you can use the current SquareRoot()
method in the itk::Versor class.

http://www.itk.org/Insight/Doxygen/html/classitk_1_1Versor.html

            A "Versor" is a Unit Quaternion.

"Versor" is the appropriate geometric object to use in order to
represent rotation. Quaternions are the equivalent of a Versor
combined with Scaling. Versors where introduced by Hamilton in
his book "Elements of Quaternions" in 1866. The same book
introduced the terms "Scalar" and "Vector".


For more details in Quaternions, please look at the Tutorials:

      http://www.itk.org/HTML/Tutorials.htm

In particular to the two sessions

- http://www.itk.org/CourseWare/Training/QuaternionsI.pdf

- http://www.itk.org/CourseWare/Training/QuaternionsII.pdf



Regards,


    Luis



------------------
Andy Eow wrote:

> Hi,
>  
> Have a question regarding quaternions. I obtained the following 
> parameters from running MultiResMIRegistration:
>  
> [-0.000237939, -0.0875924, 0.171368, 0.981306, 11.589, 2.08898, 1.14517]
>  
> I need to apply a transform that is half the rotation and half the 
> translation of the QuaternionRigidTransform as given by the parameters 
> above. The last 3 parameters are translation so halving those is 
> trivial. Question is how do I go about halving the effective rotation of 
> the transform? Which of the first 4 parameters do I change and can I 
> simply half the rotation angle or do I have to maintain a unit 
> quaternion to avoid scaling issues?
>  
> Thanks.
> 
> Cheers,
> Andy






More information about the Insight-users mailing list