Loading...
Searching...
No Matches
te::gm::GeometricTransformation Class Referenceabstract

2D Geometric transformation base class. More...

#include <GeometricTransformation.h>

Inheritance diagram for te::gm::GeometricTransformation:
te::gm::AffineGT te::gm::ProjectiveGT te::gm::RSTGT te::gm::SecondDegreePolynomialGT te::gm::ThirdDegreePolynomialGT te::gm::TranslationGT

Public Member Functions

virtual GeometricTransformationclone () const =0
 Creat a clone copy of this instance.
 
void directMap (const Coord2D &pt1, Coord2D &pt2) const
 Direct mapping (from pt1 space into pt2 space).
 
void directMap (const double &pt1X, const double &pt1Y, double &pt2X, double &pt2Y) const
 Direct mapping ( from pt1 space into pt2 space ).
 
void directMap (const GTParameters &params, const Coord2D &pt1, Coord2D &pt2) const
 Direct mapping (from pt1 space into pt2 space).
 
virtual void directMap (const GTParameters &params, const double &pt1X, const double &pt1Y, double &pt2X, double &pt2Y) const =0
 Direct mapping (from pt1 space into pt2 space).
 
double getDirectMappingError (const GTParameters::TiePoint &tiePoint) const
 Calculates the direct mapping error for the supplied tie-point.
 
double getDirectMappingError (const GTParameters::TiePoint &tiePoint, const GTParameters &params) const
 Calculates the direct mapping error for the supplied tie-point.
 
double getDirectMapRMSE () const
 Calculates root mean square direct mapping error.
 
double getDirectMapRMSE (const GTParameters &params) const
 Calculates root mean square direct mapping error for the supplied parameters.
 
double getDirectMapRMSE (const std::vector< GTParameters::TiePoint > &tiePoints) const
 Calculates root mean square direct mapping error for the supplied tie-points.
 
double getDirectMapRMSE (const std::vector< GTParameters::TiePoint > &tiePoints, const GTParameters &params) const
 Calculates root mean square direct mapping error for the supplied tie-points using the supplied parameters.
 
double getInverseMappingError (const GTParameters::TiePoint &tiePoint) const
 Calculates the inverse mapping error for the supplied tie-point.
 
double getInverseMappingError (const GTParameters::TiePoint &tiePoint, const GTParameters &params) const
 Calculates the inverse mapping error for the supplied tie-point.
 
double getInverseMapRMSE () const
 Calculates root mean square inverse mapping error.
 
double getInverseMapRMSE (const GTParameters &params) const
 Calculates root mean square inverse mapping error for the supplied parameters.
 
double getInverseMapRMSE (const std::vector< GTParameters::TiePoint > &tiePoints) const
 Calculates root mean square inverse mapping error for the supplied tie-points.
 
double getInverseMapRMSE (const std::vector< GTParameters::TiePoint > &tiePoints, const GTParameters &params) const
 Calculates root mean square inverse mapping error for the supplied tie-points using the supplied parameters.
 
double getMaxDirectMappingError () const
 Calculates the current transformation maximum direct mapping error.
 
double getMaxDirectMappingError (const GTParameters &params) const
 Calculates maximum direct mapping error for the supplied parameters.
 
double getMaxInverseMappingError () const
 Calculates the current transformation maximum inverse mapping error.
 
double getMaxInverseMappingError (const GTParameters &params) const
 Calculates maximum inverse mapping error for the supplied parameters.
 
virtual unsigned int getMinRequiredTiePoints () const =0
 Returns the minimum number of required tie-points for the current transformation.
 
virtual const std::string & getName () const =0
 Returns the current transformation name.
 
const GTParametersgetParameters () const
 Returns a reference of the current internal transformation parameters.
 
bool initialize (const GTParameters &newParameters)
 Initialize the current transformation following the new supplied parameters.
 
void inverseMap (const Coord2D &pt2, Coord2D &pt1) const
 Inverse mapping (from pt2 space into pt1 space).
 
