ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkLandmarkRegistrationEstimator.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * https://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18
19#ifndef itkLandmarkRegistrationEstimator_h
20#define itkLandmarkRegistrationEstimator_h
21
22#include <memory>
23#include "itkPoint.h"
24#include "itkObjectFactory.h"
25#include "itkPointsLocator.h"
28namespace itk
29{
30
31
32template <unsigned int Dimension, typename TTransform>
33class LandmarkRegistrationEstimator : public itk::ParametersEstimator<Point<double, Dimension>, double>
34{
35public:
36 ITK_DISALLOW_COPY_AND_MOVE(LandmarkRegistrationEstimator);
37
42
43 typedef std::vector<std::vector<double>> VectorofVectorsT;
45 using metric_t = typename nanoflann::metric_L2::template traits<double, self_t>::distance_t;
46 using index_t = nanoflann::KDTreeSingleIndexAdaptor<metric_t, self_t, 3, size_t>;
47
49
52
53 itkOverrideGetNameOfClassMacro(LandmarkRegistrationEstimator);
55 itkNewMacro(Self);
56
57 void
58 Estimate(std::vector<Point<double, Dimension> *> & data, std::vector<double> & parameters) override;
59 void
60 Estimate(std::vector<Point<double, Dimension>> & data, std::vector<double> & parameters) override;
61
62 void
63 LeastSquaresEstimate(std::vector<Point<double, Dimension> *> & data, std::vector<double> & parameters) override;
64 void
65 LeastSquaresEstimate(std::vector<Point<double, Dimension>> & data, std::vector<double> & parameters) override;
66
67 bool
68 Agree(std::vector<double> & parameters, Point<double, Dimension> & data) override;
69
70 std::vector<double>
71 AgreeMultiple(std::vector<double> & parameters,
72 std::vector<Point<double, Dimension>> & data,
73 unsigned int currentBest) override;
74
75 bool
76 CheckCorresspondenceDistance(std::vector<double> & parameters,
77 std::vector<Point<double, Dimension> *> & data) override;
78
79 bool
80 CheckCorresspondenceEdgeLength(std::vector<double> & parameters,
81 std::vector<Point<double, Dimension> *> & data,
82 double edgeLength) override;
83
84 virtual void
85 SetDelta(double delta);
86
87 virtual double
89
90 void
92
93protected:
95 ~LandmarkRegistrationEstimator() override = default;
96
97private:
98 double delta;
102 std::unique_ptr<KdTreeT> mat_adaptor;
103};
104
105} // end namespace itk
106
107// the implementation is in this file
108#ifndef ITK_MANUAL_INSTANTIATION
109# include "itkLandmarkRegistrationEstimator.hxx"
110#endif
111
112#endif //_PLANE_PARAM_ESTIMATOR_H_
virtual void SetDelta(double delta)
std::vector< std::vector< double > > VectorofVectorsT
bool CheckCorresspondenceEdgeLength(std::vector< double > &parameters, std::vector< Point< double, Dimension > * > &data, double edgeLength) override
void LeastSquaresEstimate(std::vector< Point< double, Dimension > * > &data, std::vector< double > &parameters) override
KDTreeVectorOfVectorsAdaptor< VectorofVectorsT, double > KdTreeT
~LandmarkRegistrationEstimator() override=default
ParametersEstimator< itk::Point< double, Dimension >, double > Superclass
typename nanoflann::metric_L2::template traits< double, self_t >::distance_t metric_t
itk::VectorContainer< itk::Point< double, 3 > > PointsContainer
bool Agree(std::vector< double > &parameters, Point< double, Dimension > &data) override
void Estimate(std::vector< Point< double, Dimension > > &data, std::vector< double > &parameters) override
void SetAgreeData(std::vector< Point< double, Dimension > > &data)
itk::PointsLocator< itk::VectorContainer< itk::Point< double, 3 > > > PointsLocatorType
void LeastSquaresEstimate(std::vector< Point< double, Dimension > > &data, std::vector< double > &parameters) override
void Estimate(std::vector< Point< double, Dimension > * > &data, std::vector< double > &parameters) override
nanoflann::KDTreeSingleIndexAdaptor< metric_t, self_t, 3, vcl_size_t > index_t
std::vector< double > AgreeMultiple(std::vector< double > &parameters, std::vector< Point< double, Dimension > > &data, unsigned int currentBest) override
bool CheckCorresspondenceDistance(std::vector< double > &parameters, std::vector< Point< double, Dimension > * > &data) override
KDTreeVectorOfVectorsAdaptor< VectorofVectorsT, double, 3, nanoflann::metric_L2 > self_t
A templated class holding a geometric point in n-Dimensional space.
Definition itkPoint.h:54
Accelerate geometric searches for points.
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
detail::VectorContainer< std::conditional_t< std::is_void_v< T2 >, SizeValueType, T1 >, std::conditional_t< std::is_void_v< T2 >, T1, T2 > > VectorContainer