ITK  4.2.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< class TFixedPointSet, class TMovingPointSet,
45  class TDistanceMap =
48  public PointSetToPointSetMetric< TFixedPointSet, TMovingPointSet >
49 {
50 public:
51 
55 
58 
60  itkNewMacro(Self);
61 
64 
67  typedef typename Superclass::TransformPointer TransformPointer;
68  typedef typename Superclass::TransformParametersType TransformParametersType;
69  typedef typename Superclass::TransformJacobianType TransformJacobianType;
70 
71  typedef typename Superclass::MeasureType MeasureType;
72  typedef typename Superclass::DerivativeType DerivativeType;
73  typedef typename Superclass::FixedPointSetType FixedPointSetType;
74  typedef typename Superclass::MovingPointSetType MovingPointSetType;
75  typedef typename Superclass::FixedPointSetConstPointer FixedPointSetConstPointer;
76  typedef typename Superclass::MovingPointSetConstPointer MovingPointSetConstPointer;
77 
78  typedef typename Superclass::PointIterator PointIterator;
79  typedef typename Superclass::PointDataIterator PointDataIterator;
80 
81  typedef TDistanceMap DistanceMapType;
82  typedef typename DistanceMapType::ConstPointer DistanceMapPointer;
83 
85  unsigned int GetNumberOfValues() const;
86 
88  void GetDerivative(const TransformParametersType & parameters,
89  DerivativeType & Derivative) const;
90 
92  MeasureType GetValue(const TransformParametersType & parameters) const;
93 
95  void GetValueAndDerivative(const TransformParametersType & parameters,
96  MeasureType & Value, DerivativeType & Derivative) const;
97 
99  itkSetConstObjectMacro(DistanceMap, DistanceMapType);
100  itkGetConstObjectMacro(DistanceMap, DistanceMapType);
102 
105  itkSetMacro(ComputeSquaredDistance, bool);
106  itkGetConstMacro(ComputeSquaredDistance, bool);
107  itkBooleanMacro(ComputeSquaredDistance);
108 protected:
112 
114  void PrintSelf(std::ostream & os, Indent indent) const;
115 
116 private:
117  EuclideanDistancePointMetric(const Self &); //purposely not implemented
118  void operator=(const Self &); //purposely not implemented
119 
122 };
123 } // end namespace itk
124 
125 #ifndef ITK_MANUAL_INSTANTIATION
126 #include "itkEuclideanDistancePointMetric.hxx"
127 #endif
128 
129 #endif
130