ITK  4.2.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< class TFixedPointSet, class TMovingPointSet >
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 PointIterator;
78  typedef typename FixedPointSetType::PointDataContainer::ConstIterator PointDataIterator;
79 
82  itkGetStaticConstMacro(MovingPointSetDimension),
83  itkGetStaticConstMacro(FixedPointSetDimension) > TransformType;
84 
90 
92  typedef Superclass::MeasureType MeasureType;
93 
95  typedef Superclass::DerivativeType DerivativeType;
96 
98  typedef Superclass::ParametersType ParametersType;
99 
101  itkSetConstObjectMacro(FixedPointSet, FixedPointSetType);
102 
104  itkGetConstObjectMacro(FixedPointSet, FixedPointSetType);
105 
107  itkSetConstObjectMacro(MovingPointSet, MovingPointSetType);
108 
110  itkGetConstObjectMacro(MovingPointSet, MovingPointSetType);
111 
113  itkSetObjectMacro(Transform, TransformType);
114 
116  itkGetObjectMacro(Transform, TransformType);
117 
119  void SetTransformParameters(const ParametersType & parameters) const;
120 
122  unsigned int GetNumberOfParameters(void) const
123  { return m_Transform->GetNumberOfParameters(); }
124 
127  virtual void Initialize(void)
128  throw ( ExceptionObject );
129 
130 protected:
132  virtual ~PointSetToPointSetMetric() {}
133  void PrintSelf(std::ostream & os, Indent indent) const;
134 
136 
138 
140 private:
141  PointSetToPointSetMetric(const Self &); //purposely not implemented
142  void operator=(const Self &); //purposely not implemented
143 };
144 } // end namespace itk
145 
146 #ifndef ITK_MANUAL_INSTANTIATION
147 #include "itkPointSetToPointSetMetric.hxx"
148 #endif
149 
150 #endif
151