40   if(isValid(newParameters))
 
   42     m_internalParameters = newParameters;
 
   50     m_internalParameters = newParameters;
 
   52     if(computeParameters( m_internalParameters))
 
   58       m_internalParameters.
reset();
 
   66   assert(isValid(params));
 
   68   const unsigned int tiepointsSize = 
static_cast<unsigned int>(params.
m_tiePoints.size());
 
   70   double maxError = 0.0;
 
   71   double currentError = 0.0;
 
   73   for(
unsigned int tpIndex = 0; tpIndex < tiepointsSize; ++tpIndex)
 
   75     currentError = getDirectMappingError( params.
m_tiePoints[ tpIndex ], params );
 
   77     if( currentError > maxError ) 
 
   79       maxError = currentError;
 
   88   assert( isValid( params ) );
 
   90   const unsigned int tiepointsSize = 
static_cast<unsigned int>(params.
m_tiePoints.size());
 
   92   double maxError = 0.0;
 
   94   double currentError = 0.0;
 
   96   for( 
unsigned int tpIndex = 0 ; tpIndex < tiepointsSize ; ++tpIndex )
 
   98     currentError = getInverseMappingError( params.
m_tiePoints[ tpIndex ], params );
 
  100     if( currentError > maxError ) 
 
  102       maxError = currentError;
 
  110   const std::vector< GTParameters::TiePoint >& tiePoints,
 
  113   assert( isValid( params ) );
 
  115   const unsigned int tiepointsSize = 
static_cast<unsigned int>(tiePoints.size());
 
  117   if( tiepointsSize == 0 )
 
  123     double error2Sum = 0.0;
 
  125     double currentError = 0.0;
 
  127     for( 
unsigned int tpIndex = 0 ; tpIndex < tiepointsSize ; ++tpIndex ) 
 
  129       currentError = getDirectMappingError( tiePoints[ tpIndex ], params );
 
  131       error2Sum += ( currentError * currentError );
 
  134     return sqrt( error2Sum / static_cast<double>(tiepointsSize) );
 
  139   const std::vector< GTParameters::TiePoint >& tiePoints,
 
  142   assert( isValid( params ) );
 
  144   const unsigned int tiepointsSize = 
static_cast<unsigned int>(tiePoints.size());
 
  146   if( tiepointsSize == 0 )
 
  152     double error2Sum = 0.0;
 
  153     double currentError = 0.0;
 
  155     for( 
unsigned int tpIndex = 0 ; tpIndex < tiepointsSize ; ++tpIndex ) 
 
  157       currentError = getInverseMappingError( tiePoints[ tpIndex ], 
 
  160       error2Sum += ( currentError * currentError );
 
  163     return sqrt( error2Sum / static_cast<double>(tiepointsSize) );
 
  169   assert( isValid( params ) );
 
  173   directMap( params, tiePoint.first, directMappedPoint );
 
  175   double diffX = tiePoint.second.x - directMappedPoint.
x;
 
  176   double diffY = tiePoint.second.y - directMappedPoint.
y;
 
  178   return hypot( diffX, diffY );
 
  183   assert( isValid( params ) );
 
  187   inverseMap( params, tiePoint.second, inverseMappedPoint );
 
  189   double diffX = tiePoint.first.x - inverseMappedPoint.
x;
 
  190   double diffY = tiePoint.first.y - inverseMappedPoint.
y;
 
  192   return hypot( diffX, diffY );
 
double getDirectMapRMSE() const 
Calculates root mean square direct mapping error. 
 
double getMaxInverseMappingError() const 
Calculates the current transformation maximum inverse mapping error. 
 
bool initialize(const GTParameters &newParameters)
Initialize the current transformation following the new supplied parameters. 
 
void reset()
Clear all internal allocated resources and reset the parameters instance to its initial state...
 
virtual ~GeometricTransformation()
Virtual destructor. 
 
An utility struct for representing 2D coordinates. 
 
GeometricTransformation()
Default constructor. 
 
std::vector< TiePoint > m_tiePoints
Tie points. 
 
double getMaxDirectMappingError() const 
Calculates the current transformation maximum direct mapping error. 
 
double getDirectMappingError(const GTParameters::TiePoint &tiePoint, const GTParameters ¶ms) const 
Calculates the direct mapping error for the supplied tie-point. 
 
double getInverseMapRMSE() const 
Calculates root mean square inverse mapping error. 
 
double getInverseMappingError(const GTParameters::TiePoint &tiePoint, const GTParameters ¶ms) const 
Calculates the inverse mapping error for the supplied tie-point. 
 
2D Geometric transformation parameters. 
 
std::pair< Coord2D, Coord2D > TiePoint
Tie point type definition. 
 
2D Geometric transformation base class.