<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16525" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff background="">
<DIV><FONT face=Arial size=2>Hi all,<BR> I have a strange
behaviour I would like to correct in my initialisation.<BR>What I do is simply
initialize the versorRigid3dTransform with a 180° <BR>rotation around y-axis and
-94.55 rotation around z-axis.<BR>I used quaternion for rotation initialisation
like this, as previously <BR>adviced
:<BR><BR>*******************************************************<BR>double RotX
= angleX * vnl_math::pi / 180.0;<BR>double RotY = angleY * vnl_math::pi /
180.0;<BR>double RotZ = angleZ * vnl_math::pi /
180.0;<BR>vnl_quaternion<double>
RR(RotX,RotY,RotZ);<BR>rotation.Set(RR);<BR>transform->SetRotation( rotation
);<BR><BR>[...]<BR>// Checking<BR>VersorType rotationInitiale =
transform->GetVersor();<BR>vnl_vector_fixed<double,3>
anglesEuleriensInitiaux =
(rotationInitiale.GetVnlQuaternion()).rotation_euler_angles();<BR>cout <<
"Angles d'Euler (initiaux): " <<
(anglesEuleriensInitiaux*180.0/vnl_math::pi) <<
endl;<BR><BR>********************************************************<BR><BR>What
I doesn't understand actually is why by flipping around X or Y axis by 180°, I
get an "half image" at the beginning of the stack</FONT></DIV>
<DIV><FONT face=Arial size=2>Is this behavious linked to the Quaternions ? Is
there a special case for a pi angle ? Is there a way to avoid this behaviour
?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Images:</FONT></DIV><A
href="http://itk.fete.ch/perso/Rot_0_0_0.jpg"><FONT face=Arial
size=2>http://itk.fete.ch/perso/Rot_0_0_0.jpg</FONT></A>
<DIV><A href="http://itk.fete.ch/perso/Rot_0_180_0.jpg"><FONT face=Arial
size=2>http://itk.fete.ch/perso/Rot_0_180_0.jpg</FONT></A></DIV>
<DIV><A href="http://itk.fete.ch/perso/Rot_180_0_0.jpg"><FONT face=Arial
size=2>http://itk.fete.ch/perso/Rot_180_0_0.jpg</FONT></A></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV></BODY></HTML>