25 #ifndef __TERRALIB_RP_INTERNAL_BLENDER_H
26 #define __TERRALIB_RP_INTERNAL_BLENDER_H
30 #include "../raster/Grid.h"
31 #include "../raster/Raster.h"
32 #include "../raster/Interpolator.h"
33 #include "../raster/RasterSynchronizer.h"
34 #include "../geometry/Polygon.h"
35 #include "../geometry/MultiPolygon.h"
36 #include "../geometry/Point.h"
37 #include "../geometry/GeometricTransformation.h"
39 #include <boost/noncopyable.hpp>
63 InvalidBlendMethod = 0,
65 EuclideanDistanceMethod = 2
98 const std::vector< unsigned int >& raster1Bands,
100 const std::vector< unsigned int >& raster2Bands,
101 const BlendMethod& blendMethod,
104 const double& noDataValue,
105 const bool forceInputNoDataValue,
106 const std::vector< double >& pixelOffsets1,
107 const std::vector< double >& pixelScales1,
108 const std::vector< double >& pixelOffsets2,
109 const std::vector< double >& pixelScales2,
113 const unsigned int threadsNumber,
114 const bool enableProgressInterface );
126 double*
const values )
129 (this->*m_blendFuncPtr)( line, col, values );
136 bool blendIntoRaster1();
148 typedef void (
Blender::*BlendFunctPtr)(
const double& line,
149 const double& col,
double*
const values );
270 void setBlendFunctionPonter(
const BlendMethod blendMethod );
278 void noBlendMethodImp(
const double& line1,
const double& col1,
279 double*
const values );
287 void euclideanDistanceMethodImp(
const double& line1,
const double& col1,
288 double*
const values );
300 #endif // __TERRALIB_RP_INTERNAL_ALGORITHM_H
double m_euclideanDistanceMethodImp_aux1
te::rst::Interpolator::Method m_interpMethod1
The interpolation method to use when reading raster 1 data.
std::vector< std::pair< te::gm::Coord2D, te::gm::Coord2D > > m_r2IntersectionSegmentsPoints
A sub-set of the intersection polygon wich is part of raster 2 valid data polygon ( raster 1 indexed ...
MultiPolygon is a MultiSurface whose elements are Polygons.
std::auto_ptr< te::gm::MultiPolygon > m_intersectionPtr
The Intersection geometry ( raster 1 indexed coods).
unsigned long int m_maxRasterCachedBlocks
The maximum number of raster cache blocks.
bool * m_abortValuePtr
A pointer to the abort execution value.
std::vector< unsigned int > m_raster2Bands
Input raster 2 band indexes to use.
double m_euclideanDistanceMethodImp_Point2Col
std::vector< RasterBlockInfo > * m_raster1BlocksInfosPtr
blocks to process.
The parameters passed to blendIntoRaster1Thread method.
bool m_forceInputNoDataValue
Use noDataValue as the input rasters no-data value (The original rasters no-data values will be ignor...
bool m_useProgress
If enabled each thread will use its own progress interface, if false only a signal will be emitted on...
boost::condition_variable * m_blockProcessedSignalPtr
Signal used to update the main process progress update.
double m_euclideanDistanceMethodImp_currDist
std::vector< double > m_pixelScales1
The values scale to be applied to raster 1 pixel values before the blended value calcule (one element...
Blended pixel value calculation for two overlaped rasters.
std::auto_ptr< te::gm::MultiPolygon > m_r2ValidDataDelimiterPtr
A pointer to a geometry (raster 2 world/projected coords) delimiting the raster region with valid dat...
std::vector< double > m_pixelOffsets1
The values offset to be applied to raster 1 pixel values before the blended value calcule (one elemen...
std::vector< double > m_pixelScales2
The values scale to be applied to raster 2 pixel values before the blended value calcule (one element...
te::rst::Raster const * m_raster2Ptr
Input raster 2.
double m_outputNoDataValue
The output raster no-data value.
It interpolates one pixel based on a selected algorithm. Methods currently available are Nearest Neig...
boost::mutex * m_mutexPtr
mutex pointer.
std::vector< double > m_raster2NoDataValues
Raster 1 no-data values (on value per band).
te::rst::Interpolator::Method m_interpMethod1
The interpolation method to use when reading raster 1 data.
std::vector< unsigned int > m_raster2Bands
Input raster 2 band indexes to use (this vector has the same size as raster1Bands).
bool * m_returnValuePtr
A pointer to the threadreturn value.
unsigned int * m_runningThreadsCounterPtr
a pointer to the running threads counter.
An access synchronizer to be used in SynchronizedRaster raster instances.
te::rst::RasterSynchronizer * m_sync2Ptr
Raster 1 syncronizer pointer.
std::size_t m_r1IntersectionSegmentsPointsSize
Size of m_r1IntersectionSegmentsPoints;.
double m_euclideanDistanceMethodImp_dist2
double m_noBlendMethodImp_Point1XProj1
Raster 2 no-data values (on value per band).
std::complex< double > m_noBlendMethodImp_cValue
double m_euclideanDistanceMethodImp_dist1
bool m_enableProgressInterface
Enable progress interface.
bool m_forceInputNoDataValue
Use noDataValue as the input rasters no-data value (The original rasters no-data values will be ignor...
double m_euclideanDistanceMethodImp_aux2
std::auto_ptr< te::gm::MultiPolygon > m_r1ValidDataDelimiterPtr
A pointer to a geometry (raster 1 world/projected coords) delimiting the raster region with valid dat...
std::vector< double > m_pixelOffsets1
The values offset to be applied to raster 1 pixel values before the blended value calcule (one elemen...
A point with x and y coordinate values.
An abstract class for raster data strucutures.
std::size_t m_r2IntersectionSegmentsPointsSize
Size of m_r2IntersectionSegmentsPoints;.
te::rst::Raster * m_raster1Ptr
Input raster 1.
std::vector< double > m_pixelOffsets2
The values offset to be applied to raster 2 pixel values before the blended value calcule (one elemen...
std::vector< double > m_raster1NoDataValues
unsigned int m_rasterCols2ProcessBound
#define TERPEXPORT
You can use this macro in order to export/import classes and functions from this module.
double m_noBlendMethodImp_Point1YProj2
te::rst::RasterSynchronizer * m_sync1Ptr
Raster 1 syncronizer pointer.
std::vector< double > m_pixelScales1
The values scale to be applied to raster 1 pixel values before the blended value calcule (one element...
void getBlendedValues(const double &line, const double &col, double *const values)
Blend a pixel value using the current parameters.
double m_noBlendMethodImp_Point2Col
BlendFunctPtr m_blendFuncPtr
The current blend function.
std::vector< unsigned int > m_raster1Bands
Input raster 1 band indexes to use.
std::size_t m_euclideanDistanceMethodImp_vecIdx
unsigned int m_blkTotalPixelsNumber
std::auto_ptr< te::gm::MultiPolygon > m_r1ValidDataDelimiterPtr
A pointer to a geometry (raster 1 world/projected coords) delimiting the raster region with valid dat...
Method
Allowed interpolation methods.
unsigned int m_euclideanDistanceMethodImp_BandIdx
Configuration flags for the Raster Processing module of TerraLib.
double m_noBlendMethodImp_Point1XProj2
double m_noDataValue
The value returned where there is no pixel data bo blend.
unsigned int m_noBlendMethodImp_BandIdx
te::gm::GeometricTransformation * m_geomTransformationPtr
A transformation mapping raster 1 pixels ( te::gm::GTParameters::TiePoint::first ) to raster 2 ( te::...
unsigned int m_rasterRows2ProcessBound
te::rst::Interpolator::Method m_interpMethod2
The interpolation method to use when reading raster 2 data.
double m_noBlendMethodImp_Point2Line
boost::mutex * m_blockProcessedSignalMutexPtr
Mutex used to update the main process progress update.
double m_noBlendMethodImp_Value
BlendMethod m_blendMethod
The blend method to apply.
std::vector< double > m_pixelOffsets2
The values offset to be applied to raster 2 pixel values before the blended value calcule (one elemen...
std::auto_ptr< te::gm::MultiPolygon > m_r2ValidDataDelimiterPtr
A pointer to a geometry (raster 2 world/projected coords) delimiting the raster region with valid dat...
unsigned int m_threadsNumber
The number of threads to use (0:automatic , 1:disabled, any other integer dictates the number of thre...
unsigned int m_firstRasterRow2Process
std::complex< double > m_euclideanDistanceMethodImp_cValue1
double m_euclideanDistanceMethodImp_Point2Line
#define TERP_DEBUG_TRUE_OR_THROW(value, message)
Checks if value is true and throws an exception if not.
BlendMethod m_blendMethod
The blend method to apply.
std::vector< unsigned int > m_raster1Bands
Input raster 1 band indexes to use.
std::auto_ptr< te::gm::GeometricTransformation > m_geomTransformationPtr
A transformation mapping raster 1 pixels ( te::gm::GTParameters::TiePoint::first ) to raster 2 pixels...
double m_noBlendMethodImp_Point1YProj1
te::gm::Point m_euclideanDistanceMethodImp_auxPoint
te::rst::Interpolator * m_interp2
Raster 2 interpolator instance pointer.
std::complex< double > m_euclideanDistanceMethodImp_cValue2
std::vector< double > m_pixelScales2
The values scale to be applied to raster 2 pixel values before the blended value calcule (one element...
te::rst::Interpolator::Method m_interpMethod2
The interpolation method to use when reading raster 2 data.
std::vector< std::pair< te::gm::Coord2D, te::gm::Coord2D > > m_r1IntersectionSegmentsPoints
A sub-set of the intersection polygon wich is part of raster 1 valid data polygon ( raster 1 indexed ...
te::rst::Interpolator * m_interp1
Raster 1 interpolator instance pointer.
unsigned int m_firstRasterCol2Process