25 mitk::PointSet::Pointer StaticSet,
27 itk::Matrix<double,3,3>& TransformationR,
28 itk::Vector<double,3>& TransformationT,
31 std::string& ErrorMessage,
47 itk::Matrix<double,3,3>& TransformationR,
48 itk::Vector<double,3>& TransformationT,
51 std::string& ErrorMessage,
56 TransformationR = itk::Matrix<double,3,3>(); TransformationR.Fill(0);
57 TransformationR[0][0] = 1; TransformationR[1][1] = 1; TransformationR[2][2] = 1;
58 TransformationT = itk::Vector<double,3>(); TransformationT.Fill(0);
64 if (MovingSurface.GetPointer() == NULL || StaticSurface.GetPointer() == NULL)
66 ErrorMessage =
"Error, at least one input value is missing";
75 icp->SetMaximumMeanDistance(Threshold);
76 icp->SetSource(source);
77 icp->SetTarget(target);
78 icp->GetLandmarkTransform()->SetModeToRigidBody();
79 icp->SetMaximumNumberOfIterations(max_iterations);
85 TransformationR[0][0] = m->GetElement(0,0);
86 TransformationR[0][1] = m->GetElement(0,1);
87 TransformationR[0][2] = m->GetElement(0,2);
88 TransformationR[1][0] = m->GetElement(1,0);
89 TransformationR[1][1] = m->GetElement(1,1);
90 TransformationR[1][2] = m->GetElement(1,2);
91 TransformationR[2][0] = m->GetElement(2,0);
92 TransformationR[2][1] = m->GetElement(2,1);
93 TransformationR[2][2] = m->GetElement(2,2);
94 TransformationT[0] = m->GetElement(0,3);
95 TransformationT[1] = m->GetElement(1,3);
96 TransformationT[2] = m->GetElement(2,3);
97 n = icp->GetNumberOfIterations();
99 ErrorMessage =
"Registration succeeded";
static bool StandardICPPointRegisterAlgorithm(mitk::PointSet::Pointer MovingSet, mitk::PointSet::Pointer StaticSet, double Threshold, itk::Matrix< double, 3, 3 > &TransformationR, itk::Vector< double, 3 > &TransformationT, double &FRE, int &n, std::string &ErrorMessage, int max_iterations=100)
This method executes the standard iterative closest point algorithm to register a moving pointset X o...