OTB  9.0.0
Orfeo Toolbox
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
otb::LeastSquareAffineTransformEstimator< TPoint > Class Template Reference

#include <otbLeastSquareAffineTransformEstimator.h>

+ Inheritance diagram for otb::LeastSquareAffineTransformEstimator< TPoint >:
+ Collaboration diagram for otb::LeastSquareAffineTransformEstimator< TPoint >:

Public Types

typedef AffineTransformType::Pointer AffineTransformPointerType
 
typedef itk::AffineTransform< PrecisionType, PointDimensionAffineTransformType
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef itk::CovariantVector< PrecisionType, PointDimensionCovariantVectorType
 
typedef itk::Matrix< PrecisionType, PointDimension, PointDimensionMatrixType
 
typedef itk::SmartPointer< SelfPointer
 
typedef TPoint PointType
 
typedef PointType::CoordRepType PrecisionType
 
typedef LeastSquareAffineTransformEstimator Self
 
typedef itk::Object Superclass
 
typedef std::vector< TiePointsTypeTiePointsContainerType
 
typedef std::pair< PointType, PointTypeTiePointsType
 
typedef itk::Vector< PrecisionType, PointDimensionVectorType
 

Public Member Functions

void AddTiePoints (const PointType &src, const PointType &dst)
 
void ClearTiePoints ()
 
void Compute ()
 
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual const MatrixTypeGetMatrix () const
 
virtual const char * GetNameOfClass () const
 
virtual const VectorTypeGetOffset () const
 
virtual const CovariantVectorTypeGetRelativeResidual () const
 
virtual const CovariantVectorTypeGetRMSError () const
 
TiePointsContainerTypeGetTiePointsContainer ()
 
 itkGetObjectMacro (AffineTransform, AffineTransformType)
 
void SetTiePointsContainer (const TiePointsContainerType &container)
 

Static Public Member Functions

static Pointer New ()
 

Static Public Attributes

static const unsigned int PointDimension = TPoint::PointDimension
 

Protected Member Functions

 LeastSquareAffineTransformEstimator ()
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
 ~LeastSquareAffineTransformEstimator () override
 

Private Member Functions

 LeastSquareAffineTransformEstimator (const Self &)=delete
 
void operator= (const Self &)=delete
 

Private Attributes

AffineTransformPointerType m_AffineTransform
 
MatrixType m_Matrix
 
VectorType m_Offset
 
CovariantVectorType m_RelativeResidual
 
CovariantVectorType m_RMSError
 
TiePointsContainerType m_TiePointsContainer
 

Detailed Description

template<class TPoint>
class otb::LeastSquareAffineTransformEstimator< TPoint >

This class provide the affine transform LSQR estimation.

This class uses the classical least square optimisation to estimate an affine transform from a set of tie points.

This implementation supports points of any dimension.

Tie points can be added through the AddTiePoints() method.

The ClearTiePoints() method allows removing all the tie points that has been previously set.

Once all the tie points have been fed into the estimator, the Compute() method will perform the optimization.

Matrix of the estimated affine transform can be retrieved using the GetMatrix() method.

Offset of the estimated affine transform can be retrieved using the GetOffset() method.

Alternatively, the GetAffineTransform() methods return a pointer to a fully set-up forward affine transform (

See also
AffineTransform).

Estimation errors are available per dimension using the GetRMSError() (root mean square location error) or GetRelativeResidual() (relative residual error).

NOTE: All computation are performed in double. Results are casted back to TPoint::CoordRepType.

Definition at line 69 of file otbLeastSquareAffineTransformEstimator.h.

Member Typedef Documentation

◆ AffineTransformPointerType

template<class TPoint >
typedef AffineTransformType::Pointer otb::LeastSquareAffineTransformEstimator< TPoint >::AffineTransformPointerType

Definition at line 98 of file otbLeastSquareAffineTransformEstimator.h.

◆ AffineTransformType

template<class TPoint >
typedef itk::AffineTransform<PrecisionType, PointDimension> otb::LeastSquareAffineTransformEstimator< TPoint >::AffineTransformType

Definition at line 97 of file otbLeastSquareAffineTransformEstimator.h.

◆ ConstPointer

template<class TPoint >
typedef itk::SmartPointer<const Self> otb::LeastSquareAffineTransformEstimator< TPoint >::ConstPointer

