Orfeo Toolbox  4.0
otbLeastSquareAffineTransformEstimator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ORFEO Toolbox
4  Language: C++
5  Date: $Date$
6  Version: $Revision$
7 
8 
9  Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
10  See OTBCopyright.txt for details.
11 
12 
13  This software is distributed WITHOUT ANY WARRANTY; without even
14  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  PURPOSE. See the above copyright notices for more information.
16 
17 =========================================================================*/
18 #ifndef __otbLeastSquareAffineTransformEstimator_h
19 #define __otbLeastSquareAffineTransformEstimator_h
20 
21 #include "itkObject.h"
22 #include "itkObjectFactory.h"
23 #include "itkMatrix.h"
24 #include "itkVector.h"
25 #include "itkAffineTransform.h"
26 
27 namespace otb {
28 
62 template <class TPoint>
64  public itk::Object
65 {
66 public:
72 
74  itkNewMacro(Self);
75 
77  itkTypeMacro(LeastSquareAffineTransformEstimator, Object);
78 
80  itkStaticConstMacro(PointDimension, unsigned int,
81  TPoint::PointDimension);
82 
84  typedef TPoint PointType;
85  typedef typename PointType::CoordRepType PrecisionType;
87  PointDimension> CovariantVectorType;
88  typedef std::pair<PointType, PointType> TiePointsType;
89  typedef std::vector<TiePointsType> TiePointsContainerType;
90 
92  typedef itk::Matrix<PrecisionType,
93  PointDimension,
94  PointDimension> MatrixType;
95  typedef itk::Vector<PrecisionType,
96  PointDimension> VectorType;
98  PointDimension> AffineTransformType;
100 
102  itkGetConstReferenceMacro(Matrix, MatrixType);
103 
105  itkGetConstReferenceMacro(Offset, VectorType);
106 
108  itkGetObjectMacro(AffineTransform, AffineTransformType);
109 
111  itkGetConstReferenceMacro(RMSError, CovariantVectorType);
112 
114  itkGetConstReferenceMacro(RelativeResidual, CovariantVectorType);
115 
118  TiePointsContainerType& GetTiePointsContainer();
119 
121  void SetTiePointsContainer(const TiePointsContainerType& container);
122 
124  void AddTiePoints(const PointType& src, const PointType& dst);
125 
127  void ClearTiePoints();
128 
130  void Compute();
131 
132 protected:
137 
139  virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;
140 
141 private:
142  LeastSquareAffineTransformEstimator (const Self &); // purposely not implemented
143  void operator =(const Self&); // purposely not implemented
144 
147 
150 
153 
156 
159 
162 
163 }; // end of class
164 
165 } // end of namespace otb
166 
167 #ifndef OTB_MANUAL_INSTANTIATION
169 #endif
170 
171 #endif

Generated at Sat Mar 8 2014 16:04:56 for Orfeo Toolbox with doxygen 1.8.3.1