go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkSingleValuedPointSetToPointSetMetric.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkSingleValuedPointSetToPointSetMetric.h,v $
5  Language: C++
6  Date: $Date: 2009-01-26 21:45:56 $
7  Version: $Revision: 1.2 $
8 
9  Copyright (c) Insight Software Consortium. All rights reserved.
10  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11 
12  This software is distributed WITHOUT ANY WARRANTY; without even
13  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14  PURPOSE. See the above copyright notices for more information.
15 
16 =========================================================================*/
17 #ifndef __itkSingleValuedPointSetToPointSetMetric_h
18 #define __itkSingleValuedPointSetToPointSetMetric_h
19 
20 #include "itkImageBase.h"
21 #include "itkAdvancedTransform.h"
22 #include "itkSingleValuedCostFunction.h"
23 #include "itkExceptionObject.h"
24 #include "itkSpatialObject.h"
25 #include "itkPointSet.h"
26 
27 
28 namespace itk
29 {
30 
45 template <class TFixedPointSet, class TMovingPointSet>
48 {
49 public:
50 
54  typedef SmartPointer<Self> Pointer;
55  typedef SmartPointer<const Self> ConstPointer;
56 
58  typedef Superclass::ParametersValueType CoordinateRepresentationType;
59 
62 
64  typedef TFixedPointSet FixedPointSetType;
65  typedef typename FixedPointSetType::PixelType FixedPointSetPixelType;
66  typedef typename FixedPointSetType::ConstPointer FixedPointSetConstPointer;
67  typedef TMovingPointSet MovingPointSetType;
68  typedef typename MovingPointSetType::PixelType MovingPointSetPixelType;
69  typedef typename MovingPointSetType::ConstPointer MovingPointSetConstPointer;
70  typedef typename FixedPointSetType::PointsContainer::ConstIterator PointIterator;
71  typedef typename FixedPointSetType::PointDataContainer::ConstIterator PointDataIterator;
72 
74  itkStaticConstMacro( FixedPointSetDimension, unsigned int,
75  TFixedPointSet::PointDimension );
76  itkStaticConstMacro( MovingPointSetDimension, unsigned int,
77  TMovingPointSet::PointDimension );
78 
81  itkGetStaticConstMacro( FixedPointSetDimension ),
82  itkGetStaticConstMacro( MovingPointSetDimension ) > TransformType;
88 
89  typedef SpatialObject<
90  itkGetStaticConstMacro( FixedPointSetDimension )> FixedImageMaskType;
91  typedef typename FixedImageMaskType::Pointer FixedImageMaskPointer;
92  typedef typename FixedImageMaskType::ConstPointer FixedImageMaskConstPointer;
93  typedef SpatialObject<
94  itkGetStaticConstMacro( MovingPointSetDimension )> MovingImageMaskType;
95  typedef typename MovingImageMaskType::Pointer MovingImageMaskPointer;
96  typedef typename MovingImageMaskType::ConstPointer MovingImageMaskConstPointer;
97 
99  typedef Superclass::MeasureType MeasureType;
100  typedef Superclass::DerivativeType DerivativeType;
101  typedef typename DerivativeType::ValueType DerivativeValueType;
102  typedef Superclass::ParametersType ParametersType;
103 
106 
108  itkSetConstObjectMacro( FixedPointSet, FixedPointSetType );
109 
111  itkGetConstObjectMacro( FixedPointSet, FixedPointSetType );
112 
114  itkSetConstObjectMacro( MovingPointSet, MovingPointSetType );
115 
117  itkGetConstObjectMacro( MovingPointSet, MovingPointSetType );
118 
120  itkSetObjectMacro( Transform, TransformType );
121 
123  itkGetConstObjectMacro( Transform, TransformType );
124 
126  void SetTransformParameters( const ParametersType & parameters ) const;
127 
129  unsigned int GetNumberOfParameters( void ) const
130  { return this->m_Transform->GetNumberOfParameters(); }
131 
135  virtual void Initialize( void ) throw ( ExceptionObject );
136 
138  // \todo: currently not used
139  itkSetConstObjectMacro( FixedImageMask, FixedImageMaskType );
140 
142  itkGetConstObjectMacro( FixedImageMask, FixedImageMaskType );
143 
145  itkSetConstObjectMacro( MovingImageMask, MovingImageMaskType );
146 
148  itkGetConstObjectMacro( MovingImageMask, MovingImageMaskType );
149 
150 protected:
152  virtual ~SingleValuedPointSetToPointSetMetric() {};
153 
155  void PrintSelf( std::ostream & os, Indent indent ) const;
156 
163 
164  mutable unsigned int m_NumberOfPointsCounted;
165 
166 private:
167  SingleValuedPointSetToPointSetMetric(const Self&); //purposely not implemented
168  void operator=(const Self&); //purposely not implemented
169 
170 }; // end class SingleValuedPointSetToPointSetMetric
171 
172 } // end namespace itk
173 
174 #ifndef ITK_MANUAL_INSTANTIATION
175 #include "itkSingleValuedPointSetToPointSetMetric.txx"
176 #endif
177 
178 #endif


Generated on 21-03-2014 for elastix by doxygen 1.8.1.2 elastix logo