Definition at line 76 of file otbLeastSquareAffineTransformEstimator.h.

◆ CovariantVectorType

template<class TPoint >
typedef itk::CovariantVector<PrecisionType, PointDimension> otb::LeastSquareAffineTransformEstimator< TPoint >::CovariantVectorType

Definition at line 90 of file otbLeastSquareAffineTransformEstimator.h.

◆ MatrixType

template<class TPoint >
typedef itk::Matrix<PrecisionType, PointDimension, PointDimension> otb::LeastSquareAffineTransformEstimator< TPoint >::MatrixType

Affine transform components typedefs

Definition at line 95 of file otbLeastSquareAffineTransformEstimator.h.

◆ Pointer

template<class TPoint >
typedef itk::SmartPointer<Self> otb::LeastSquareAffineTransformEstimator< TPoint >::Pointer

Definition at line 75 of file otbLeastSquareAffineTransformEstimator.h.

◆ PointType

template<class TPoint >
typedef TPoint otb::LeastSquareAffineTransformEstimator< TPoint >::PointType

Points typedefs

Definition at line 88 of file otbLeastSquareAffineTransformEstimator.h.

◆ PrecisionType

template<class TPoint >
typedef PointType::CoordRepType otb::LeastSquareAffineTransformEstimator< TPoint >::PrecisionType

Definition at line 89 of file otbLeastSquareAffineTransformEstimator.h.

◆ Self

Standard class typedefs.

Definition at line 73 of file otbLeastSquareAffineTransformEstimator.h.

◆ Superclass

template<class TPoint >
typedef itk::Object otb::LeastSquareAffineTransformEstimator< TPoint >::Superclass

Definition at line 74 of file otbLeastSquareAffineTransformEstimator.h.

◆ TiePointsContainerType

template<class TPoint >
typedef std::vector<TiePointsType> otb::LeastSquareAffineTransformEstimator< TPoint >::TiePointsContainerType

Definition at line 92 of file otbLeastSquareAffineTransformEstimator.h.

◆ TiePointsType

template<class TPoint >
typedef std::pair<PointType, PointType> otb::LeastSquareAffineTransformEstimator< TPoint >::TiePointsType

Definition at line 91 of file otbLeastSquareAffineTransformEstimator.h.

◆ VectorType

template<class TPoint >
typedef itk::Vector<PrecisionType, PointDimension> otb::LeastSquareAffineTransformEstimator< TPoint >::VectorType

Definition at line 96 of file otbLeastSquareAffineTransformEstimator.h.

Constructor & Destructor Documentation

◆ LeastSquareAffineTransformEstimator() [1/2]

◆ ~LeastSquareAffineTransformEstimator()

template<class TPoint >
otb::LeastSquareAffineTransformEstimator< TPoint >::~LeastSquareAffineTransformEstimator
overrideprotected

Destructor

Definition at line 43 of file otbLeastSquareAffineTransformEstimator.hxx.

◆ LeastSquareAffineTransformEstimator() [2/2]

template<class TPoint >
otb::LeastSquareAffineTransformEstimator< TPoint >::LeastSquareAffineTransformEstimator ( const Self )
privatedelete

Member Function Documentation

◆ AddTiePoints()

template<class TPoint >
void otb::LeastSquareAffineTransformEstimator< TPoint >::AddTiePoints ( const PointType src,
const PointType dst 
)

Add a pair of tie points

Definition at line 69 of file otbLeastSquareAffineTransformEstimator.hxx.

◆ ClearTiePoints()

template<class TPoint >
void otb::LeastSquareAffineTransformEstimator< TPoint >::ClearTiePoints

Clear all tie points

Definition at line 62 of file otbLeastSquareAffineTransformEstimator.hxx.

◆ Compute()

template<class TPoint >
void otb::LeastSquareAffineTransformEstimator< TPoint >::Compute

The Compute method does the affine least square estimation

Definition at line 79 of file otbLeastSquareAffineTransformEstimator.hxx.

References otbMsgDebugMacro.

◆ CreateAnother()

template<class TPoint >
virtual::itk::LightObject::Pointer otb::LeastSquareAffineTransformEstimator< TPoint >::CreateAnother ( void  ) const

