ITK  4.13.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 
54 
56  typedef Superclass::ParametersValueType CoordinateRepresentationType;
57 
60 
62  typedef TMovingPointSet MovingPointSetType;
63  typedef typename TMovingPointSet::PixelType MovingPointSetPixelType;
64  typedef typename MovingPointSetType::ConstPointer MovingPointSetConstPointer;
65 
67  typedef TFixedPointSet FixedPointSetType;
68  typedef typename FixedPointSetType::ConstPointer FixedPointSetConstPointer;
69 
71  itkStaticConstMacro(MovingPointSetDimension, unsigned int,
72  TMovingPointSet::PointDimension);
73  itkStaticConstMacro(FixedPointSetDimension, unsigned int,
74  TFixedPointSet::PointDimension);
76 
77  typedef typename FixedPointSetType::PointsContainer::ConstIterator FixedPointIterator;
78  typedef typename FixedPointSetType::PointDataContainer::ConstIterator FixedPointDataIterator;
79 
80  typedef typename MovingPointSetType::PointsContainer::ConstIterator MovingPointIterator;
81  typedef typename MovingPointSetType::PointDataContainer::ConstIterator MovingPointDataIterator;
82 
85  itkGetStaticConstMacro(MovingPointSetDimension),
86  itkGetStaticConstMacro(FixedPointSetDimension) > TransformType;
87 
93 
95  typedef Superclass::MeasureType MeasureType;
96 
98  typedef Superclass::DerivativeType DerivativeType;
99 
101  typedef Superclass::ParametersType ParametersType;
102 
104  itkSetConstObjectMacro(FixedPointSet, FixedPointSetType);
105  itkGetConstObjectMacro(FixedPointSet, FixedPointSetType);
107 
109  itkSetConstObjectMacro(MovingPointSet, MovingPointSetType);
110  itkGetConstObjectMacro(MovingPointSet, MovingPointSetType);
112 
114  itkSetObjectMacro(Transform, TransformType);
115 
117  itkGetModifiableObjectMacro(Transform, TransformType);
118 
120  void SetTransformParameters(const ParametersType & parameters) const;
121 
123  virtual unsigned int GetNumberOfParameters(void) const ITK_OVERRIDE
124  { return m_Transform->GetNumberOfParameters(); }
125 
128  virtual void Initialize(void);
129 
130 protected:
132  virtual ~PointSetToPointSetMetric() ITK_OVERRIDE {}
133  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
134 
136 
138 
140 
141 private:
142  ITK_DISALLOW_COPY_AND_ASSIGN(PointSetToPointSetMetric);
143 };
144 } // end namespace itk
145 
146 #ifndef ITK_MANUAL_INSTANTIATION
147 #include "itkPointSetToPointSetMetric.hxx"
148 #endif
149 
150 #endif
SmartPointer< const Self > ConstPointer
TransformType::InputPointType InputPointType
MovingPointSetType::ConstPointer MovingPointSetConstPointer
Superclass::ParametersValueType CoordinateRepresentationType
This class is a base for the CostFunctions returning a multiple values.
MultipleValuedCostFunction Superclass
FixedPointSetType::ConstPointer FixedPointSetConstPointer
FixedPointSetType::PointDataContainer::ConstIterator FixedPointDataIterator
TransformType::ParametersType TransformParametersType
TransformType::JacobianType TransformJacobianType
Transform< CoordinateRepresentationType, itkGetStaticConstMacro(MovingPointSetDimension), itkGetStaticConstMacro(FixedPointSetDimension) > TransformType
Computes similarity between two point sets.
MovingPointSetType::PointDataContainer::ConstIterator MovingPointDataIterator
virtual unsigned int GetNumberOfParameters(void) const override
Transform points and vectors from an input space to an output space.
Definition: itkTransform.h:82
Array2D class representing a 2D array with size defined at construction time.
Definition: itkArray2D.h:45
Class to hold and manage different parameter types used during optimization.
MovingPointSetType::PointsContainer::ConstIterator MovingPointIterator
TMovingPointSet::PixelType MovingPointSetPixelType
MovingPointSetConstPointer m_MovingPointSet
Control indentation during Print() invocation.
Definition: itkIndent.h:49
A templated class holding a geometric point in n-Dimensional space.
Definition: itkPoint.h:52
FixedPointSetConstPointer m_FixedPointSet
FixedPointSetType::PointsContainer::ConstIterator FixedPointIterator
Superclass::DerivativeType DerivativeType
TransformType::OutputPointType OutputPointType
Superclass::ParametersType ParametersType