<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2900.3020" name=GENERATOR>
<STYLE>
<!--
 /* Font Definitions */
 @font-face
        {font-family:宋体;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@宋体";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        text-align:justify;
        text-justify:inter-ideograph;
        font-size:10.5pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Verdana;
        color:windowtext;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
 /* Page Definitions */
 @page Section1
        {size:595.3pt 841.9pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;
        layout-grid:15.6pt;}
div.Section1
        {page:Section1;}
-->
</STYLE>
</HEAD>
<BODY>
<DIV><FONT face=Verdana size=2>Hi Patrick,</FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Verdana size=2>The trick do solve the problem.</FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Verdana size=2>It seems that the code may be put into 
ResetRegistrationProcessing(),</FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Verdana size=2>&nbsp; m_Transform&nbsp;=&nbsp;NULL;
<DIV>&nbsp;&nbsp;m_Transform&nbsp;=&nbsp;TransformType::New();</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thank you very much!</DIV>
<DIV>&nbsp;</DIV>
<DIV>Fucang</DIV>
<DIV>&nbsp;</DIV></FONT></DIV>
<DIV><FONT face=Verdana size=2>
<HR>
</FONT></DIV>
<DIV><FONT face=Verdana size=2><STRONG></STRONG></FONT>&nbsp;</DIV>
<DIV><FONT face=Verdana size=2>
<DIV>Hi&nbsp;Fucang,</DIV>
<DIV>&nbsp;</DIV>
<DIV>I&nbsp;found&nbsp;the&nbsp;cause&nbsp;of&nbsp;this&nbsp;issue.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Around&nbsp;line&nbsp;337&nbsp;in&nbsp;igstkLandmark3DRegistration&nbsp;class,</DIV>
<DIV>&nbsp;&nbsp;m_TransformInitializer- 
&gt;SetFixedLandmarks(m_TrackerLandmarks);</DIV>
<DIV>&nbsp;&nbsp;m_TransformInitializer- 
&gt;SetMovingLandmarks(m_ImageLandmarks);</DIV>
<DIV>&nbsp;&nbsp;m_TransformInitializer- 
&gt;SetTransform(&nbsp;m_Transform&nbsp;);</DIV>
<DIV>&nbsp;</DIV>
<DIV>If&nbsp;I&nbsp;change&nbsp;this&nbsp;into:</DIV>
<DIV>&nbsp;&nbsp;m_TransformInitializer- 
&gt;SetFixedLandmarks(m_TrackerLandmarks);</DIV>
<DIV>&nbsp;&nbsp;m_TransformInitializer- 
&gt;SetMovingLandmarks(m_ImageLandmarks);</DIV>
<DIV>&nbsp;&nbsp;m_Transform&nbsp;=&nbsp;NULL;</DIV>
<DIV>&nbsp;&nbsp;m_Transform&nbsp;=&nbsp;TransformType::New();</DIV>
<DIV>&nbsp;&nbsp;m_TransformInitializer- 
&gt;SetTransform(&nbsp;m_Transform&nbsp;);</DIV>
<DIV>&nbsp;</DIV>
<DIV>Your&nbsp;code&nbsp;will&nbsp;give&nbsp;a&nbsp;consistent&nbsp;result.</DIV>
<DIV>&nbsp;</DIV>
<DIV>The&nbsp;igstkLandmark3DRegistration&nbsp;uses</DIV>
<DIV>itkLandmarkBaseTransformInitializer.txx&nbsp;inside.&nbsp;I&nbsp;thought</DIV>
<DIV>&nbsp;&nbsp;m_TransformInitializer- 
&gt;SetTransform(&nbsp;m_Transform&nbsp;);</DIV>
<DIV>is&nbsp;just&nbsp;passing&nbsp;a&nbsp;pointer&nbsp;to&nbsp;store&nbsp;the&nbsp;resulting&nbsp;transform.</DIV>
<DIV>But&nbsp;in&nbsp;the&nbsp;itkLandmarkBaseTransformInitializer.txx&nbsp;class&nbsp;line&nbsp;123.</DIV>
<DIV>&nbsp;&nbsp;RotationCenterType&nbsp;rotationCenter&nbsp;=&nbsp;transform- 
&gt;GetCenter();</DIV>
<DIV>So&nbsp;it's&nbsp;using&nbsp;the&nbsp;center&nbsp;of&nbsp;the&nbsp;transform&nbsp;as&nbsp;the&nbsp;rotation&nbsp;center.&nbsp;I</DIV>
<DIV>don't&nbsp;quite&nbsp;understand&nbsp;this&nbsp;algorithm.</DIV>
<DIV>&nbsp;</DIV>
<DIV>So&nbsp;when&nbsp;you&nbsp;reuse&nbsp;the&nbsp;igstkLandmark3DRegistration,&nbsp;because&nbsp;m_Transform</DIV>
<DIV>in&nbsp;this&nbsp;class,&nbsp;stores&nbsp;the&nbsp;results&nbsp;from&nbsp;last&nbsp;registration,&nbsp;so&nbsp;you&nbsp;are</DIV>
<DIV>passing&nbsp;a&nbsp;different&nbsp;m_Transform&nbsp;to&nbsp;the&nbsp;m_TransformInitializer,&nbsp;that's</DIV>
<DIV>why&nbsp;it's&nbsp;giving&nbsp;a&nbsp;different&nbsp;results.</DIV>
<DIV>&nbsp;</DIV>
<DIV>I&nbsp;still&nbsp;don't&nbsp;quite&nbsp;understand&nbsp;why&nbsp;it's&nbsp;behaving&nbsp;like&nbsp;that.&nbsp;Maybe&nbsp;ITK</DIV>
<DIV>guru&nbsp;can&nbsp;answer&nbsp;this&nbsp;question?</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thank&nbsp;you,</DIV>
<DIV>Patrick</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>jiafucang@126.com&nbsp;wrote:</DIV>
<DIV>&gt;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;Hi,</DIV>
<DIV>&gt;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;I&nbsp;encoutered&nbsp;a&nbsp;strange&nbsp;problem.&nbsp;I&nbsp;need&nbsp;to&nbsp;reuse&nbsp;landmark&nbsp;registration&nbsp;</DIV>
<DIV>&gt;&nbsp;for&nbsp;several&nbsp;times.</DIV>
<DIV>&gt;&nbsp;In&nbsp;FourViewsTrackingWithCT&nbsp;application,&nbsp;I&nbsp;see&nbsp;that&nbsp;when&nbsp;the&nbsp;second&nbsp;set&nbsp;</DIV>
<DIV>&gt;&nbsp;of&nbsp;image&nbsp;and&nbsp;tracker</DIV>
<DIV>&gt;&nbsp;landmarks&nbsp;were&nbsp;set,&nbsp;the&nbsp;landmark&nbsp;registration&nbsp;could&nbsp;not&nbsp;give&nbsp;the&nbsp;correct&nbsp;</DIV>
<DIV>&gt;&nbsp;result.</DIV>
<DIV>&gt;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;Here&nbsp;is&nbsp;an&nbsp;example,&nbsp;could&nbsp;anyone&nbsp;find&nbsp;anything&nbsp;wrong&nbsp;in&nbsp;the&nbsp;following&nbsp;code?</DIV>
<DIV>&gt;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;#if&nbsp;defined(_MSC_VER)</DIV>
<DIV>&gt;&nbsp;#pragma&nbsp;warning(&nbsp;disable&nbsp;:&nbsp;4786&nbsp;)</DIV>
<DIV>&gt;&nbsp;#endif</DIV>
<DIV>&gt;&nbsp;#include&nbsp; &lt;iostream &gt;</DIV>
<DIV>&gt;&nbsp;#include&nbsp;"igstkLandmark3DRegistration.h"</DIV>
<DIV>&gt;&nbsp;#include&nbsp;"igstkLandmark3DRegistrationErrorEstimator.h"</DIV>
<DIV>&gt;&nbsp;#include&nbsp;"itkLogger.h"</DIV>
<DIV>&gt;&nbsp;#include&nbsp;"itkStdStreamLogOutput.h"</DIV>
<DIV>&gt;&nbsp;#include&nbsp;"itkObject.h"</DIV>
<DIV>&gt;&nbsp;#include&nbsp;"itkCommand.h"</DIV>
<DIV>&gt;&nbsp;#include&nbsp;"itkMacro.h"</DIV>
<DIV>&gt;&nbsp;#include&nbsp;"igstkEvents.h"</DIV>
<DIV>&gt;&nbsp;#include&nbsp;"igstkTransform.h"</DIV>
<DIV>&gt;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;class&nbsp;Landmark3DRegistrationGetTransformCallback:&nbsp;public&nbsp;itk::Command</DIV>
<DIV>&gt;&nbsp;{</DIV>
<DIV>&gt;&nbsp;public:</DIV>
<DIV>&gt;&nbsp;&nbsp;typedef&nbsp;Landmark3DRegistrationGetTransformCallback&nbsp;&nbsp;&nbsp;&nbsp;Self;</DIV>
<DIV>&gt;&nbsp;&nbsp;typedef&nbsp;itk::SmartPointer &lt;Self 
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Pointer;</DIV>
<DIV>&gt;&nbsp;&nbsp;typedef&nbsp;itk::Command&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Superclass;</DIV>
<DIV>&gt;&nbsp;&nbsp;itkNewMacro(Self);</DIV>
<DIV>&gt;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;&nbsp;typedef&nbsp;igstk::TransformModifiedEvent&nbsp;TransformModifiedEventType;</DIV>
<DIV>&gt;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;&nbsp;void&nbsp;Execute(&nbsp;const&nbsp;itk::Object&nbsp;*caller,&nbsp;const&nbsp;itk::EventObject&nbsp;&amp;&nbsp;event&nbsp;)</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</DIV>
<DIV>&gt;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;&nbsp;void&nbsp;Execute(&nbsp;itk::Object&nbsp;*caller,&nbsp;const&nbsp;itk::EventObject&nbsp;&amp;&nbsp;event&nbsp;)</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;std::cout &lt; 
&lt;&nbsp;"&nbsp;TransformEvent&nbsp;is&nbsp;thrown"&nbsp; &lt; 
&lt;&nbsp;std::endl;</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;const&nbsp;TransformModifiedEventType&nbsp;*&nbsp;transformEvent&nbsp;=</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;&nbsp;dynamic_cast&nbsp; 
&lt;&nbsp;const&nbsp;TransformModifiedEventType*&nbsp; 
&gt;&nbsp;(&nbsp;&amp;event&nbsp;);</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;m_Transform&nbsp;=&nbsp;transformEvent- 
&gt;Get();</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;m_EventReceived&nbsp;=&nbsp;true;</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</DIV>
<DIV>&gt;&nbsp;&nbsp;bool&nbsp;GetEventReceived()</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;return&nbsp;m_EventReceived;</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</DIV>
<DIV>&gt;&nbsp;&nbsp;igstk::Transform&nbsp;GetTransform()</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;return&nbsp;m_Transform;</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;</DIV>
<DIV>&gt;&nbsp;protected:</DIV>
<DIV>&gt;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;&nbsp;Landmark3DRegistrationGetTransformCallback()&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;m_EventReceived&nbsp;=&nbsp;true;</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</DIV>
<DIV>&gt;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;private:</DIV>
<DIV>&gt;&nbsp;&nbsp;bool&nbsp;m_EventReceived;</DIV>
<DIV>&gt;&nbsp;&nbsp;igstk::Transform&nbsp;m_Transform;</DIV>
<DIV>&gt;&nbsp;};</DIV>
<DIV>&gt;&nbsp;int&nbsp;main(&nbsp;int&nbsp;argv,&nbsp;char&nbsp;*&nbsp;argc[]&nbsp;)</DIV>
<DIV>&gt;&nbsp;{</DIV>
<DIV>&gt;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;&nbsp;igstk::RealTimeClock::Initialize();</DIV>
<DIV>&gt;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;&nbsp;typedef&nbsp;itk::Logger&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;LoggerType;</DIV>
<DIV>&gt;&nbsp;&nbsp;typedef&nbsp;itk::StdStreamLogOutput&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;LogOutputType;</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;&nbsp;typedef&nbsp;igstk::Landmark3DRegistration</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;Landmark3DRegistrationType;</DIV>
<DIV>&gt;&nbsp;&nbsp;typedef&nbsp;igstk::Landmark3DRegistration::LandmarkPointContainerType</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;LandmarkPointContainerType;</DIV>
<DIV>&gt;&nbsp;&nbsp;typedef&nbsp;igstk::Landmark3DRegistration::LandmarkImagePointType</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;LandmarkImagePointType;</DIV>
<DIV>&gt;&nbsp;&nbsp;typedef&nbsp;igstk::Landmark3DRegistration::LandmarkTrackerPointType</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;LandmarkTrackerPointType;</DIV>
<DIV>&gt;&nbsp;&nbsp;typedef&nbsp;Landmark3DRegistrationType::TransformType::OutputVectorType</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;OutputVectorType;</DIV>
<DIV>&gt;&nbsp;&nbsp;typedef&nbsp;igstk::Transform&nbsp;&nbsp;TransformType;</DIV>
<DIV>&gt;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;&nbsp;Landmark3DRegistrationType::Pointer&nbsp;landmarkRegister&nbsp;=</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;Landmark3DRegistrationType::New();</DIV>
<DIV>&gt;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;&nbsp;LandmarkImagePointType&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;imagePoint;</DIV>
<DIV>&gt;&nbsp;&nbsp;LandmarkTrackerPointType&nbsp;&nbsp;&nbsp;&nbsp;trackerPoint;</DIV>
<DIV>&gt;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;&nbsp;typedef&nbsp;itk::VersorRigid3DTransform &lt;double 
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;VersorRigid3DTransformType;</DIV>
<DIV>&gt;&nbsp;&nbsp;typedef&nbsp;VersorRigid3DTransformType::ParametersType&nbsp;ParametersType;</DIV>
<DIV>&gt;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;&nbsp;TransformType&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;transform;</DIV>
<DIV>&gt;&nbsp;&nbsp;ParametersType&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parameters(6);</DIV>
<DIV>&gt;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;&nbsp;Landmark3DRegistrationGetTransformCallback::Pointer&nbsp;lrtcb&nbsp;=</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;Landmark3DRegistrationGetTransformCallback::New();</DIV>
<DIV>&gt;&nbsp;&nbsp;landmarkRegister- 
&gt;AddObserver(&nbsp;igstk::TransformModifiedEvent(),&nbsp;lrtcb&nbsp;);</DIV>
<DIV>&gt;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;&nbsp;typedef&nbsp;igstk::Landmark3DRegistrationErrorEstimator&nbsp;&nbsp;&nbsp;ErrorEstimatorType;</DIV>
<DIV>&gt;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;&nbsp;typedef&nbsp;ErrorEstimatorType::TargetPointType&nbsp;&nbsp;&nbsp;TargetPointType;</DIV>
<DIV>&gt;&nbsp;&nbsp;typedef&nbsp;ErrorEstimatorType::ErrorType&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ErrorType;</DIV>
<DIV>&gt;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;&nbsp;ErrorType&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;landmarkRegistrationError;</DIV>
<DIV>&gt;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;&nbsp;//&nbsp;test&nbsp;landmark&nbsp;registration&nbsp;reuse</DIV>
<DIV>&gt;&nbsp;&nbsp;if(1)</DIV>
<DIV>&gt;&nbsp;&nbsp;{</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;imagePoint[0]&nbsp;=&nbsp;&nbsp;78.3163;</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;imagePoint[1]&nbsp;=&nbsp;&nbsp;15.3252;</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;imagePoint[2]&nbsp;=&nbsp;&nbsp;16;</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;landmarkRegister- 
&gt;RequestAddImageLandmarkPoint(imagePoint);</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;trackerPoint[0]&nbsp;=&nbsp;&nbsp;199.274;</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;trackerPoint[1]&nbsp;=&nbsp;&nbsp;-26.6466;</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;trackerPoint[2]&nbsp;=&nbsp;&nbsp;-869.895;</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;landmarkRegister- 
&gt;RequestAddTrackerLandmarkPoint(trackerPoint);</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;imagePoint[0]&nbsp;=&nbsp;&nbsp;12.5937;</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;imagePoint[1]&nbsp;=&nbsp;&nbsp;&nbsp;9.9381;</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;imagePoint[2]&nbsp;=&nbsp;&nbsp;16;</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;landmarkRegister- 
&gt;RequestAddImageLandmarkPoint(imagePoint);</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;trackerPoint[0]&nbsp;=&nbsp;&nbsp;218.485;</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;trackerPoint[1]&nbsp;=&nbsp;&nbsp;-2.90349;</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;trackerPoint[2]&nbsp;=&nbsp;&nbsp;-882.859;</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;landmarkRegister- 
&gt;RequestAddTrackerLandmarkPoint(trackerPoint);</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;imagePoint[0]&nbsp;=&nbsp;&nbsp;45.3473;</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;imagePoint[1]&nbsp;=&nbsp;&nbsp;&nbsp;7.78325;</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;imagePoint[2]&nbsp;=&nbsp;&nbsp;60;</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;landmarkRegister- 
&gt;RequestAddImageLandmarkPoint(imagePoint);</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;trackerPoint[0]&nbsp;=&nbsp;&nbsp;304.046;</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;trackerPoint[1]&nbsp;=&nbsp;&nbsp;-34.6625;</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;trackerPoint[2]&nbsp;=&nbsp;&nbsp;-885.358;</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;landmarkRegister- 
&gt;RequestAddTrackerLandmarkPoint(trackerPoint);</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;landmarkRegister- 
&gt;RequestComputeTransform();</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;landmarkRegister- &gt;RequestGetTransform();</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;transform&nbsp;=&nbsp;lrtcb- 
&gt;GetTransform();</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;std::cout&nbsp; &lt; 
&lt;&nbsp;"Transform&nbsp;"&nbsp; &lt; &lt;&nbsp;transform&nbsp; &lt; 
&lt;&nbsp;std::cout;</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;landmarkRegistrationError&nbsp;=&nbsp;landmarkRegister- 
&gt;ComputeRMSError();</DIV>
<DIV>&gt;&nbsp;&nbsp;&nbsp;std::cout &lt; &lt;"RMS&nbsp;Error&nbsp;is&nbsp;" 
&lt; &lt;landmarkRegistrationError &lt; &lt;std::endl;</DIV>
<DIV>&gt;&nbsp;&nbsp;}</DIV>
<DIV>&gt;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;&nbsp;//&nbsp;reuse&nbsp;landmark&nbsp;registration</DIV>
<DIV>&gt;&nbsp;&nbsp;landmarkRegister- &gt;RequestResetRegistration();</DIV>
<DIV>&gt;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;&nbsp;imagePoint[0]&nbsp;=&nbsp;&nbsp;77.2389;</DIV>
<DIV>&gt;&nbsp;&nbsp;imagePoint[1]&nbsp;=&nbsp;&nbsp;15.9716;</DIV>
<DIV>&gt;&nbsp;&nbsp;imagePoint[2]&nbsp;=&nbsp;&nbsp;16;</DIV>
<DIV>&gt;&nbsp;&nbsp;landmarkRegister- 
&gt;RequestAddImageLandmarkPoint(imagePoint);</DIV>
<DIV>&gt;&nbsp;&nbsp;trackerPoint[0]&nbsp;=&nbsp;&nbsp;230.525;</DIV>
<DIV>&gt;&nbsp;&nbsp;trackerPoint[1]&nbsp;=&nbsp;&nbsp;-44.7263;</DIV>
<DIV>&gt;&nbsp;&nbsp;trackerPoint[2]&nbsp;=&nbsp;&nbsp;-894.183;</DIV>
<DIV>&gt;&nbsp;&nbsp;landmarkRegister- 
&gt;RequestAddTrackerLandmarkPoint(trackerPoint);</DIV>
<DIV>&gt;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;&nbsp;//&nbsp;Add&nbsp;2nd&nbsp;landmark</DIV>
<DIV>&gt;&nbsp;&nbsp;imagePoint[0]&nbsp;=&nbsp;&nbsp;14.1021;</DIV>
<DIV>&gt;&nbsp;&nbsp;imagePoint[1]&nbsp;=&nbsp;&nbsp;10.3691;</DIV>
<DIV>&gt;&nbsp;&nbsp;imagePoint[2]&nbsp;=&nbsp;&nbsp;16;</DIV>
<DIV>&gt;&nbsp;&nbsp;landmarkRegister- 
&gt;RequestAddImageLandmarkPoint(imagePoint);</DIV>
<DIV>&gt;&nbsp;&nbsp;trackerPoint[0]&nbsp;=&nbsp;&nbsp;211.976;</DIV>
<DIV>&gt;&nbsp;&nbsp;trackerPoint[1]&nbsp;=&nbsp;&nbsp;-41.8738;</DIV>
<DIV>&gt;&nbsp;&nbsp;trackerPoint[2]&nbsp;=&nbsp;&nbsp;-875.216;</DIV>
<DIV>&gt;&nbsp;&nbsp;landmarkRegister- 
&gt;RequestAddTrackerLandmarkPoint(trackerPoint);</DIV>
<DIV>&gt;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;&nbsp;//&nbsp;Add&nbsp;3d&nbsp;landmark</DIV>
<DIV>&gt;&nbsp;&nbsp;imagePoint[0]&nbsp;=&nbsp;&nbsp;45.9937;</DIV>
<DIV>&gt;&nbsp;&nbsp;imagePoint[1]&nbsp;=&nbsp;&nbsp;6.27483;</DIV>
<DIV>&gt;&nbsp;&nbsp;imagePoint[2]&nbsp;=&nbsp;&nbsp;68;</DIV>
<DIV>&gt;&nbsp;&nbsp;landmarkRegister- 
&gt;RequestAddImageLandmarkPoint(imagePoint);</DIV>
<DIV>&gt;&nbsp;&nbsp;trackerPoint[0]&nbsp;=&nbsp;&nbsp;303.781;</DIV>
<DIV>&gt;&nbsp;&nbsp;trackerPoint[1]&nbsp;=&nbsp;&nbsp;-35.4769;</DIV>
<DIV>&gt;&nbsp;&nbsp;trackerPoint[2]&nbsp;=&nbsp;&nbsp;-887.587;</DIV>
<DIV>&gt;&nbsp;&nbsp;landmarkRegister- 
&gt;RequestAddTrackerLandmarkPoint(trackerPoint);</DIV>
<DIV>&gt;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;&nbsp;landmarkRegister- &gt;RequestComputeTransform();</DIV>
<DIV>&gt;&nbsp;&nbsp;landmarkRegister- &gt;RequestGetTransform();</DIV>
<DIV>&gt;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;&nbsp;transform&nbsp;=&nbsp;lrtcb- &gt;GetTransform();</DIV>
<DIV>&gt;&nbsp;&nbsp;std::cout&nbsp; &lt; &lt;&nbsp;"Transform&nbsp;"&nbsp; &lt; 
&lt;&nbsp;transform&nbsp; &lt; &lt;&nbsp;std::cout;</DIV>
<DIV>&gt;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;&nbsp;landmarkRegistrationError&nbsp;=&nbsp;landmarkRegister- 
&gt;ComputeRMSError();</DIV>
<DIV>&gt;&nbsp;&nbsp;std::cout &lt; &lt;"RMS&nbsp;Error&nbsp;is&nbsp;" &lt; 
&lt;landmarkRegistrationError &lt; &lt;std::endl;</DIV>
<DIV>&gt;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;&nbsp;return&nbsp;0;</DIV>
<DIV>&gt;&nbsp;}</DIV>
<DIV>&gt;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;Thank&nbsp;you&nbsp;very&nbsp;much!</DIV>
<DIV>&gt;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;Best,</DIV>
<DIV>&gt;&nbsp;Fucang</DIV>
<DIV>&gt;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;</DIV>
<DIV>&gt;&nbsp;</DIV>
<DIV>&gt;&nbsp;------------------------------------------------------------------------</DIV>
<DIV>&gt;&nbsp;独家!网易3G免费邮,还赠送280兆网盘&nbsp;www.126.com&nbsp; &lt;<A 
href="http://www.126.com/">http://www.126.com/</A> &gt;</DIV>
<DIV>&gt;&nbsp;</DIV>
<DIV>&gt;&nbsp;</DIV>
<DIV>&gt;&nbsp;------------------------------------------------------------------------</DIV>
<DIV>&gt;&nbsp;</DIV>
<DIV>&gt;&nbsp;_______________________________________________</DIV>
<DIV>&gt;&nbsp;IGSTK-Users&nbsp;mailing&nbsp;list</DIV>
<DIV>&gt;&nbsp;IGSTK-Users@public.kitware.com</DIV>
<DIV>&gt;&nbsp;<A 
href="http://public.kitware.com/cgi-bin/mailman/listinfo/igstk-users">http://public.kitware.com/cgi-bin/mailman/listinfo/igstk-users</A></DIV>
<DIV>&nbsp;</DIV></FONT></DIV></BODY></HTML>