<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">Dear Luis; first of all I would like to thank your quick reply, I just want to verify something, you know I have tried to implement poinst set to image registration. I would like to use final registration parameters to the my point set,which was selected Fixedpoint set at the beginning of the registration. So, Instead of to apply final registration results to my moving image I would like to apply the "<STRONG>OPPOSITE</STRONG>" final registration parameters to my point set I can save time and it can be implemented quickler. Am I right ?</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">Thank you</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">Tony<BR><BR></DIV>
<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, March 23, 2007 8:05:38 PM<BR>Subject: Re: [Insight-users] registration results<BR><BR>
<DIV>Hi Tony,<BR><BR>The components of a Versor *ARE NOT* angles.<BR><BR>A versor *IS NOT* a triplet of Euler angles.<BR><BR><BR>Instead, it is equivalent to a Unit Quaternion.<BR><BR><BR>Please refer to the ITK Software Guide for<BR>a description of the concept of Versors.<BR><BR> <A href="http://www.itk.org/ItkSoftwareGuide.pdf" target=_blank>http://www.itk.org/ItkSoftwareGuide.pdf</A><BR><BR><BR>If you have a rotation of T degrees around<BR>an axis defined by a unit vertor x,y,z,<BR><BR>Then the components of the Versor will be<BR>equal to:<BR><BR><BR> Vx = x * sin( T / 2 )<BR> Vy = y * sin( T / 2 )<BR> Vz = z * sin( T / 2 )<BR><BR><BR>You may find useful to read also the Tutorials<BR>on Quaternions:<BR><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><BR>The reason why your image "seems" to translate is probably<BR>that you have not set correctly the center of rotation<BR>of the transformation. A rotation performed around a<BR>center that is far from the field of view of the image,<BR>will 'look' like a translation.<BR><BR>You will find this effect explained in detail in the<BR>ITK Software Guide:<BR><BR> <A href="http://www.itk.org/ItkSoftwareGuide.pdf" target=_blank>http://www.itk.org/ItkSoftwareGuide.pdf</A><BR><BR><BR>in section "6.9.4" "Resample Image Filter",<BR>in pdf-pages 254-275.<BR><BR>Pay particular attention to figuires:<BR><BR> 6.51 and
6.52<BR><BR><BR><BR> Regards,<BR><BR><BR> Luis<BR><BR><BR>-----------------<BR>tony hakki wrote:<BR>> hello all;<BR>> I have tried to implement point set to image registration;I would like <BR>> to manipulate the results like that:<BR>> Supposing that these are the registation results;<BR>> <BR>> const double versorX = finalParameters[0];<BR>> <BR>> const double versorY = finalParameters[1];<BR>> <BR>> const double versorZ = finalParameters[2];<BR>> <BR>> const double finalTranslationX = finalParameters[3];<BR>> <BR>> const double finalTranslationY = finalParameters[4];<BR>> <BR>> const double finalTranslationZ = finalParameters[5];<BR>> <BR>> <BR>> <BR>> <BR>> <BR>> I would like to manipulate them like that:<BR>> <BR>> <BR>> <BR>> finalParameters[0]=2*vtkMath::Pi()-versorX;<BR>> <BR>>
finalParameters[1]=2*vtkMath::Pi()-versorY;<BR>> <BR>> finalParameters[2]= 2*vtkMath::Pi()-versorZ;<BR>> <BR>> *finalParameters[3]=finalTranslationX *(-1);*<BR>> <BR>> *finalParameters[4]=finalTranslationY *(-1);*<BR>> <BR>> *finalParameters[5]=finalTranslationZ *(-1);*<BR>> <BR>> ** <BR>> <BR>> ** <BR>> <BR>> *When I manipulate *finalParameters[0], <BR>> finalParameters[1],finalParameters[2] , It doesn't give any error, but <BR>> these parameters are for rotation parameters where as my image <BR>> translate when I change these parameters.*Why it doesn't rotate but <BR>> translates through the x,y,z coordinate system When I manupulate them.*<BR>> <BR>> On the other hand I couldn't manupulate the rest of the parameters <BR>> finalParameters[3],,finalParameters[4],,finalParameters[5], ,it gives <BR>> break or continue error when I run my program. And these are the <BR>>
translation parameters,aren't they? *Why I couldn't manupulate these <BR>> parameters as I showed above? *<BR>> <BR>> <BR>> <BR>> here is the my translation code:<BR>> <BR>> typedef itk::TranslationTransform<float,3> NTransformType;<BR>> <BR>> NTransformType::Pointer finalTransform = NTransformType::New();<BR>> <BR>> finalTransform->SetParameters( finalParameters ); //this is <BR>> registration result<BR>> <BR>> typedef FMeshType::PointsContainer PointsContainerType;<BR>> <BR>> typedef FMeshType::PointsContainerPointer<BR>> <BR>> PointsContainerPointer;<BR>> <BR>> typedef itk::TransformMeshFilter<<BR>> <BR>> FMeshType,<BR>> <BR>> FMeshType,<BR>> <BR>> NTransformType > FilterType;<BR>> <BR>> <BR>> <BR>> // Create a Filter<BR>> <BR>> FilterType::Pointer filter = FilterType::New();<BR>> <BR>> // Connect the inputs<BR>>
<BR>> filter->SetInput( input_mesh );<BR>> <BR>> filter->SetTransform( finalTransform );<BR>> <BR>> // Execute the filter<BR>> <BR>> filter->Update();<BR>> <BR>> std::cout << "Filter: " << filter;<BR>> <BR>> // Get the Smart Pointer to the Filter Output<BR>> <BR>> FMeshType::Pointer outputMesh = filter->GetOutput();<BR>> <BR>> std::cout << "Output Mesh has " << outputMesh->GetNumberOfPoints();<BR>> <BR>> std::cout << " points " << std::endl;<BR>> <BR>> // Get the the point container<BR>> <BR>> FMeshType::PointsContainerPointer<BR>> <BR>> transformedPoints = outputMesh->GetPoints();<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>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><BR></DIV></div><br>
<hr size=1>No need to miss a message. <a href="http://us.rd.yahoo.com/evt=43910/*http://mobile.yahoo.com/mail
">Get email on-the-go </a><br>with Yahoo! Mail for Mobile. <a href="http://us.rd.yahoo.com/evt=43910/*http://mobile.yahoo.com/mail
">Get started.</a></body></html>