ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkPointSetToPointSetMetric.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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 
83  Self::MovingPointSetDimension,
84  Self::FixedPointSetDimension >;
85 
91 
93  using MeasureType = Superclass::MeasureType;
94 
96  using DerivativeType = Superclass::DerivativeType;
97 
99  using ParametersType = Superclass::ParametersType;
100 
102  itkSetConstObjectMacro(FixedPointSet, FixedPointSetType);
103  itkGetConstObjectMacro(FixedPointSet, FixedPointSetType);
105 
107  itkSetConstObjectMacro(MovingPointSet, MovingPointSetType);
108  itkGetConstObjectMacro(MovingPointSet, MovingPointSetType);
110 
112  itkSetObjectMacro(Transform, TransformType);
113 
115  itkGetModifiableObjectMacro(Transform, TransformType);
116 
118  void SetTransformParameters(const ParametersType & parameters) const;
119 
121  unsigned int GetNumberOfParameters() const override
122  { return m_Transform->GetNumberOfParameters(); }
123 
126  virtual void Initialize();
127 
128 protected:
130  ~PointSetToPointSetMetric() override = default;
131  void PrintSelf(std::ostream & os, Indent indent) const override;
132 
134 
136 
138 };
139 } // end namespace itk
140 
141 #ifndef ITK_MANUAL_INSTANTIATION
142 #include "itkPointSetToPointSetMetric.hxx"
143 #endif
144 
145 #endif
typename TransformType::OutputPointType OutputPointType
typename Superclass::ParametersType ParametersType
Definition: itkTransform.h:119
Light weight base class for most itk classes.
typename MovingPointSetType::ConstPointer MovingPointSetConstPointer
typename TMovingPointSet::PixelType MovingPointSetPixelType
This class is a base for the CostFunctions returning a multiple values.
typename MovingPointSetType::PointDataContainer::ConstIterator MovingPointDataIterator
typename MovingPointSetType::PointsContainer::ConstIterator MovingPointIterator
typename FixedPointSetType::ConstPointer FixedPointSetConstPointer
typename TransformType::Pointer TransformPointer
Computes similarity between two point sets.
Superclass::ParametersValueType CoordinateRepresentationType
typename TransformType::InputPointType InputPointType
Transform points and vectors from an input space to an output space.
Definition: itkTransform.h:83
Array2D class representing a 2D array with size defined at construction time.
Definition: itkArray2D.h:45
unsigned int GetNumberOfParameters() const override
MovingPointSetConstPointer m_MovingPointSet
typename TransformType::JacobianType TransformJacobianType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
typename TransformType::ParametersType TransformParametersType
typename FixedPointSetType::PointsContainer::ConstIterator FixedPointIterator
A templated class holding a geometric point in n-Dimensional space.
Definition: itkPoint.h:52
FixedPointSetConstPointer m_FixedPointSet
typename FixedPointSetType::PointDataContainer::ConstIterator FixedPointDataIterator