void inverseMap (const double &pt2X, const double &pt2Y, double &pt1X, double &pt1Y) const
 Inverse mapping (from pt2 space into pt1 space).
 
void inverseMap (const GTParameters &params, const Coord2D &pt2, Coord2D &pt1) const
 Inverse mapping ( from pt2 space into pt1 space ).
 
virtual void inverseMap (const GTParameters &params, const double &pt2X, const double &pt2Y, double &pt1X, double &pt1Y) const =0
 Inverse mapping (from pt2 space into pt1 space).
 
bool isValid () const
 Tells if the current instance has a valid transformation.
 
virtual bool isValid (const GTParameters &params) const =0
 Verifies if the supplied parameters already has a valid transformation.
 
virtual ~GeometricTransformation ()
 Virtual destructor.
 

Protected Member Functions

virtual bool computeParameters (GTParameters &params) const =0
 Calculate the transformation parameters following the new supplied tie-points.
 
 GeometricTransformation ()
 Default constructor.
 

Protected Attributes

GTParameters m_internalParameters
 The current internal parameters.
 

Friends

class GTFilter
 

Detailed Description

2D Geometric transformation base class.

Definition at line 56 of file GeometricTransformation.h.

Constructor & Destructor Documentation

◆ ~GeometricTransformation()

virtual te::gm::GeometricTransformation::~GeometricTransformation ( )
virtual

Virtual destructor.

◆ GeometricTransformation()

Member Function Documentation

◆ clone()

virtual GeometricTransformation * te::gm::GeometricTransformation::clone ( ) const
pure virtual

Creat a clone copy of this instance.

