te::rp::TiePointsLocatorStrategy Class Referenceabstract

Tie-points locator strategy. More...

#include <TiePointsLocatorStrategy.h>

Inheritance diagram for te::rp::TiePointsLocatorStrategy:
te::rp::TiePointsLocatorMoravecStrategy te::rp::TiePointsLocatorSURFStrategy

Classes

class  InterestPointT
 
class  MatchedInterestPointsT
 

Public Member Functions

virtual void getDefaultSpecStrategyParams (std::unique_ptr< TiePointsLocatorStrategyParameters > &defaultSpecParamsPtr) const =0
 Returns a sub-sampled version of the given locator strategy specific input parameters. More...
 
const std::string & getErrorMessage () const
 Return the current error message if there is any. More...
 
virtual void getSubSampledSpecStrategyParams (const double subSampleOptimizationRescaleFactor, const TiePointsLocatorStrategyParameters &inputSpecParams, std::unique_ptr< TiePointsLocatorStrategyParameters > &subSampledSpecParamsPtr) const =0
 Returns a sub-sampled version of the given locator strategy specific input parameters. More...
 
virtual ~TiePointsLocatorStrategy ()
 

Protected Types

typedef te::rp::Matrix< double > DoublesMatrix
 A matrix do store double values. More...
 
typedef te::rp::Matrix< float > FloatsMatrix
 A matrix do store float values. More...
 
typedef std::list< InterestPointTInterestPointsListT
 
typedef std::multiset< InterestPointTInterestPointsSetT
 
typedef std::multiset< MatchedInterestPointsTMatchedInterestPointsSetT
 
typedef te::rp::Matrix< unsigned char > UCharsMatrix
 A matrix do store unsigned char values. More...
 

Protected Member Functions

virtual unsigned int getAutoMaxTiePointsNumber () const =0
 Returns a automatically calculated optimum maximum amount tie-points following the current parameters. More...
 
virtual bool getMatchedInterestPoints (te::gm::GeometricTransformation const *const raster1ToRaster2TransfPtr, const double raster1ToRaster2TransfDMapError, MatchedInterestPointsSetT &matchedInterestPoints)=0
 Try to find matched interest points. More...
 
virtual bool initialize (const te::rp::TiePointsLocatorInputParameters &inputParameters)=0
 Initialize the strategy. More...
 
virtual void reset ()
 Clear all internal allocated resources and go back to the initial not-initialized state. More...
 
void setErrorMessage (const std::string &newErrorMessage)
 Set the current error message. More...
 
 TiePointsLocatorStrategy ()
 

Static Protected Member Functions

static bool checkForDuplicatedInterestPoints (const InterestPointsSetT &interestPoints, double &x, double &y)
 Check for duplicated interest points. More...
 
static void createTifFromMatrix (const FloatsMatrix &rasterData, const InterestPointsSetT &interestPoints, const std::string &tifFileName)
 Moravec interest points locator. More...
 
static void features2Tiff (const DoublesMatrix &features, const InterestPointsSetT &interestPoints, const std::string &fileNameBeginning)
 Save the generated features to tif files. More...
 
static bool loadRasterData (te::rst::Raster const *rasterPtr, const std::vector< unsigned int > &rasterBands, te::rst::Raster const *maskRasterPtr, const unsigned int maskRasterBand, const unsigned int rasterTargetAreaLineStart, const unsigned int rasterTargetAreaColStart, const unsigned int rasterTargetAreaWidth, const unsigned int rasterTargetAreaHeight, const double desiredRescaleFactorX, const double desiredRescaleFactorY, const te::rst::Interpolator::Method rasterInterpMethod, const unsigned char maxMemPercentUsage, std::vector< boost::shared_ptr< FloatsMatrix > > &loadedRasterData, UCharsMatrix &loadedMaskRasterData, double &achievedRescaleFactorX, double &achievedRescaleFactorY)
 Load rasters data (normalized between 0 and 1). More...
 
template<typename BufferElementT >
static void roolUpBuffer (BufferElementT **bufferPtr, const unsigned int &bufferLinesNumber)
 RoolUp a buffer of lines. More...
 

Private Member Functions

TiePointsLocatorStrategyoperator= (const TiePointsLocatorStrategy &)
 
 TiePointsLocatorStrategy (const TiePointsLocatorStrategy &)
 

Private Attributes

std::string m_errorMessage
 Current error message. More...
 

Friends

class TiePointsLocator
 

Detailed Description

Tie-points locator strategy.

Definition at line 52 of file TiePointsLocatorStrategy.h.

Member Typedef Documentation

◆ DoublesMatrix

A matrix do store double values.

Definition at line 99 of file TiePointsLocatorStrategy.h.

