<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><FONT size=2>
<P><FONT size=3>&nbsp;Dear Luis;</FONT></P>
<P><FONT size=3>I set the Center like the following code. I think it is correct to set center. At the end of the registration I write the transform staffs to the a txt folder. In this folder center is seen [0,0,0],as if I hadn't set it. What might the problem?I apply finalparameters to the TransformMeshfilter as a input like&nbsp; that<FONT size=2></P>
<P><FONT size=3>transform-&gt;SetParameters( finalParameters );</FONT></P><FONT color=#008000 size=2>
<P><FONT color=#000000 size=3>filter-&gt;SetTransform(transform );</FONT>&nbsp; </P></FONT></FONT></FONT>
<P><FONT size=3>but The pointset goes far away from the image instead of the overlapping</FONT></P>
<P></FONT><FONT size=3>If you like to see my whole code I can add it. </FONT></P>
<P>&nbsp;</P>
<P>&nbsp;</P>
<P>typedef itk::QuaternionRigidTransform&lt; <FONT color=#0000ff>double</FONT> &gt; TransformType;</P>
<P>TransformType::Pointer transform = TransformType::New();</P>
<P>TransformType::InputPointType centerFixed;</P>
<P>centerFixed[0] = 15 ;</P>
<P>centerFixed[1] =-20;</P>
<P>centerFixed[2] =0;</P><FONT size=2>
<P><FONT size=3>transform-&gt;SetCenter(centerFixed);</FONT> </P>
<P>&nbsp;</P>
<P><FONT size=3>&nbsp;here is the Transform staff at the end of the registration : Also here the transformation and the versor variables are too small according to me?Is ITK capable&nbsp;to &nbsp;registrate STL Polydata(I convert it to ITK mesh then to a &nbsp;pointset) and .raw extension 3D image?</FONT></P>
<P><FONT size=3></FONT>&nbsp;</P>
<P><FONT size=3>VersorRigid3DTransform (04D73558)<BR>&nbsp; RTTI typeinfo:&nbsp;&nbsp; class itk::VersorRigid3DTransform&lt;double&gt;<BR>&nbsp; Reference Count: 4<BR>&nbsp; Modified Time: 1221<BR>&nbsp; Debug: Off<BR>&nbsp; Observers: <BR>&nbsp;&nbsp;&nbsp; none<BR>&nbsp; Matrix: <BR>&nbsp;&nbsp;&nbsp; 0.999912 -0.00431884 0.0125821 <BR>&nbsp;&nbsp;&nbsp; 0.00426851 0.999983 0.00402404 <BR>&nbsp;&nbsp;&nbsp; -0.0125992 -0.00396998 0.999913 <BR>&nbsp; Offset: [1.00003, -0.73264, -1.39039]<BR>&nbsp; Center: [0, 0, 0]<BR>&nbsp; Translation: [1.00003, -0.73264, -1.39039]<BR>&nbsp; Inverse: <BR>&nbsp;&nbsp;&nbsp; 0.999912 0.00426851 -0.0125992 <BR>&nbsp;&nbsp;&nbsp; -0.00431884 0.999983 -0.00396998 <BR>&nbsp;&nbsp;&nbsp; 0.0125821 0.00402404 0.999913 <BR>&nbsp; Singular: 0<BR>&nbsp; Versor: [ -0.00199855, 0.00629548, 0.00214689, 0.999976 ]</FONT></P></FONT><BR>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">----- Original Message ----<BR>From: Luis Ibanez &lt;luis.ibanez@kitware.com&gt;<BR>To: tony hakki &lt;tony2007vtk@yahoo.com&gt;<BR>Cc: insight-users@itk.org<BR>Sent: Friday, April 6, 2007 4:15:48 PM<BR>Subject: Re: [Insight-users] Versor problem<BR><BR>
<DIV>Hi Tony,<BR><BR><BR>1) The center of the Transform should be set to the Center of the<BR>&nbsp;&nbsp;&nbsp;&nbsp;Fixed object. In your case, that will be the Fixed Point Set.<BR><BR><BR><BR>2)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;FORGET EULER ANGLES !!<BR><BR><BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;They are a *BAD* representation of 3D rotations<BR><BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Versors ARE NOT EULER ANGLES<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Versors are unit Quaternions<BR><BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The methods SetRotationAroundX,Y,Z, *ARE NOT* cumulative.<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The rotation that you set with SetRotationAroundY is<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;overriding the rotation that
 you set around X previously.<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The correct way of setting a versor is via an Axis and an Angle.<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;You should provide the three components (x,y,z) of the axis<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;of rotation, as a unit vector.&nbsp;&nbsp;And you should provide the<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;angle of rotation in radians. Note that the component of the<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;axis *ARE NOT* the Euler angles either.<BR><BR><BR><BR>Please read the tutorial on Quaternions:<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;<A href="http://www.itk.org/CourseWare/Training/QuaternionsI.pdf" target=_blank>http://www.itk.org/CourseWare/Training/QuaternionsI.pdf</A><BR>&nbsp;&nbsp;&nbsp;&nbsp;<A href="http://www.itk.org/CourseWare/Training/QuaternionsII.pdf" target=_blank>http://www.itk.org/CourseWare/Training/QuaternionsII.pdf</A><BR><BR>and the description of Versors in the
 Wikipedia:<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A href="http://en.wikipedia.org/wiki/Versor" target=_blank>http://en.wikipedia.org/wiki/Versor</A><BR><BR>The four components of a Quaternion correspond to:<BR><BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;q0 = Ax * sin( T / 2 )<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;q0 = Ay * sin( T / 2 )<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;q0 = Az * sin( T / 2 )<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;q0 =&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cos( T / 2 )<BR><BR><BR>where (Ax,Ay,Az) are the components of the axis<BR>of rotation and T is the angle of rotation.<BR><BR><BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;Regards,<BR><BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Luis<BR><BR><BR>------------------------<BR>tony hakki wrote:<BR>&gt; hello;<BR>&gt; I have 2 questions:<BR>&gt;&nbsp;&nbsp;1- When we implement pointSetToImageRegistration Should we Set the <BR>&gt; center of transform like SetTransform(Center) ,if yes which data's <BR>&gt; center
 should it be,PointSet center or image center?<BR>&gt;&nbsp;&nbsp;<BR>&gt; 2- I use VersorRigid3DTransform,and I want to set Versor by my self and <BR>&gt; see the effect of Versor. But I set the versor type like the following <BR>&gt; then I get the transform parameters to confirm the versor variables it <BR>&gt; says that *versor[0,&nbsp;&nbsp;&nbsp;&nbsp;0,&nbsp;&nbsp;&nbsp;&nbsp;-0.26745,&nbsp;&nbsp; 0.963572]&nbsp;&nbsp;Why do the versor <BR>&gt; variables not&nbsp;&nbsp; same what I set at the beginning?and What does the <BR>&gt; fourth one(&nbsp;&nbsp;0.963572) indicate?*<BR>&gt; ** <BR>&gt; ** <BR>&gt; <BR>&gt; *TransformType::VersorType versor;*<BR>&gt; <BR>&gt; *versor.SetRotationAroundX( 0.276538 );*<BR>&gt; <BR>&gt; *versor.SetRotationAroundY( 1.595315);*<BR>&gt; <BR>&gt; *versor.SetRotationAroundZ( -0.5414906);*<BR>&gt; <BR>&gt; *transform-&gt;SetRotation( versor );*<BR>&gt; <BR>&gt; <BR>&gt;
 ------------------------------------------------------------------------<BR>&gt; Expecting? Get great news right away with email Auto-Check. <BR>&gt; &lt;<A href="http://us.rd.yahoo.com/evt=49982/*http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html" target=_blank>http://us.rd.yahoo.com/evt=49982/*http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html</A>&gt;<BR>&gt; Try the Yahoo! Mail Beta. <BR>&gt; &lt;<A href="http://us.rd.yahoo.com/evt=49982/*http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html" target=_blank>http://us.rd.yahoo.com/evt=49982/*http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html</A>&gt;<BR>&gt; <BR>&gt; <BR>&gt; ------------------------------------------------------------------------<BR>&gt; <BR>&gt; _______________________________________________<BR>&gt; Insight-users mailing list<BR>&gt; Insight-users@itk.org<BR>&gt; <A href="http://www.itk.org/mailman/listinfo/insight-users"
 target=_blank>http://www.itk.org/mailman/listinfo/insight-users</A></DIV></DIV><BR></DIV></div><br>

<hr size=1>The fish are biting.<br>
<a href="http://us.rd.yahoo.com/evt=49679/*http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php?o=US2140&cmp=Yahoo&ctv=Q107Tagline&s=Y&s2=EM&b=50"> Get more visitors</a> on your site using <a href="
http://us.rd.yahoo.com/evt=49679/*http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php?o=US2140&cmp=Yahoo&ctv=Q107Tagline&s=Y&s2=EM&b=50">Yahoo! Search Marketing.</a></body></html>