Hello World,<br /><br />I have some quesitons about the output of
'vtkIterativeClosestPointTransform'. I have two .stl models, and I try to use
'vtkIterativeClosestPointTransform' to align them. After the alignment, I want
to output the transformation matrix of the source model during the whole
processes and distance of the two models at their final positions. Following is
a part of my code:<br /><br /> vtkIterativeClosestPointTransform *icp =
vtkIterativeClosestPointTransform::New();<br />
icp->SetSource(selection2);<br /> icp->SetTarget(selection1);<br />
icp->SetCheckMeanDistance(1);<br /> icp->SetMaximumMeanDistance
(0.0000001);<br /> icp->SetMaximumNumberOfIterations (20);<br />
icp->SetMaximumNumberOfLandmarks (600);<br />
icp->GetLandmarkTransform()->SetModeToRigidBody();<br />
icp->StartByMatchingCentroidsOn();<br /><br /> cylinderTransformMatrix =
vtkMatrix4x4::New();<br /> cylinderTransformMatrix =
icp->GetLandmarkTransform()->GetMatrix();<br /> ... ...<br />
cout<<"\n\nMean Distance :
"<<icp->GetMeanDistance();<br /><br />The questions are:<br />1
The transform matrix I got from this code is the incremental matrix between the
last two iterations, and it is not the transformation matrix during the whole
processes. If I can get the incremental matrix between any two iterations, then
I can multiply them together. But now I can only get the matrix between the last
two iterations.<br /><br />2 The 'mean distance' I output here is the distance
between the last two iterations, and it is not the distance between the two
models after the alignment.<br /><br />Now I don't know how can I obtain the
matrix and distance I want, I didn't find any function of
'vtkIterativeClosestPointTransform' can give these outputs. Does anybody have
some ideas or experiences about this problem? Welcome to any suggestion!
Thanks.<br /><br />Regards,<br /><br />Shuning<br /><br /><br />