◆ GetMatrix()

template<class TPoint >
virtual const MatrixType& otb::LeastSquareAffineTransformEstimator< TPoint >::GetMatrix ( ) const
virtual

Get the affine transform matrix

◆ GetNameOfClass()

template<class TPoint >
virtual const char* otb::LeastSquareAffineTransformEstimator< TPoint >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

◆ GetOffset()

template<class TPoint >
virtual const VectorType& otb::LeastSquareAffineTransformEstimator< TPoint >::GetOffset ( ) const
virtual

Get the affine transform offset

◆ GetRelativeResidual()

template<class TPoint >
virtual const CovariantVectorType& otb::LeastSquareAffineTransformEstimator< TPoint >::GetRelativeResidual ( ) const
virtual

Get the relative residual

◆ GetRMSError()

template<class TPoint >
virtual const CovariantVectorType& otb::LeastSquareAffineTransformEstimator< TPoint >::GetRMSError ( ) const
virtual

Get the RMS error

◆ GetTiePointsContainer()

template<class TPoint >
LeastSquareAffineTransformEstimator< TPoint >::TiePointsContainerType & otb::LeastSquareAffineTransformEstimator< TPoint >::GetTiePointsContainer

Get the GCPsContainer

Returns
The GCPs container

Definition at line 50 of file otbLeastSquareAffineTransformEstimator.hxx.

◆ itkGetObjectMacro()

template<class TPoint >
otb::LeastSquareAffineTransformEstimator< TPoint >::itkGetObjectMacro ( AffineTransform  ,
AffineTransformType   
)

Get the estimated affine transform

◆ New()

template<class TPoint >
static Pointer otb::LeastSquareAffineTransformEstimator< TPoint >::New ( )
static

Method for creation through the object factory.

◆ operator=()

template<class TPoint >
void otb::LeastSquareAffineTransformEstimator< TPoint >::operator= ( const Self )
privatedelete

◆ PrintSelf()

template<class TPoint >
void otb::LeastSquareAffineTransformEstimator< TPoint >::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
overrideprotected

The PrintSelf method

Definition at line 165 of file otbLeastSquareAffineTransformEstimator.hxx.

◆ SetTiePointsContainer()

template<class TPoint >
void otb::LeastSquareAffineTransformEstimator< TPoint >::SetTiePointsContainer ( const TiePointsContainerType container)

Set the GCP container

Definition at line 56 of file otbLeastSquareAffineTransformEstimator.hxx.

Member Data Documentation

◆ m_AffineTransform

template<class TPoint >
AffineTransformPointerType otb::LeastSquareAffineTransformEstimator< TPoint >::m_AffineTransform
private

◆ m_Matrix

template<class TPoint >
MatrixType otb::LeastSquareAffineTransformEstimator< TPoint >::m_Matrix
private

Affine transform matrix

Definition at line 155 of file otbLeastSquareAffineTransformEstimator.h.

◆ m_Offset

template<class TPoint >
VectorType otb::LeastSquareAffineTransformEstimator< TPoint >::m_Offset
private

Affine transform offset

Definition at line 158 of file otbLeastSquareAffineTransformEstimator.h.

◆ m_RelativeResidual

template<class TPoint >
CovariantVectorType otb::LeastSquareAffineTransformEstimator< TPoint >::m_RelativeResidual
private

Relative residual

Definition at line 152 of file otbLeastSquareAffineTransformEstimator.h.

◆ m_RMSError

template<class TPoint >
CovariantVectorType otb::LeastSquareAffineTransformEstimator< TPoint >::m_RMSError
private

RMS error

Definition at line 149 of file otbLeastSquareAffineTransformEstimator.h.

◆ m_TiePointsContainer

template<class TPoint >
TiePointsContainerType otb::LeastSquareAffineTransformEstimator< TPoint >::m_TiePointsContainer
private

Container of GCPs

Definition at line 146 of file otbLeastSquareAffineTransformEstimator.h.

◆ PointDimension

template<class TPoint >
const unsigned int otb::LeastSquareAffineTransformEstimator< TPoint >::PointDimension = TPoint::PointDimension
static

Extract dimension from input and output image.

Definition at line 85 of file otbLeastSquareAffineTransformEstimator.h.


The documentation for this class was generated from the following files: