<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> 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 that<FONT size=2></P>
<P><FONT size=3>transform->SetParameters( finalParameters );</FONT></P><FONT color=#008000 size=2>
<P><FONT color=#000000 size=3>filter->SetTransform(transform );</FONT> </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> </P>
<P> </P>
<P>typedef itk::QuaternionRigidTransform< <FONT color=#0000ff>double</FONT> > 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->SetCenter(centerFixed);</FONT> </P>
<P> </P>
<P><FONT size=3> 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 to registrate STL Polydata(I convert it to ITK mesh then to a pointset) and .raw extension 3D image?</FONT></P>
<P><FONT size=3></FONT> </P>
<P><FONT size=3>VersorRigid3DTransform (04D73558)<BR> RTTI typeinfo: class itk::VersorRigid3DTransform<double><BR> Reference Count: 4<BR> Modified Time: 1221<BR> Debug: Off<BR> Observers: <BR> none<BR> Matrix: <BR> 0.999912 -0.00431884 0.0125821 <BR> 0.00426851 0.999983 0.00402404 <BR> -0.0125992 -0.00396998 0.999913 <BR> Offset: [1.00003, -0.73264, -1.39039]<BR> Center: [0, 0, 0]<BR> Translation: [1.00003, -0.73264, -1.39039]<BR> Inverse: <BR> 0.999912 0.00426851 -0.0125992 <BR> -0.00431884 0.999983 -0.00396998 <BR> 0.0125821 0.00402404 0.999913 <BR> Singular: 0<BR> 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 <luis.ibanez@kitware.com><BR>To: tony hakki <tony2007vtk@yahoo.com><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> Fixed object. In your case, that will be the Fixed Point Set.<BR><BR><BR><BR>2) FORGET EULER ANGLES !!<BR><BR><BR><BR> They are a *BAD* representation of 3D rotations<BR><BR><BR> Versors ARE NOT EULER ANGLES<BR> Versors are unit Quaternions<BR><BR><BR> The methods SetRotationAroundX,Y,Z, *ARE NOT* cumulative.<BR><BR> The rotation that you set with SetRotationAroundY is<BR> overriding the rotation that
you set around X previously.<BR><BR> The correct way of setting a versor is via an Axis and an Angle.<BR><BR> You should provide the three components (x,y,z) of the axis<BR> of rotation, as a unit vector. And you should provide the<BR> angle of rotation in radians. Note that the component of the<BR> axis *ARE NOT* the Euler angles either.<BR><BR><BR><BR>Please read the tutorial on Quaternions:<BR><BR> <A href="http://www.itk.org/CourseWare/Training/QuaternionsI.pdf" target=_blank>http://www.itk.org/CourseWare/Training/QuaternionsI.pdf</A><BR> <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> <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> q0 = Ax * sin( T / 2 )<BR> q0 = Ay * sin( T / 2 )<BR> q0 = Az * sin( T / 2 )<BR> q0 = 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> Regards,<BR><BR><BR> Luis<BR><BR><BR>------------------------<BR>tony hakki wrote:<BR>> hello;<BR>> I have 2 questions:<BR>> 1- When we implement pointSetToImageRegistration Should we Set the <BR>> center of transform like SetTransform(Center) ,if yes which data's <BR>> center
should it be,PointSet center or image center?<BR>> <BR>> 2- I use VersorRigid3DTransform,and I want to set Versor by my self and <BR>> see the effect of Versor. But I set the versor type like the following <BR>> then I get the transform parameters to confirm the versor variables it <BR>> says that *versor[0, 0, -0.26745, 0.963572] Why do the versor <BR>> variables not same what I set at the beginning?and What does the <BR>> fourth one( 0.963572) indicate?*<BR>> ** <BR>> ** <BR>> <BR>> *TransformType::VersorType versor;*<BR>> <BR>> *versor.SetRotationAroundX( 0.276538 );*<BR>> <BR>> *versor.SetRotationAroundY( 1.595315);*<BR>> <BR>> *versor.SetRotationAroundZ( -0.5414906);*<BR>> <BR>> *transform->SetRotation( versor );*<BR>> <BR>> <BR>>
------------------------------------------------------------------------<BR>> Expecting? Get great news right away with email Auto-Check. <BR>> <<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>><BR>> Try the Yahoo! Mail Beta. <BR>> <<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>><BR>> <BR>> <BR>> ------------------------------------------------------------------------<BR>> <BR>> _______________________________________________<BR>> Insight-users mailing list<BR>> Insight-users@itk.org<BR>> <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>