ITK  4.6.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 PointIterator;
78  typedef typename FixedPointSetType::PointDataContainer::ConstIterator PointDataIterator;
79 
82  itkGetStaticConstMacro(MovingPointSetDimension),
83  itkGetStaticConstMacro(FixedPointSetDimension) > TransformType;
84 
90 
93 
96 
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 SetTransformParameters(const ParametersType & parameters) const;
118 
120  virtual unsigned int GetNumberOfParameters(void) const ITK_OVERRIDE
121  { return m_Transform->GetNumberOfParameters(); }
122 
125  virtual void Initialize(void)
126  throw ( ExceptionObject );
127 
128 protected:
130  virtual ~PointSetToPointSetMetric() {}
131  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
132 
134 
136 
138 
139 private:
140  PointSetToPointSetMetric(const Self &); //purposely not implemented
141  void operator=(const Self &); //purposely not implemented
142 };
143 } // end namespace itk
144 
145 #ifndef ITK_MANUAL_INSTANTIATION
146 #include "itkPointSetToPointSetMetric.hxx"
147 #endif
148 
149 #endif
SmartPointer< const Self > ConstPointer
static const unsigned int MovingPointSetDimension
virtual void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE
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.
FixedPointSetType::PointsContainer::ConstIterator PointIterator
MultipleValuedCostFunction Superclass
FixedPointSetType::ConstPointer FixedPointSetConstPointer
static const unsigned int FixedPointSetDimension
TransformType::ParametersType TransformParametersType
TransformType::JacobianType TransformJacobianType
Transform< CoordinateRepresentationType, itkGetStaticConstMacro(MovingPointSetDimension), itkGetStaticConstMacro(FixedPointSetDimension) > TransformType
Computes similarity between two point sets.
virtual unsigned int GetNumberOfParameters(void) const ITK_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:44
Class to hold and manage different parameter types used during optimization.
TMovingPointSet::PixelType MovingPointSetPixelType
FixedPointSetType::PointDataContainer::ConstIterator PointDataIterator
TInternalComputationValueType ParametersValueType
Standard exception handling object.
MovingPointSetConstPointer m_MovingPointSet
virtual void Initialize(void)
void operator=(const Self &)
Control indentation during Print() invocation.
Definition: itkIndent.h:49
A templated class holding a geometric point in n-Dimensional space.
Definition: itkPoint.h:51
FixedPointSetConstPointer m_FixedPointSet
Superclass::DerivativeType DerivativeType
TransformType::OutputPointType OutputPointType
Superclass::ParametersType ParametersType