All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 ~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
< InterestPointT
InterestPointsSetT
 
typedef std::multiset
< MatchedInterestPointsT
MatchedInterestPointsSetT
 
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 ()=0
 Clear all internal allocated resources and go back to the initial not-initialized state. 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

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

Friends

class TiePointsLocator
 

Detailed Description

Tie-points locator strategy.

Definition at line 51 of file TiePointsLocatorStrategy.h.

Member Typedef Documentation

A matrix do store double values.

Definition at line 71 of file TiePointsLocatorStrategy.h.

A matrix do store float values.

Definition at line 65 of file TiePointsLocatorStrategy.h.

Interest points list container type

Definition at line 128 of file TiePointsLocatorStrategy.h.

Interest points set container type

Definition at line 124 of file TiePointsLocatorStrategy.h.

Matched interest points container type

Definition at line 171 of file TiePointsLocatorStrategy.h.

A matrix do store unsigned char values.

Definition at line 77 of file TiePointsLocatorStrategy.h.

Constructor & Destructor Documentation

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

Definition at line 41 of file TiePointsLocatorStrategy.cpp.

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

Definition at line 37 of file TiePointsLocatorStrategy.cpp.

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

Definition at line 45 of file TiePointsLocatorStrategy.cpp.

Member Function Documentation

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.

Definition at line 363 of file TiePointsLocatorStrategy.cpp.

Referenced by te::rp::TiePointsLocatorSURFStrategy::locateSurfInterestPointsThreadEntry().

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.

Definition at line 222 of file TiePointsLocatorStrategy.cpp.

References te::rst::BlueCInt, te::rp::Matrix< TemplateElementType >::getColumnsNumber(), te::rp::Matrix< TemplateElementType >::getLinesNumber(), te::rst::GreenCInt, te::sa::Grid, te::rst::RasterFactory::make(), te::rst::RedCInt, TERP_TRUE_OR_THROW, and te::dt::UCHAR_TYPE.

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.

Definition at line 298 of file TiePointsLocatorStrategy.cpp.

References te::rp::Matrix< TemplateElementType >::getColumnsNumber(), te::rp::Matrix< TemplateElementType >::getLinesNumber(), te::sa::Grid, te::rst::RasterFactory::make(), MAX, MIN, te::rst::RedCInt, TERP_TRUE_OR_THROW, and te::dt::UCHAR_TYPE.

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::TiePointsLocatorSURFStrategy, and te::rp::TiePointsLocatorMoravecStrategy.

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::TiePointsLocatorSURFStrategy, and te::rp::TiePointsLocatorMoravecStrategy.

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::TiePointsLocatorSURFStrategy, and te::rp::TiePointsLocatorMoravecStrategy.

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.

Definition at line 54 of file TiePointsLocatorStrategy.cpp.

References te::rp::Matrix< TemplateElementType >::AutoMemPol, te::rp::Matrix< double >::AutoMemPol, te::rst::Raster::getBand(), te::rst::Interpolator::getValue(), te::rst::Band::getValue(), MAX, te::rp::Matrix< TemplateElementType >::reset(), reset(), and TERP_TRUE_OR_RETURN_FALSE.

Referenced by te::rp::TiePointsLocatorMoravecStrategy::getMatchedInterestPoints(), and te::rp::TiePointsLocatorSURFStrategy::getMatchedInterestPoints().

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

Definition at line 49 of file TiePointsLocatorStrategy.cpp.

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

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

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

Referenced by loadRasterData().

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 269 of file TiePointsLocatorStrategy.h.

Referenced by te::rp::TiePointsLocatorMoravecStrategy::locateMoravecInterestPointsThreadEntry(), and te::rp::TiePointsLocatorSURFStrategy::locateSurfInterestPointsThreadEntry().

Friends And Related Function Documentation

friend class TiePointsLocator
friend

Definition at line 53 of file TiePointsLocatorStrategy.h.


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