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"
45 class TiePointsLocator;
94 : m_x( 0 ), m_y( 0 ), m_feature1( 0 ), m_feature2( 0 ),
150 m_point1( point1 ), m_point2( point2 ),
151 m_feature( feature ) {};
178 virtual bool initialize(
184 virtual void reset() = 0;
190 virtual unsigned int getAutoMaxTiePointsNumber()
const = 0;
199 virtual bool getMatchedInterestPoints(
201 const double raster1ToRaster2TransfDMapError,
202 MatchedInterestPointsSetT& matchedInterestPoints ) = 0;
243 static bool loadRasterData(
245 const std::vector< unsigned int >& rasterBands,
247 const unsigned int maskRasterBand,
248 const unsigned int rasterTargetAreaLineStart,
249 const unsigned int rasterTargetAreaColStart,
250 const unsigned int rasterTargetAreaWidth,
251 const unsigned int rasterTargetAreaHeight,
252 const double desiredRescaleFactorX,
253 const double desiredRescaleFactorY,
255 const unsigned char maxMemPercentUsage,
256 std::vector< boost::shared_ptr< FloatsMatrix > >& loadedRasterData,
257 UCharsMatrix& loadedMaskRasterData,
258 double& achievedRescaleFactorX,
259 double& achievedRescaleFactorY );
268 template<
typename BufferElementT >
270 const unsigned int& bufferLinesNumber )
273 assert( bufferLinesNumber );
275 unsigned int idx = 0;
276 BufferElementT* auxLinePtr = bufferPtr[ 0 ];
277 const unsigned int lastLineIdx = bufferLinesNumber - 1;
279 for( idx = 0 ; idx < lastLineIdx ; ++idx )
281 bufferPtr[ idx ] = bufferPtr[ idx + 1 ];
284 bufferPtr[ lastLineIdx ] = auxLinePtr;
296 static void createTifFromMatrix(
297 const FloatsMatrix& rasterData,
298 const InterestPointsSetT& interestPoints,
299 const std::string& tifFileName );
310 static void features2Tiff(
311 const DoublesMatrix& features,
312 const InterestPointsSetT& interestPoints,
313 const std::string& fileNameBeginning );
322 static bool checkForDuplicatedInterestPoints(
const InterestPointsSetT& interestPoints,
323 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.
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.