25 #ifndef __TERRALIB_RP_INTERNAL_TIEPOINTSLOCATORSTRATEGY_H
26 #define __TERRALIB_RP_INTERNAL_TIEPOINTSLOCATORSTRATEGY_H
31 #include "../geometry/GTParameters.h"
32 #include "../raster/Raster.h"
33 #include "../raster/Interpolator.h"
46 class TiePointsLocator;
66 virtual void getSubSampledSpecStrategyParams(
67 const double subSampleOptimizationRescaleFactor,
69 std::auto_ptr< TiePointsLocatorStrategyParameters >& subSampledSpecParamsPtr )
const = 0;
77 virtual void getDefaultSpecStrategyParams(
78 std::auto_ptr< TiePointsLocatorStrategyParameters >& defaultSpecParamsPtr )
const = 0;
115 : m_x( 0 ), m_y( 0 ), m_feature1( 0 ), m_feature2( 0 ),
171 m_point1( point1 ), m_point2( point2 ),
172 m_feature( feature ) {};
199 virtual bool initialize(
205 virtual void reset() = 0;
211 virtual unsigned int getAutoMaxTiePointsNumber()
const = 0;
220 virtual bool getMatchedInterestPoints(
222 const double raster1ToRaster2TransfDMapError,
223 MatchedInterestPointsSetT& matchedInterestPoints ) = 0;
264 static bool loadRasterData(
266 const std::vector< unsigned int >& rasterBands,
268 const unsigned int maskRasterBand,
269 const unsigned int rasterTargetAreaLineStart,
270 const unsigned int rasterTargetAreaColStart,
271 const unsigned int rasterTargetAreaWidth,
272 const unsigned int rasterTargetAreaHeight,
273 const double desiredRescaleFactorX,
274 const double desiredRescaleFactorY,
276 const unsigned char maxMemPercentUsage,
277 std::vector< boost::shared_ptr< FloatsMatrix > >& loadedRasterData,
278 UCharsMatrix& loadedMaskRasterData,
279 double& achievedRescaleFactorX,
280 double& achievedRescaleFactorY );
289 template<
typename BufferElementT >
291 const unsigned int& bufferLinesNumber )
294 assert( bufferLinesNumber );
296 unsigned int idx = 0;
297 BufferElementT* auxLinePtr = bufferPtr[ 0 ];
298 const unsigned int lastLineIdx = bufferLinesNumber - 1;
300 for( idx = 0 ; idx < lastLineIdx ; ++idx )
302 bufferPtr[ idx ] = bufferPtr[ idx + 1 ];
305 bufferPtr[ lastLineIdx ] = auxLinePtr;
317 static void createTifFromMatrix(
318 const FloatsMatrix& rasterData,
319 const InterestPointsSetT& interestPoints,
320 const std::string& tifFileName );
331 static void features2Tiff(
332 const DoublesMatrix& features,
333 const InterestPointsSetT& interestPoints,
334 const std::string& fileNameBeginning );
343 static bool checkForDuplicatedInterestPoints(
const InterestPointsSetT& interestPoints,
344 double& x,
double& y );
te::rp::Matrix< float > FloatsMatrix
A matrix do store float values.
unsigned int m_y
Point Y coord.
InterestPointT & operator=(const InterestPointT &other)
MatchedInterestPointsT(const MatchedInterestPointsT &other)
MatchedInterestPointsT(const InterestPointT &point1, const InterestPointT &point2, const float &feature)
float m_feature
Matched interest feature.
InterpolationMethod
Allowed interpolation methods.
unsigned int m_x
Point X coord.
std::list< InterestPointT > InterestPointsListT
te::rp::Matrix< unsigned char > UCharsMatrix
A matrix do store unsigned char values.
TiePointsLocator strategy parameters.
An abstract class for raster data strucutures.
std::multiset< InterestPointT > InterestPointsSetT
#define TERPEXPORT
You can use this macro in order to export/import classes and functions from this module.
te::rp::Matrix< double > DoublesMatrix
A matrix do store double values.
Tie-points locator strategy.
static void roolUpBuffer(BufferElementT **bufferPtr, const unsigned int &bufferLinesNumber)
RoolUp a buffer of lines.
Configuration flags for the Raster Processing module of TerraLib.
float m_feature3
Interest point feature 3 value.
bool operator<(const MatchedInterestPointsT &other) const
A generic template matrix.
~MatchedInterestPointsT()
InterestPointT m_point2
Interest point 2.
bool operator<(const InterestPointT &other) const
float m_feature2
Interest point feature 2 value.
std::multiset< MatchedInterestPointsT > MatchedInterestPointsSetT
const MatchedInterestPointsT & operator=(const MatchedInterestPointsT &other)
InterestPointT m_point1
Interest point 1.
InterestPointT(const InterestPointT &other)
float m_feature1
Interest point feature 1 value.