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 "../raster/TileIndexer.h"
35 #include "../geometry/Polygon.h"
36 #include "../geometry/MultiPolygon.h"
37 #include "../geometry/Point.h"
38 #include "../geometry/GeometricTransformation.h"
40 #include <boost/noncopyable.hpp>
41 #include <boost/ptr_container/ptr_vector.hpp>
103 const std::vector< unsigned int >& raster1Bands,
105 const std::vector< unsigned int >& raster2Bands,
106 const BlendMethod& blendMethod,
109 const double& noDataValue,
110 const bool forceRaster1NoDataValue,
111 const bool forceRaster2NoDataValue,
112 const std::vector< double >& pixelOffsets1,
113 const std::vector< double >& pixelScales1,
114 const std::vector< double >& pixelOffsets2,
115 const std::vector< double >& pixelScales2,
119 const unsigned int threadsNumber,
120 const bool enableProgressInterface );
132 double*
const values )
135 (this->*m_blendFuncPtr)( line, col, values );
142 bool blendIntoRaster1();
154 typedef void (
Blender::*BlendFunctPtr)(
const double& line,
155 const double& col,
double*
const values );
289 void setBlendFunctionPonter(
const BlendMethod blendMethod );
297 void noBlendMethodImp(
const double& line1,
const double& col1,
298 double*
const values );
306 void euclideanDistanceMethodImp(
const double& line1,
const double& col1,
307 double*
const values );
315 void sumMethodImp(
const double& line1,
const double& col1,
316 double*
const values );
331 std::vector< std::pair< te::gm::Coord2D, te::gm::Coord2D > >& segments )
const;
342 boost::ptr_vector< te::rst::TileIndexer >& tileIndexers )
const;
348 #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.
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_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.
double m_sumMethodImp_Point2Col
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...
double m_sumMethodImp_Point2Line
std::complex< double > m_sumMethodImp_cValue2
te::rst::Raster const * m_raster2Ptr
Input raster 2.
double m_outputNoDataValue
The output raster no-data value.
boost::mutex * m_mutexPtr
mutex pointer.
std::vector< double > m_raster2NoDataValues
Raster 2 no-data values (on value per band).
std::auto_ptr< te::gm::Geometry > m_intersectionPtr
The Intersection geometry ( raster 1 indexed coods).
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;.
std::complex< double > m_sumMethodImp_cValue1
InterpolationMethod
Allowed interpolation methods.
double m_euclideanDistanceMethodImp_dist2
double m_noBlendMethodImp_Point1XProj1
std::complex< double > m_noBlendMethodImp_cValue
double m_euclideanDistanceMethodImp_dist1
bool m_sumMethodImp_PointInsideIntersection
bool m_enableProgressInterface
Enable progress interface.
bool m_forceRaster1NoDataValue
Use noDataValue as the input raster 1 no-data value (The original rasters no-data values will be igno...
std::auto_ptr< te::rst::Interpolator > m_interp2Ptr
Raster 2 interpolator instance pointer.
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.
unsigned int m_sumMethodImp_IntersectionTileIndexersIdx
boost::ptr_vector< te::rst::TileIndexer > m_intersectionTileIndexers
The Intersection geometry tile indexers( raster 1 indexed coods), one indexer for each intersection p...
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
Raster 1 no-data values (on value per band).
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...
bool m_forceRaster2NoDataValue
Use noDataValue as the input raster 2 no-data value (The original rasters no-data values will be igno...
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
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
unsigned int m_blkTotalPixelsNumber
bool m_euclideanDistanceMethodImp_PointInsideIntersection
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...
unsigned int m_euclideanDistanceMethodImp_BandIdx
Configuration flags for the Raster Processing module of TerraLib.
bool m_forceRaster1NoDataValue
Use noDataValue as the input rasters no-data value (The original rasters no-data values will be ignor...
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::Point m_sumMethodImp_auxPoint
te::gm::GeometricTransformation * m_geomTransformationPtr
A transformation mapping raster 1 pixels ( te::gm::GTParameters::TiePoint::first ) to raster 2 ( te::...
unsigned int m_rasterRows2ProcessBound
Euclidean distance method.
te::rst::Interpolator::Method m_interpMethod2
The interpolation method to use when reading raster 2 data.
std::auto_ptr< te::rst::Interpolator > m_interp1Ptr
Raster 1 interpolator instance pointer.
double m_noBlendMethodImp_Point2Line
boost::mutex * m_blockProcessedSignalMutexPtr
Mutex used to update the main process progress update.
bool m_forceRaster2NoDataValue
Use noDataValue as the input rasters no-data value (The original rasters no-data values will be ignor...
double m_noBlendMethodImp_Value
BlendMethod m_blendMethod
The blend method to apply.
unsigned int m_sumMethodImp_BandIdx
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
unsigned int m_euclideanDistanceMethodImp_IntersectionTileIndexersIdx
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
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 ...
unsigned int m_firstRasterCol2Process