◆ FloatsMatrix

A matrix do store float values.

Definition at line 93 of file TiePointsLocatorStrategy.h.

◆ InterestPointsListT

Interest points list container type

Definition at line 156 of file TiePointsLocatorStrategy.h.

◆ InterestPointsSetT

Interest points set container type

Definition at line 152 of file TiePointsLocatorStrategy.h.

◆ MatchedInterestPointsSetT

Matched interest points container type

Definition at line 199 of file TiePointsLocatorStrategy.h.

◆ UCharsMatrix

A matrix do store unsigned char values.

Definition at line 105 of file TiePointsLocatorStrategy.h.

Constructor & Destructor Documentation

◆ ~TiePointsLocatorStrategy()

virtual te::rp::TiePointsLocatorStrategy::~TiePointsLocatorStrategy ( )
virtual

◆ TiePointsLocatorStrategy() [1/2]

te::rp::TiePointsLocatorStrategy::TiePointsLocatorStrategy ( )
protected

◆ TiePointsLocatorStrategy() [2/2]

te::rp::TiePointsLocatorStrategy::TiePointsLocatorStrategy ( const TiePointsLocatorStrategy )
private

Member Function Documentation

◆ checkForDuplicatedInterestPoints()

static bool te::rp::TiePointsLocatorStrategy::checkForDuplicatedInterestPoints ( const InterestPointsSetT interestPoints,
double &  x,
double &  y 
)
staticprotected

Check for duplicated interest points.

Parameters
xThe duplicated tie-points X coord.
yThe duplicated tie-points Y coord.
Returns
false if duplicated interest points were found.

◆ createTifFromMatrix()

static void te::rp::TiePointsLocatorStrategy::createTifFromMatrix ( const FloatsMatrix rasterData,
const InterestPointsSetT interestPoints,
const std::string &  tifFileName 
)
staticprotected

Moravec interest points locator.

Parameters
rasterDataThe loaded raster data.
interestPointsThe found raster 1 interest points (coords related to rasterData lines/cols).
tifFileNameTif file name.

◆ features2Tiff()

static void te::rp::TiePointsLocatorStrategy::features2Tiff ( const DoublesMatrix features,
const InterestPointsSetT interestPoints,
const std::string &  fileNameBeginning 
)
staticprotected

Save the generated features to tif files.

Parameters
featuresThe features to be saved.
validInteresPointsThe interest pionts related to each feature inside the features matrix.
fileNameStartThe output file name beginning.

◆ getAutoMaxTiePointsNumber()

virtual unsigned int te::rp::TiePointsLocatorStrategy::getAutoMaxTiePointsNumber ( ) const
protectedpure virtual

Returns a automatically calculated optimum maximum amount tie-points following the current parameters.

Returns
Returns a automatically calculated optimum maximum amount tie-points following the current parameters.

Implemented in te::rp::TiePointsLocatorMoravecStrategy, and te::rp::TiePointsLocatorSURFStrategy.

◆ getDefaultSpecStrategyParams()

virtual void te::rp::TiePointsLocatorStrategy::getDefaultSpecStrategyParams ( std::unique_ptr< TiePointsLocatorStrategyParameters > &  defaultSpecParamsPtr) const
pure virtual

Returns a sub-sampled version of the given locator strategy specific input parameters.

Parameters
subSampleOptimizationRescaleFactorSub-sampled optimization tie-points search rescale factor.
inputSpecParamsInput parameters (sub-sample factor 1).
subSampledSpecParamsSub-sampled parameters.

Implemented in te::rp::TiePointsLocatorMoravecStrategy, and te::rp::TiePointsLocatorSURFStrategy.

◆ getErrorMessage()

const std::string& te::rp::TiePointsLocatorStrategy::getErrorMessage ( ) const

Return the current error message if there is any.

Returns
Return the current error message if there is any.

◆ getMatchedInterestPoints()

virtual bool te::rp::TiePointsLocatorStrategy::getMatchedInterestPoints ( te::gm::GeometricTransformation const *const  raster1ToRaster2TransfPtr,
const double  raster1ToRaster2TransfDMapError,
MatchedInterestPointsSetT matchedInterestPoints 
)
protectedpure virtual

Try to find matched interest points.

Parameters
matchedInterestPointsThe matched interest points.
raster1ToRaster2TransfPtrA pointer to a transformation (estimation) direct mapping raster 1 indexed coords into raster 2 indexed coords, of an empty pointer if there is no transformation avaliable.
raster1ToRaster2TransfDMapErrorThe expected transformation error.
Returns
true if OK, false on errors.

Implemented in te::rp::TiePointsLocatorMoravecStrategy, and te::rp::TiePointsLocatorSURFStrategy.

