[Insight-users] Versor problem
Luis Ibanez
luis.ibanez at kitware.com
Fri Apr 6 10:15:48 EDT 2007
Hi Tony,
1) The center of the Transform should be set to the Center of the
Fixed object. In your case, that will be the Fixed Point Set.
2) FORGET EULER ANGLES !!
They are a *BAD* representation of 3D rotations
Versors ARE NOT EULER ANGLES
Versors are unit Quaternions
The methods SetRotationAroundX,Y,Z, *ARE NOT* cumulative.
The rotation that you set with SetRotationAroundY is
overriding the rotation that you set around X previously.
The correct way of setting a versor is via an Axis and an Angle.
You should provide the three components (x,y,z) of the axis
of rotation, as a unit vector. And you should provide the
angle of rotation in radians. Note that the component of the
axis *ARE NOT* the Euler angles either.
Please read the tutorial on Quaternions:
http://www.itk.org/CourseWare/Training/QuaternionsI.pdf
http://www.itk.org/CourseWare/Training/QuaternionsII.pdf
and the description of Versors in the Wikipedia:
http://en.wikipedia.org/wiki/Versor
The four components of a Quaternion correspond to:
q0 = Ax * sin( T / 2 )
q0 = Ay * sin( T / 2 )
q0 = Az * sin( T / 2 )
q0 = cos( T / 2 )
where (Ax,Ay,Az) are the components of the axis
of rotation and T is the angle of rotation.
Regards,
Luis
------------------------
tony hakki wrote:
> hello;
> I have 2 questions:
> 1- When we implement pointSetToImageRegistration Should we Set the
> center of transform like SetTransform(Center) ,if yes which data's
> center should it be,PointSet center or image center?
>
> 2- I use VersorRigid3DTransform,and I want to set Versor by my self and
> see the effect of Versor. But I set the versor type like the following
> then I get the transform parameters to confirm the versor variables it
> says that *versor[0, 0, -0.26745, 0.963572] Why do the versor
> variables not same what I set at the beginning?and What does the
> fourth one( 0.963572) indicate?*
> **
> **
>
> *TransformType::VersorType versor;*
>
> *versor.SetRotationAroundX( 0.276538 );*
>
> *versor.SetRotationAroundY( 1.595315);*
>
> *versor.SetRotationAroundZ( -0.5414906);*
>
> *transform->SetRotation( versor );*
>
>
> ------------------------------------------------------------------------
> Expecting? Get great news right away with email Auto-Check.
> <http://us.rd.yahoo.com/evt=49982/*http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html>
> Try the Yahoo! Mail Beta.
> <http://us.rd.yahoo.com/evt=49982/*http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
More information about the Insight-users
mailing list