<HTML>
<HEAD>
<TITLE>Convert Rigid3DTransform To VersorRigid3DTransform</TITLE>
</HEAD>
<BODY><P><FONT face="Lucida Console">
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Hello All,<BR>
<BR>
I have a program that generates rho, phi, theta rotation euler angles, and I can easily generate the rotation matrix for creating the Rigid3DTransform.<BR>
<BR>
I now need to c</SPAN></FONT><FONT SIZE="1"><FONT FACE="Lucida Grande"><SPAN STYLE='font-size:10px'>onvert Rigid3DTransform to VersorRigid3DTransform so that I can initialize a mutual information registration with it. <BR>
<BR>
Could anyone provide some advice on how to perform this conversion?<BR>
<BR>
Thanks,<BR>
Hans<BR>
<BR>
PS: The following code does not work.<BR>
===========================<BR>
</SPAN></FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>typedef itk::Rigid3DTransform<double> RigidTransformType;<BR>
typedef itk::VersorRigid3DTransform<double> VersorTransformType;<BR>
<BR>
VersorTransformType::Pointer ConvertToVersorRigid3D(RigidTransformType::Pointer RT)<BR>
{<BR>
VersorTransformType::Pointer VT=VersorTransformType::New();<BR>
VT->SetFixedParameters(RT->GetFixedParameters());<BR>
<BR>
itk::Matrix<double,3,3> R=RT->GetRotationMatrix();<BR>
RigidTransformType::TranslationType T=RT->GetTranslation();<BR>
<BR>
VersorTransformType::ParametersType p;<BR>
p.SetSize(6);<BR>
itk::Versor<double> v;<BR>
v.Set(R);<BR>
//Get the first 3 elements of the versor;<BR>
p[0]=v.GetRight()[0];<BR>
p[1]=v.GetRight()[1];<BR>
p[2]=v.GetRight()[2];<BR>
p[3]=T[0];<BR>
p[4]=T[1];<BR>
p[5]=T[2];<BR>
VT->SetParameters(p);<BR>
return VT;<BR>
}<BR>
<BR>
<BR>
</SPAN></FONT>
</FONT></P>
<P><FONT face="Lucida Console" color=#808080 size=1>Notice: This UI Health Care
e-mail (including attachments) is covered by the Electronic Communications
Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally
privileged. If you are not the intended recipient, you are hereby notified
that any retention, dissemination, distribution, or copying of this
communication is strictly prohibited. Please reply to the sender that you
have received the message in error, then delete it. Thank you.</FONT></P>
<P><FONT face="Lucida Console"></FONT></P></BODY>
</HTML>