ITK  4.4.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  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  unsigned int GetNumberOfParameters(void) const
121  { return m_Transform->GetNumberOfParameters(); }
122 
125  virtual void Initialize(void)
126  throw ( ExceptionObject );
127 
128 protected:
130  virtual ~PointSetToPointSetMetric() {}
131  void PrintSelf(std::ostream & os, Indent indent) const;
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
150