ITK  5.2.0
Insight Toolkit
itkPointSetToPointSetMetric.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  * http://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 #ifndef itkPointSetToPointSetMetric_h
19 #define itkPointSetToPointSetMetric_h
20 
21 #include "itkImageBase.h"
22 #include "itkTransform.h"
24 #include "itkMacro.h"
26 
27 namespace itk
28 {
44 template <typename TFixedPointSet, typename TMovingPointSet>
45 class ITK_TEMPLATE_EXPORT PointSetToPointSetMetric : public MultipleValuedCostFunction
46 {
47 public:
48  ITK_DISALLOW_COPY_AND_ASSIGN(PointSetToPointSetMetric);
49 
55 
57  using CoordinateRepresentationType = Superclass::ParametersValueType;
58 
61 
63  using MovingPointSetType = TMovingPointSet;
64  using MovingPointSetPixelType = typename TMovingPointSet::PixelType;
65  using MovingPointSetConstPointer = typename MovingPointSetType::ConstPointer;
66 
68  using FixedPointSetType = TFixedPointSet;
69  using FixedPointSetConstPointer = typename FixedPointSetType::ConstPointer;
70 
72  static constexpr unsigned int MovingPointSetDimension = TMovingPointSet::PointDimension;
73  static constexpr unsigned int FixedPointSetDimension = TFixedPointSet::PointDimension;
74 
75  using FixedPointIterator = typename FixedPointSetType::PointsContainer::ConstIterator;
76  using FixedPointDataIterator = typename FixedPointSetType::PointDataContainer::ConstIterator;
77 
78  using MovingPointIterator = typename MovingPointSetType::PointsContainer::ConstIterator;
79  using MovingPointDataIterator = typename MovingPointSetType::PointDataContainer::ConstIterator;
80 
82  using TransformType =
84 
90 
92  using MeasureType = Superclass::MeasureType;
93 
95  using DerivativeType = Superclass::DerivativeType;
96 
98  using ParametersType = Superclass::ParametersType;
99 
101  itkSetConstObjectMacro(FixedPointSet, FixedPointSetType);
102  itkGetConstObjectMacro(FixedPointSet, FixedPointSetType);
104 
106  itkSetConstObjectMacro(MovingPointSet, MovingPointSetType);
107  itkGetConstObjectMacro(MovingPointSet, MovingPointSetType);
109 
111  itkSetObjectMacro(Transform, TransformType);
112 
114  itkGetModifiableObjectMacro(Transform, TransformType);
115 
117  void
118  SetTransformParameters(const ParametersType & parameters) const;
119 
121  unsigned int
122  GetNumberOfParameters() const override
123  {
124  return m_Transform->GetNumberOfParameters();
125  }
126 
129  virtual void
130  Initialize();
131 
132 protected:
134  ~PointSetToPointSetMetric() override = default;
135  void
136  PrintSelf(std::ostream & os, Indent indent) const override;
137 
139 
141 
143 };
144 } // end namespace itk
145 
146 #ifndef ITK_MANUAL_INSTANTIATION
147 # include "itkPointSetToPointSetMetric.hxx"
148 #endif
149 
150 #endif
itk::MultipleValuedCostFunction
This class is a base for the CostFunctions returning a multiple values.
Definition: itkMultipleValuedCostFunction.h:35
itk::OptimizerParameters< TInternalComputationValueType >
itk::PointSetToPointSetMetric::FixedPointSetConstPointer
typename FixedPointSetType::ConstPointer FixedPointSetConstPointer
Definition: itkPointSetToPointSetMetric.h:69
itk::PointSetToPointSetMetric::FixedPointSetType
TFixedPointSet FixedPointSetType
Definition: itkPointSetToPointSetMetric.h:68
itk::PointSetToPointSetMetric::TransformPointer
typename TransformType::Pointer TransformPointer
Definition: itkPointSetToPointSetMetric.h:85
itk::PointSetToPointSetMetric::m_Transform
TransformPointer m_Transform
Definition: itkPointSetToPointSetMetric.h:142
itk::PointSetToPointSetMetric::m_FixedPointSet
FixedPointSetConstPointer m_FixedPointSet
Definition: itkPointSetToPointSetMetric.h:138
itk::PointSetToPointSetMetric
Computes similarity between two point sets.
Definition: itkPointSetToPointSetMetric.h:45
itk::PointSetToPointSetMetric::MovingPointDataIterator
typename MovingPointSetType::PointDataContainer::ConstIterator MovingPointDataIterator
Definition: itkPointSetToPointSetMetric.h:79
itk::PointSetToPointSetMetric::FixedPointDataIterator
typename FixedPointSetType::PointDataContainer::ConstIterator FixedPointDataIterator
Definition: itkPointSetToPointSetMetric.h:76
itk::PointSetToPointSetMetric::CoordinateRepresentationType
Superclass::ParametersValueType CoordinateRepresentationType
Definition: itkPointSetToPointSetMetric.h:57
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::PointSetToPointSetMetric::TransformJacobianType
typename TransformType::JacobianType TransformJacobianType
Definition: itkPointSetToPointSetMetric.h:89
itk::PointSetToPointSetMetric::FixedPointIterator
typename FixedPointSetType::PointsContainer::ConstIterator FixedPointIterator
Definition: itkPointSetToPointSetMetric.h:75
itkGradientRecursiveGaussianImageFilter.h
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itkMacro.h
itk::PointSetToPointSetMetric::OutputPointType
typename TransformType::OutputPointType OutputPointType
Definition: itkPointSetToPointSetMetric.h:87
itk::PointSetToPointSetMetric::TransformParametersType
typename TransformType::ParametersType TransformParametersType
Definition: itkPointSetToPointSetMetric.h:88
itk::PointSetToPointSetMetric::MovingPointSetPixelType
typename TMovingPointSet::PixelType MovingPointSetPixelType
Definition: itkPointSetToPointSetMetric.h:64
itk::PointSetToPointSetMetric::MovingPointIterator
typename MovingPointSetType::PointsContainer::ConstIterator MovingPointIterator
Definition: itkPointSetToPointSetMetric.h:78
itkMultipleValuedCostFunction.h
itk::Transform::ParametersType
typename Superclass::ParametersType ParametersType
Definition: itkTransform.h:121
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::PointSetToPointSetMetric::GetNumberOfParameters
unsigned int GetNumberOfParameters() const override
Definition: itkPointSetToPointSetMetric.h:122
itk::Array< double >
itk::Point
A templated class holding a geometric point in n-Dimensional space.
Definition: itkPoint.h:53
itk::PointSetToPointSetMetric::MovingPointSetType
TMovingPointSet MovingPointSetType
Definition: itkPointSetToPointSetMetric.h:63
itk::PointSetToPointSetMetric::InputPointType
typename TransformType::InputPointType InputPointType
Definition: itkPointSetToPointSetMetric.h:86
itk::Transform
Transform points and vectors from an input space to an output space.
Definition: itkTransform.h:82
itkTransform.h
itk::Array2D
Array2D class representing a 2D array with size defined at construction time.
Definition: itkArray2D.h:45
itk::PointSetToPointSetMetric::m_MovingPointSet
MovingPointSetConstPointer m_MovingPointSet
Definition: itkPointSetToPointSetMetric.h:140
itk::PointSetToPointSetMetric::MovingPointSetConstPointer
typename MovingPointSetType::ConstPointer MovingPointSetConstPointer
Definition: itkPointSetToPointSetMetric.h:65
itkImageBase.h