ITK  4.8.0
Insight Segmentation and Registration Toolkit
itkEuclideanDistancePointMetric.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 itkEuclideanDistancePointMetric_h
19 #define itkEuclideanDistancePointMetric_h
20 
22 #include "itkCovariantVector.h"
23 #include "itkPointSet.h"
24 #include "itkImage.h"
25 
26 namespace itk
27 {
44 template< typename TFixedPointSet, typename TMovingPointSet,
45  typename TDistanceMap =
48  public PointSetToPointSetMetric< TFixedPointSet, TMovingPointSet >
49 {
50 public:
51 
55 
58 
60  itkNewMacro(Self);
61 
64 
70 
77 
80 
83 
84  typedef TDistanceMap DistanceMapType;
85  typedef typename DistanceMapType::ConstPointer DistanceMapPointer;
86 
88  unsigned int GetNumberOfValues() const ITK_OVERRIDE;
89 
91  void GetDerivative(const TransformParametersType & parameters,
92  DerivativeType & Derivative) const ITK_OVERRIDE;
93 
95  MeasureType GetValue(const TransformParametersType & parameters) const ITK_OVERRIDE;
96 
98  void GetValueAndDerivative(const TransformParametersType & parameters,
99  MeasureType & Value, DerivativeType & Derivative) const;
100 
102  itkSetConstObjectMacro(DistanceMap, DistanceMapType);
103  itkGetConstObjectMacro(DistanceMap, DistanceMapType);
105 
108  itkSetMacro(ComputeSquaredDistance, bool);
109  itkGetConstMacro(ComputeSquaredDistance, bool);
110  itkBooleanMacro(ComputeSquaredDistance);
112 
113 protected:
115  virtual ~EuclideanDistancePointMetric() {}
116 
118  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
119 
120 private:
121  EuclideanDistancePointMetric(const Self &); //purposely not implemented
122  void operator=(const Self &); //purposely not implemented
123 
126 };
127 } // end namespace itk
128 
129 #ifndef ITK_MANUAL_INSTANTIATION
130 #include "itkEuclideanDistancePointMetric.hxx"
131 #endif
132 
133 #endif
void GetDerivative(const TransformParametersType &parameters, DerivativeType &Derivative) const override
Light weight base class for most itk classes.
MovingPointSetType::ConstPointer MovingPointSetConstPointer
void PrintSelf(std::ostream &os, Indent indent) const override
Superclass::FixedPointIterator FixedPointIterator
void GetValueAndDerivative(const TransformParametersType &parameters, MeasureType &Value, DerivativeType &Derivative) const
Superclass::MovingPointDataIterator MovingPointDataIterator
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.
Superclass::MovingPointSetType MovingPointSetType
DistanceMapType::ConstPointer DistanceMapPointer
MovingPointSetType::PointDataContainer::ConstIterator MovingPointDataIterator
Array2D class representing a 2D array with size defined at construction time.
Definition: itkArray2D.h:45
Computes the minimum distance between a moving point-set and a fixed point-set. A vector of minimum c...
MovingPointSetType::PointsContainer::ConstIterator MovingPointIterator
Superclass::FixedPointDataIterator FixedPointDataIterator
Superclass::MovingPointSetConstPointer MovingPointSetConstPointer
MeasureType GetValue(const TransformParametersType &parameters) const override
PointSetToPointSetMetric< TFixedPointSet, TMovingPointSet > Superclass
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Superclass::FixedPointSetConstPointer FixedPointSetConstPointer
Superclass::FixedPointSetType FixedPointSetType
Superclass::MovingPointIterator MovingPointIterator
Base class for most ITK classes.
Definition: itkObject.h:57
unsigned int GetNumberOfValues() const override
Superclass::TransformJacobianType TransformJacobianType
Templated n-dimensional image class.
Definition: itkImage.h:75
FixedPointSetType::PointsContainer::ConstIterator FixedPointIterator
Superclass::DerivativeType DerivativeType
Superclass::TransformParametersType TransformParametersType