Returns
A clone copy of this instance (the caller of this method must take the ownership of the returned object and delete it when appropriate.

Implemented in te::gm::AffineGT, te::gm::ProjectiveGT, te::gm::RSTGT, te::gm::SecondDegreePolynomialGT, te::gm::ThirdDegreePolynomialGT, and te::gm::TranslationGT.

References GeometricTransformation().

◆ computeParameters()

virtual bool te::gm::GeometricTransformation::computeParameters ( GTParameters & params) const
protectedpure virtual

Calculate the transformation parameters following the new supplied tie-points.

Parameters
paramsTransformation parameters.
Returns
true if OK, false on errors.

Implemented in te::gm::AffineGT, te::gm::ProjectiveGT, te::gm::RSTGT, te::gm::SecondDegreePolynomialGT, te::gm::ThirdDegreePolynomialGT, and te::gm::TranslationGT.

◆ directMap() [1/4]

void te::gm::GeometricTransformation::directMap ( const Coord2D & pt1,
Coord2D & pt2 ) const
inline

Direct mapping (from pt1 space into pt2 space).

Parameters
pt1pt1 coordinate.
pt2pt2 coordinate.

Definition at line 161 of file GeometricTransformation.h.

References directMap(), isValid(), m_internalParameters, te::gm::Coord2D::x, and te::gm::Coord2D::y.

◆ directMap() [2/4]

void te::gm::GeometricTransformation::directMap ( const double & pt1X,
const double & pt1Y,
double & pt2X,
double & pt2Y ) const
inline

Direct mapping ( from pt1 space into pt2 space ).

Parameters
pt1Xpt1 X coordinate.
pt1Ypt1 Y coordinate.
pt2Xpt2 X coordinate.
pt2Ypt2 Y coordinate.

Definition at line 133 of file GeometricTransformation.h.

References directMap(), isValid(), and m_internalParameters.

◆ directMap() [3/4]

void te::gm::GeometricTransformation::directMap ( const GTParameters & params,
const Coord2D & pt1,
Coord2D & pt2 ) const
inline

Direct mapping (from pt1 space into pt2 space).

Parameters
paramsTransformation parameters.
pt1pt1 coordinate.
pt2pt2 coordinate.

Definition at line 150 of file GeometricTransformation.h.

References directMap(), te::gm::Coord2D::x, and te::gm::Coord2D::y.

◆ directMap() [4/4]

virtual void te::gm::GeometricTransformation::directMap ( const GTParameters & params,
const double & pt1X,
const double & pt1Y,
double & pt2X,
double & pt2Y ) const
pure virtual

Direct mapping (from pt1 space into pt2 space).

Parameters
paramsTransformation parameters.
pt1Xpt1 X coordinate.
pt1Ypt1 Y coordinate.
pt2Xpt2 X coordinate.
pt2Ypt2 Y coordinate.

Implemented in te::gm::AffineGT, te::gm::ProjectiveGT, te::gm::RSTGT, te::gm::SecondDegreePolynomialGT, te::gm::ThirdDegreePolynomialGT, and te::gm::TranslationGT.

Referenced by directMap(), directMap(), and directMap().

◆ getDirectMappingError() [1/2]

double te::gm::GeometricTransformation::getDirectMappingError ( const GTParameters::TiePoint & tiePoint) const
inline

Calculates the direct mapping error for the supplied tie-point.

Parameters
tiePointThe tie-point.
Returns
The current direct mapping error.

Definition at line 374 of file GeometricTransformation.h.

References getDirectMappingError(), and m_internalParameters.

◆ getDirectMappingError() [2/2]

double te::gm::GeometricTransformation::getDirectMappingError ( const GTParameters::TiePoint & tiePoint,
const GTParameters & params ) const

Calculates the direct mapping error for the supplied tie-point.

Parameters
tiePointThe tie-point.
paramsTransformation parameters.
Returns
The current maximum direct mapping error.

Referenced by getDirectMappingError().

◆ getDirectMapRMSE() [1/4]

double te::gm::GeometricTransformation::getDirectMapRMSE ( ) const
inline

Calculates root mean square direct mapping error.

Returns
The root mean square error.

Definition at line 305 of file GeometricTransformation.h.

References getDirectMapRMSE(), and m_internalParameters.

◆ getDirectMapRMSE() [2/4]

double te::gm::GeometricTransformation::getDirectMapRMSE ( const GTParameters & params) const
inline

Calculates root mean square direct mapping error for the supplied parameters.

Parameters
paramsTransformation parameters.
Returns
The root mean square error.

Definition at line 283 of file GeometricTransformation.h.

References getDirectMapRMSE(), and te::gm::GTParameters::m_tiePoints.

◆ getDirectMapRMSE() [3/4]

double te::gm::GeometricTransformation::getDirectMapRMSE ( const std::vector< GTParameters::TiePoint > & tiePoints) const
inline

Calculates root mean square direct mapping error for the supplied tie-points.

Parameters
tiePointsThe tie-points.
Returns
The root mean square error.

Definition at line 295 of file GeometricTransformation.h.

References getDirectMapRMSE(), and m_internalParameters.

◆ getDirectMapRMSE() [4/4]

double te::gm::GeometricTransformation::getDirectMapRMSE ( const std::vector< GTParameters::TiePoint > & tiePoints,
const GTParameters & params ) const

Calculates root mean square direct mapping error for the supplied tie-points using the supplied parameters.

Parameters
tiePointsThe tie-points.
paramsTransformation parameters.
Returns
The root mean square error.

Referenced by getDirectMapRMSE(), getDirectMapRMSE(), and getDirectMapRMSE().

◆ getInverseMappingError() [1/2]

double te::gm::GeometricTransformation::getInverseMappingError ( const GTParameters::TiePoint & tiePoint) const
inline

Calculates the inverse mapping error for the supplied tie-point.

Parameters
tiePointThe tie-point.
Returns
The current inverse mapping error.

Definition at line 397 of file GeometricTransformation.h.

References getInverseMappingError(), and m_internalParameters.

◆ getInverseMappingError() [2/2]

double te::gm::GeometricTransformation::getInverseMappingError ( const GTParameters::TiePoint & tiePoint,
const GTParameters & params ) const

Calculates the inverse mapping error for the supplied tie-point.

Parameters
tiePointThe tie-point.
paramsTransformation parameters.
Returns
The current maximum inverse mapping error.

Referenced by getInverseMappingError().

◆ getInverseMapRMSE() [1/4]

double te::gm::GeometricTransformation::getInverseMapRMSE ( ) const
inline

Calculates root mean square inverse mapping error.

Returns
The root mean square error.

Definition at line 351 of file GeometricTransformation.h.

References getInverseMapRMSE(), and m_internalParameters.

◆ getInverseMapRMSE() [2/4]

double te::gm::GeometricTransformation::getInverseMapRMSE ( const GTParameters & params) const
inline

Calculates root mean square inverse mapping error for the supplied parameters.

Parameters
paramsTransformation parameters.
Returns
The root mean square error.

Definition at line 329 of file GeometricTransformation.h.

References getInverseMapRMSE(), and te::gm::GTParameters::m_tiePoints.

◆ getInverseMapRMSE() [3/4]

double te::gm::GeometricTransformation::getInverseMapRMSE ( const std::vector< GTParameters::TiePoint > & tiePoints) const
inline

Calculates root mean square inverse mapping error for the supplied tie-points.

Parameters
tiePointsThe tie-points.
Returns
The root mean square error.

Definition at line 341 of file GeometricTransformation.h.

References getInverseMapRMSE(), and m_internalParameters.

◆ getInverseMapRMSE() [4/4]

double te::gm::GeometricTransformation::getInverseMapRMSE ( const std::vector< GTParameters::TiePoint > & tiePoints,
const GTParameters & params ) const

Calculates root mean square inverse mapping error for the supplied tie-points using the supplied parameters.

Parameters
tiePointsThe tie-points.
paramsTransformation parameters.
Returns
The root mean square error.

Referenced by getInverseMapRMSE(), getInverseMapRMSE(), and getInverseMapRMSE().

◆ getMaxDirectMappingError() [1/2]

double te::gm::GeometricTransformation::getMaxDirectMappingError ( ) const
inline

Calculates the current transformation maximum direct mapping error.

Returns
The current maximum direct mapping error.

Definition at line 240 of file GeometricTransformation.h.

References getMaxDirectMappingError(), and m_internalParameters.

◆ getMaxDirectMappingError() [2/2]

double te::gm::GeometricTransformation::getMaxDirectMappingError ( const GTParameters & params) const

Calculates maximum direct mapping error for the supplied parameters.

Parameters
paramsTransformation parameters.
Returns
The maximum direct mapping error for the supplied parameters.

Referenced by getMaxDirectMappingError().

◆ getMaxInverseMappingError() [1/2]

double te::gm::GeometricTransformation::getMaxInverseMappingError ( ) const
inline

Calculates the current transformation maximum inverse mapping error.

Returns
The current maximum inverse mapping error.

Definition at line 259 of file GeometricTransformation.h.

References getMaxInverseMappingError(), and m_internalParameters.

◆ getMaxInverseMappingError() [2/2]

double te::gm::GeometricTransformation::getMaxInverseMappingError ( const GTParameters & params) const

Calculates maximum inverse mapping error for the supplied parameters.

Parameters
paramsTransformation parameters.
Returns
The maximum inverse mapping error for the supplied parameters.

Referenced by getMaxInverseMappingError().

◆ getMinRequiredTiePoints()

virtual unsigned int te::gm::GeometricTransformation::getMinRequiredTiePoints ( ) const
pure virtual

Returns the minimum number of required tie-points for the current transformation.

Returns
The minimum number of required tie-points for the current transformation.

Implemented in te::gm::AffineGT, te::gm::ProjectiveGT, te::gm::RSTGT, te::gm::SecondDegreePolynomialGT, te::gm::ThirdDegreePolynomialGT, and te::gm::TranslationGT.

◆ getName()

virtual const std::string & te::gm::GeometricTransformation::getName ( ) const
pure virtual

Returns the current transformation name.

Returns
The current transformation name.

Implemented in te::gm::AffineGT, te::gm::ProjectiveGT, te::gm::RSTGT, te::gm::SecondDegreePolynomialGT, te::gm::ThirdDegreePolynomialGT, and te::gm::TranslationGT.

◆ getParameters()

const GTParameters & te::gm::GeometricTransformation::getParameters ( ) const
inline

Returns a reference of the current internal transformation parameters.

Returns
A reference of the current internal transformation parameters.

Definition at line 105 of file GeometricTransformation.h.

References m_internalParameters.

◆ initialize()

bool te::gm::GeometricTransformation::initialize ( const GTParameters & newParameters)

Initialize the current transformation following the new supplied parameters.

Parameters
newparamsThe new parameters.
Returns
true if OK, false on errors.

◆ inverseMap() [1/4]

void te::gm::GeometricTransformation::inverseMap ( const Coord2D & pt2,
Coord2D & pt1 ) const
inline

Inverse mapping (from pt2 space into pt1 space).

Parameters
pt2pt2 coordinate.
pt1pt1 coordinate.

Definition at line 219 of file GeometricTransformation.h.

References inverseMap(), isValid(), m_internalParameters, te::gm::Coord2D::x, and te::gm::Coord2D::y.

◆ inverseMap() [2/4]

void te::gm::GeometricTransformation::inverseMap ( const double & pt2X,
const double & pt2Y,
double & pt1X,
double & pt1Y ) const
inline

Inverse mapping (from pt2 space into pt1 space).

Parameters
pt1Xpt1 X coordinate.
pt1Ypt1 Y coordinate.
pt2Xpt2 X coordinate.
pt2Ypt2 Y coordinate.

Definition at line 191 of file GeometricTransformation.h.

References inverseMap(), isValid(), and m_internalParameters.

◆ inverseMap() [3/4]

void te::gm::GeometricTransformation::inverseMap ( const GTParameters & params,
const Coord2D & pt2,
Coord2D & pt1 ) const
inline

Inverse mapping ( from pt2 space into pt1 space ).

Parameters
paramsTransformation parameters.
pt2pt2 coordinate.
pt1pt1 coordinate.

Definition at line 208 of file GeometricTransformation.h.

References inverseMap(), te::gm::Coord2D::x, and te::gm::Coord2D::y.

◆ inverseMap() [4/4]

virtual void te::gm::GeometricTransformation::inverseMap ( const GTParameters & params,
const double & pt2X,
const double & pt2Y,
double & pt1X,
double & pt1Y ) const
pure virtual

Inverse mapping (from pt2 space into pt1 space).

Parameters
paramsTransformation parameters.
pt1Xpt1 X coordinate.
pt1Ypt1 Y coordinate.
pt2Xpt2 X coordinate.
pt2Ypt2 Y coordinate.

Implemented in te::gm::AffineGT, te::gm::ProjectiveGT, te::gm::RSTGT, te::gm::SecondDegreePolynomialGT, te::gm::ThirdDegreePolynomialGT, and te::gm::TranslationGT.

Referenced by inverseMap(), inverseMap(), and inverseMap().

◆ isValid() [1/2]

bool te::gm::GeometricTransformation::isValid ( ) const
inline

Tells if the current instance has a valid transformation.

Returns
true if a transformation is already defined, false otherwise.

Definition at line 86 of file GeometricTransformation.h.

References isValid(), and m_internalParameters.

◆ isValid() [2/2]

virtual bool te::gm::GeometricTransformation::isValid ( const GTParameters & params) const
pure virtual

Verifies if the supplied parameters already has a valid transformation.

Parameters
paramsTransformation parameters.
Returns
true if a transformation is already defined, false otherwise.

Implemented in te::gm::AffineGT, te::gm::ProjectiveGT, te::gm::RSTGT, te::gm::SecondDegreePolynomialGT, te::gm::ThirdDegreePolynomialGT, and te::gm::TranslationGT.

Referenced by directMap(), directMap(), inverseMap(), inverseMap(), and isValid().

Friends And Related Symbol Documentation

◆ GTFilter

friend class GTFilter
friend

Definition at line 58 of file GeometricTransformation.h.

References GTFilter.

Referenced by GTFilter.

Member Data Documentation

◆ m_internalParameters


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