ITK  4.9.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 >
46 {
47 public:
48 
54 
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 
96 
99 
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  throw ( ExceptionObject );
130 
131 protected:
133  virtual ~PointSetToPointSetMetric() {}
134  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
135 
137 
139 
141 
142 private:
143  PointSetToPointSetMetric(const Self &) ITK_DELETE_FUNCTION;
144  void operator=(const Self &) ITK_DELETE_FUNCTION;
145 };
146 } // end namespace itk
147 
148 #ifndef ITK_MANUAL_INSTANTIATION
149 #include "itkPointSetToPointSetMetric.hxx"
150 #endif
151 
152 #endif
SmartPointer< const Self > ConstPointer
static const unsigned int MovingPointSetDimension
TransformType::InputPointType InputPointType
Light weight base class for most itk classes.
MovingPointSetType::ConstPointer MovingPointSetConstPointer
Superclass::ParametersValueType CoordinateRepresentationType
void SetTransformParameters(const ParametersType &parameters) const
This class is a base for the CostFunctions returning a multiple values.
MultipleValuedCostFunction Superclass
FixedPointSetType::ConstPointer FixedPointSetConstPointer
static const unsigned int FixedPointSetDimension
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
TInternalComputationValueType ParametersValueType
Standard exception handling object.
MovingPointSetConstPointer m_MovingPointSet
virtual void Initialize(void)
Control indentation during Print() invocation.
Definition: itkIndent.h:49
virtual void PrintSelf(std::ostream &os, Indent indent) const override
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