OTB  5.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,
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 Types inherited from itk::Object
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef Object Self
 
typedef LightObject Superclass
 
- Public Types inherited from itk::LightObject
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef LightObject Self
 

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)
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
const MetaDataDictionaryGetMetaDataDictionary (void) const
 
MetaDataDictionaryGetMetaDataDictionary (void)
 
virtual ModifiedTimeType GetMTime () const
 
virtual const std::string & GetObjectName () const
 
virtual const TimeStampGetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
virtual void Register () const ITK_OVERRIDE
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
virtual void SetObjectName (std::string _arg)
 
virtual void SetReferenceCount (int) ITK_OVERRIDE
 
virtual void UnRegister () const ITK_OVERRIDE
 
- Public Member Functions inherited from itk::LightObject
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
 itkCloneMacro (Self)
 
void Print (std::ostream &os, Indent indent=0) const
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
 
static void GlobalWarningDisplayOff ()
 
static void GlobalWarningDisplayOn ()
 
static Pointer New ()
 
static void SetGlobalWarningDisplay (bool flag)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 

Static Public Attributes

static const unsigned int PointDimension = TPoint::PointDimension
 

Protected Member Functions

 LeastSquareAffineTransformEstimator ()
 
virtual void PrintSelf (std::ostream &os, itk::Indent indent) const
 
virtual ~LeastSquareAffineTransformEstimator ()
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &time)
 
virtual ~Object ()
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 

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
 

Additional Inherited Members

- Protected Types inherited from itk::LightObject
typedef int InternalReferenceCountType
 
- Protected Attributes inherited from itk::LightObject
InternalReferenceCountType m_ReferenceCount
 
SimpleFastMutexLock m_ReferenceCountLock
 

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

Member Typedef Documentation

Definition at line 101 of file otbLeastSquareAffineTransformEstimator.h.

Definition at line 100 of file otbLeastSquareAffineTransformEstimator.h.

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

Definition at line 73 of file otbLeastSquareAffineTransformEstimator.h.

Definition at line 89 of file otbLeastSquareAffineTransformEstimator.h.

Affine transform components typedefs

Definition at line 96 of file otbLeastSquareAffineTransformEstimator.h.

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

Definition at line 72 of file otbLeastSquareAffineTransformEstimator.h.

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

Points typedefs

Definition at line 86 of file otbLeastSquareAffineTransformEstimator.h.

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

Definition at line 87 of file otbLeastSquareAffineTransformEstimator.h.

Standard class typedefs.

Definition at line 70 of file otbLeastSquareAffineTransformEstimator.h.

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

Definition at line 71 of file otbLeastSquareAffineTransformEstimator.h.

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

Definition at line 91 of file otbLeastSquareAffineTransformEstimator.h.

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

Definition at line 90 of file otbLeastSquareAffineTransformEstimator.h.

Definition at line 98 of file otbLeastSquareAffineTransformEstimator.h.

Constructor & Destructor Documentation

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

Constructor

Definition at line 32 of file otbLeastSquareAffineTransformEstimator.txx.

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

Destructor

Definition at line 45 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 80 of file otbLeastSquareAffineTransformEstimator.txx.

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

Clear all tie points

Definition at line 71 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 92 of file otbLeastSquareAffineTransformEstimator.txx.

References otbMsgDebugMacro.

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

Reimplemented from itk::Object.

template<class TPoint >
virtual const MatrixType& otb::LeastSquareAffineTransformEstimator< TPoint >::GetMatrix ( ) const
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).

Reimplemented from itk::Object.

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

Get the affine transform offset

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

Get the relative residual

template<class TPoint >
virtual const CovariantVectorType& otb::LeastSquareAffineTransformEstimator< TPoint >::GetRMSError ( ) const
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 55 of file otbLeastSquareAffineTransformEstimator.txx.

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

Get the estimated affine transfrom

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

Reimplemented from itk::Object.

Definition at line 181 of file otbLeastSquareAffineTransformEstimator.txx.

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

Set the GCP container

Definition at line 63 of file otbLeastSquareAffineTransformEstimator.txx.

Member Data Documentation

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

Affine transfrom

Definition at line 164 of file otbLeastSquareAffineTransformEstimator.h.

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

Affine transform matrix

Definition at line 158 of file otbLeastSquareAffineTransformEstimator.h.

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

Affine transform offset

Definition at line 161 of file otbLeastSquareAffineTransformEstimator.h.

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

Relative residual

Definition at line 155 of file otbLeastSquareAffineTransformEstimator.h.

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

RMS error

Definition at line 152 of file otbLeastSquareAffineTransformEstimator.h.

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

Container of GCPs

Definition at line 149 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 83 of file otbLeastSquareAffineTransformEstimator.h.


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