Orfeo ToolBox  4.2
Orfeo ToolBox is not a black box
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

This class provide the affine transform LSQR estimation. More...

#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,
PointDimension
AffineTransformType
 
typedef itk::SmartPointer
< const Self
ConstPointer
 
typedef itk::CovariantVector
< PrecisionType,
PointDimension
CovariantVectorType
 
typedef itk::Matrix
< PrecisionType,
PointDimension, PointDimension
MatrixType
 
typedef itk::SmartPointer< SelfPointer
 
typedef TPoint PointType
 
typedef PointType::CoordRepType PrecisionType
 
typedef
LeastSquareAffineTransformEstimator 
Self
 
typedef itk::Object Superclass
 
typedef std::vector
< TiePointsType
TiePointsContainerType
 
typedef std::pair< PointType,
PointType
TiePointsType
 
typedef itk::Vector
< PrecisionType,
PointDimension
VectorType
 

Public Member Functions

void AddTiePoints (const PointType &src, const PointType &dst)
 
void ClearTiePoints ()
 
void Compute ()
 
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual AffineTransformTypeGetAffineTransform ()
 
virtual const MatrixTypeGetMatrix ()
 
virtual const char * GetNameOfClass () const
 
virtual const VectorTypeGetOffset ()
 
virtual const CovariantVectorTypeGetRelativeResidual ()
 
virtual const CovariantVectorTypeGetRMSError ()
 
TiePointsContainerTypeGetTiePointsContainer ()
 
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 ()
 
virtual ~LeastSquareAffineTransformEstimator ()
 
virtual void PrintSelf (std::ostream &os, itk::Indent indent) const
 

Private Member Functions

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

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 transfrom 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 to remove all the tie points that has been previously set.

Once all the tie points have been feeded 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 GetAffineTransfrom() methods return a pointer to a fully set-up forward affine transfrom (

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 63 of file otbLeastSquareAffineTransformEstimator.h.

Member Typedef Documentation

Definition at line 99 of file otbLeastSquareAffineTransformEstimator.h.

Definition at line 98 of file otbLeastSquareAffineTransformEstimator.h.

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

Definition at line 71 of file otbLeastSquareAffineTransformEstimator.h.

Definition at line 87 of file otbLeastSquareAffineTransformEstimator.h.

Affine transform components typedefs

Definition at line 94 of file otbLeastSquareAffineTransformEstimator.h.

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

Definition at line 70 of file otbLeastSquareAffineTransformEstimator.h.

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

Points typedefs

Definition at line 84 of file otbLeastSquareAffineTransformEstimator.h.

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

Definition at line 85 of file otbLeastSquareAffineTransformEstimator.h.

Standard class typedefs.

Definition at line 68 of file otbLeastSquareAffineTransformEstimator.h.

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

Definition at line 69 of file otbLeastSquareAffineTransformEstimator.h.

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

Definition at line 89 of file otbLeastSquareAffineTransformEstimator.h.

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

Definition at line 88 of file otbLeastSquareAffineTransformEstimator.h.

Definition at line 96 of file otbLeastSquareAffineTransformEstimator.h.

Constructor & Destructor Documentation

template<class TPoint >
otb::LeastSquareAffineTransformEstimator< TPoint >::LeastSquareAffineTransformEstimator ( )
protected

Constructor

Definition at line 31 of file otbLeastSquareAffineTransformEstimator.txx.

template<class TPoint >
otb::LeastSquareAffineTransformEstimator< TPoint >::~LeastSquareAffineTransformEstimator ( )
protectedvirtual

Destructor

Definition at line 44 of file otbLeastSquareAffineTransformEstimator.txx.

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

Member Function Documentation

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

Add a pair of tie points

Definition at line 79 of file otbLeastSquareAffineTransformEstimator.txx.

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

Clear all tie points

Definition at line 70 of file otbLeastSquareAffineTransformEstimator.txx.

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

The Compute method does the affine least square estimation

Definition at line 91 of file otbLeastSquareAffineTransformEstimator.txx.

References otbMsgDebugMacro.

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

Get the estimated affine transfrom

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

Get the affine transform matrix

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

Run-time type information (and related methods).

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

Get the affine transform offset

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

Get the relative residual

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

Get the RMS error

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

Get the GCPsContainer

Returns
The GCPs container

Definition at line 54 of file otbLeastSquareAffineTransformEstimator.txx.

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

Method for creation through the object factory.

template<class TPoint >
void otb::LeastSquareAffineTransformEstimator< TPoint >::operator= ( const Self )
private
template<class TPoint >
void otb::LeastSquareAffineTransformEstimator< TPoint >::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
protectedvirtual

The PrintSelf method

Definition at line 180 of file otbLeastSquareAffineTransformEstimator.txx.

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

Set the GCP container

Definition at line 62 of file otbLeastSquareAffineTransformEstimator.txx.

Member Data Documentation

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

Affine transfrom

Definition at line 161 of file otbLeastSquareAffineTransformEstimator.h.

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

Affine transform matrix

Definition at line 155 of file otbLeastSquareAffineTransformEstimator.h.

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

Affine transform offset

Definition at line 158 of file otbLeastSquareAffineTransformEstimator.h.

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

Relative residual

Definition at line 152 of file otbLeastSquareAffineTransformEstimator.h.

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

RMS error

Definition at line 149 of file otbLeastSquareAffineTransformEstimator.h.

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

Container of GCPs

Definition at line 146 of file otbLeastSquareAffineTransformEstimator.h.

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

Extract dimension from input and output image.

Definition at line 81 of file otbLeastSquareAffineTransformEstimator.h.


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