◆ getSubSampledSpecStrategyParams()

virtual void te::rp::TiePointsLocatorStrategy::getSubSampledSpecStrategyParams ( const double  subSampleOptimizationRescaleFactor,
const TiePointsLocatorStrategyParameters inputSpecParams,
std::unique_ptr< TiePointsLocatorStrategyParameters > &  subSampledSpecParamsPtr 
) const
pure virtual

Returns a sub-sampled version of the given locator strategy specific input parameters.

Parameters
subSampleOptimizationRescaleFactorSub-sampled optimization tie-points search rescale factor.
inputSpecParamsInput parameters (sub-sample factor 1).
subSampledSpecParamsPtrSub-sampled parameters.

Implemented in te::rp::TiePointsLocatorMoravecStrategy, and te::rp::TiePointsLocatorSURFStrategy.

◆ initialize()

virtual bool te::rp::TiePointsLocatorStrategy::initialize ( const te::rp::TiePointsLocatorInputParameters inputParameters)
protectedpure virtual

Initialize the strategy.

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

Implemented in te::rp::TiePointsLocatorMoravecStrategy, and te::rp::TiePointsLocatorSURFStrategy.

◆ loadRasterData()

static bool te::rp::TiePointsLocatorStrategy::loadRasterData ( te::rst::Raster const *  rasterPtr,
const std::vector< unsigned int > &  rasterBands,
te::rst::Raster const *  maskRasterPtr,
const unsigned int  maskRasterBand,
const unsigned int  rasterTargetAreaLineStart,
const unsigned int  rasterTargetAreaColStart,
const unsigned int  rasterTargetAreaWidth,
const unsigned int  rasterTargetAreaHeight,
const double  desiredRescaleFactorX,
const double  desiredRescaleFactorY,
const te::rst::Interpolator::Method  rasterInterpMethod,
const unsigned char  maxMemPercentUsage,
std::vector< boost::shared_ptr< FloatsMatrix > > &  loadedRasterData,
UCharsMatrix loadedMaskRasterData,
double &  achievedRescaleFactorX,
double &  achievedRescaleFactorY 
)
staticprotected

Load rasters data (normalized between 0 and 1).

Parameters
rasterPtrInput raster pointer.
rasterBandsInput raster bands.
maskRasterPtrThe related input mask raster pointer (or zero, if no mask raster is avaliable).
maskRasterBandThe input mask raster band to use.
rasterTargetAreaLineStartThe raster target area initial line.
rasterTargetAreaColStartThe raster target area initial column.
rasterTargetAreaWidthThe raster target area width.
rasterTargetAreaHeightThe raster target area height.
desiredRescaleFactorXThe desired Scale factor to be applied on the loaded data.
desiredRescaleFactorYThe desired Scale factor to be applied on the loaded data.
rasterInterpMethodThe interpolation used when loading the input raster.
maxMemPercentUsageThe maximum amount (percent) of memory to use for the loaded data [0,100].
loadedRasterDataThe loaded raster data.
loadedMaskRasterDataThe loaded mask raster data.
desiredRescaleFactorXThe real achieved Scale factor.
desiredRescaleFactorYThe real achieved Scale factor.
Returns
true if ok, false on errors.

◆ operator=()

TiePointsLocatorStrategy& te::rp::TiePointsLocatorStrategy::operator= ( const TiePointsLocatorStrategy )
private

◆ reset()

virtual void te::rp::TiePointsLocatorStrategy::reset ( )
protectedvirtual

Clear all internal allocated resources and go back to the initial not-initialized state.

Reimplemented in te::rp::TiePointsLocatorMoravecStrategy, and te::rp::TiePointsLocatorSURFStrategy.

◆ roolUpBuffer()

template<typename BufferElementT >
static void te::rp::TiePointsLocatorStrategy::roolUpBuffer ( BufferElementT **  bufferPtr,
const unsigned int &  bufferLinesNumber 
)
inlinestaticprotected

RoolUp a buffer of lines.

Parameters
bufferPtrBuffer pointer.
bufferLinesNumberBuffer lines number.

Definition at line 297 of file TiePointsLocatorStrategy.h.

◆ setErrorMessage()

void te::rp::TiePointsLocatorStrategy::setErrorMessage ( const std::string &  newErrorMessage)
protected

Set the current error message.

Parameters
newErrorMessageNew error message;

Friends And Related Function Documentation

◆ TiePointsLocator

friend class TiePointsLocator
friend

Definition at line 54 of file TiePointsLocatorStrategy.h.

Member Data Documentation

◆ m_errorMessage

std::string te::rp::TiePointsLocatorStrategy::m_errorMessage
private

Current error message.

Definition at line 365 of file TiePointsLocatorStrategy.h.


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