Blended pixel value calculation for two overlaped rasters. More...
#include <Blender.h>
Classes | |
class | BlendIntoRaster1ThreadParams |
The parameters passed to blendIntoRaster1Thread method. More... | |
struct | RasterBlockInfo |
Raster block info. More... | |
Public Types | |
enum | BlendMethod { InvalidBlendMethod, NoBlendMethod, EuclideanDistanceMethod, SumMethod } |
Public Member Functions | |
Blender () | |
bool | blendIntoRaster1 () |
Execute blending of the given input rasters and write the result into raster1. More... | |
void | getBlendedValues (const double &line, const double &col, double *const values) |
Blend a pixel value using the current parameters. More... | |
bool | initialize (te::rst::Raster &raster1, const std::vector< unsigned int > &raster1Bands, const te::rst::Raster &raster2, const std::vector< unsigned int > &raster2Bands, const BlendMethod &blendMethod, const te::rst::Interpolator::Method &interpMethod1, const te::rst::Interpolator::Method &interpMethod2, const double &noDataValue, const bool forceRaster1NoDataValue, const bool forceRaster2NoDataValue, const std::vector< double > &pixelOffsets1, const std::vector< double > &pixelScales1, const std::vector< double > &pixelOffsets2, const std::vector< double > &pixelScales2, te::gm::MultiPolygon const *const r1ValidDataDelimiterPtr, te::gm::MultiPolygon const *const r2ValidDataDelimiterPtr, const te::gm::GeometricTransformation &geomTransformation, const unsigned int threadsNumber, const bool enableProgressInterface) |
Inititate the blender instance. More... | |
~Blender () | |
Protected Types | |
typedef void(Blender::* | BlendFunctPtr )(const double &line, const double &col, double *const values) |
Type definition for the a bleding function pointer. More... | |
Protected Member Functions | |
void | clear () |
Clear all internal allocated resources. More... | |
void | euclideanDistanceMethodImp (const double &line1, const double &col1, double *const values) |
Implementation for EuclideanDistanceMethod. More... | |
bool | getSegments (te::gm::Geometry const *const geometryPtr, std::vector< std::pair< te::gm::Coord2D, te::gm::Coord2D > > &segments) const |
Extract segments from the given geometry. More... | |
bool | getTileIndexers (te::gm::Geometry const *const geometryPtr, boost::ptr_vector< te::rst::TileIndexer > &tileIndexers) const |
Creater polygon tile indexers from the given geometry. More... | |
void | initState () |
Reset the instance to its initial default state. More... | |
void | noBlendMethodImp (const double &line1, const double &col1, double *const values) |
Implementation for NoBlendMethod. More... | |
void | setBlendFunctionPonter (const BlendMethod blendMethod) |
Set the value of m_blendFuncPtr following the given blend method. More... | |
void | sumMethodImp (const double &line1, const double &col1, double *const values) |
Implementation for SumMethod. More... | |
Static Protected Member Functions | |
static void | blendIntoRaster1Thread (BlendIntoRaster1ThreadParams *paramsPtr) |
Thread entry for the method blendIntoRaster1. More... | |
Protected Attributes | |
BlendFunctPtr | m_blendFuncPtr |
The current blend function. More... | |
BlendMethod | m_blendMethod |
The blend method to apply. More... | |
bool | m_enableProgressInterface |
Enable progress interface. More... | |
double | m_euclideanDistanceMethodImp_aux1 |
double | m_euclideanDistanceMethodImp_aux2 |
te::gm::Point | m_euclideanDistanceMethodImp_auxPoint |
unsigned int | m_euclideanDistanceMethodImp_BandIdx |
double | m_euclideanDistanceMethodImp_currDist |
std::complex< double > | m_euclideanDistanceMethodImp_cValue1 |
std::complex< double > | m_euclideanDistanceMethodImp_cValue2 |
double | m_euclideanDistanceMethodImp_dist1 |
double | m_euclideanDistanceMethodImp_dist2 |
unsigned int | m_euclideanDistanceMethodImp_IntersectionTileIndexersIdx |
double | m_euclideanDistanceMethodImp_Point2Col |
double | m_euclideanDistanceMethodImp_Point2Line |
bool | m_euclideanDistanceMethodImp_PointInsideIntersection |
std::size_t | m_euclideanDistanceMethodImp_vecIdx |
bool | m_forceRaster1NoDataValue |
Use noDataValue as the input raster 1 no-data value (The original rasters no-data values will be ignored) More... | |
bool | m_forceRaster2NoDataValue |
Use noDataValue as the input raster 2 no-data value (The original rasters no-data values will be ignored) More... | |
te::gm::GeometricTransformation * | m_geomTransformationPtr |
A transformation mapping raster 1 pixels ( te::gm::GTParameters::TiePoint::first ) to raster 2 ( te::gm::GTParameters::TiePoint::second ) (Note: all coords are indexed by lines/columns). More... | |
std::auto_ptr < te::rst::Interpolator > | m_interp1Ptr |
Raster 1 interpolator instance pointer. More... | |
std::auto_ptr < te::rst::Interpolator > | m_interp2Ptr |
Raster 2 interpolator instance pointer. More... | |
te::rst::Interpolator::Method | m_interpMethod1 |
The interpolation method to use when reading raster 1 data. More... | |
te::rst::Interpolator::Method | m_interpMethod2 |
The interpolation method to use when reading raster 2 data. More... | |
std::auto_ptr< te::gm::Geometry > | m_intersectionPtr |
The Intersection geometry ( raster 1 indexed coods). More... | |
boost::ptr_vector < te::rst::TileIndexer > | m_intersectionTileIndexers |
The Intersection geometry tile indexers( raster 1 indexed coods), one indexer for each intersection polygon. More... | |
unsigned int | m_noBlendMethodImp_BandIdx |
std::complex< double > | m_noBlendMethodImp_cValue |
double | m_noBlendMethodImp_Point1XProj1 |
double | m_noBlendMethodImp_Point1XProj2 |
double | m_noBlendMethodImp_Point1YProj1 |
double | m_noBlendMethodImp_Point1YProj2 |
double | m_noBlendMethodImp_Point2Col |
double | m_noBlendMethodImp_Point2Line |
double | m_noBlendMethodImp_Value |
double | m_outputNoDataValue |
The output raster no-data value. More... | |
std::vector< double > | m_pixelOffsets1 |
The values offset to be applied to raster 1 pixel values before the blended value calcule (one element for each used raster channel/band). More... | |
std::vector< double > | m_pixelOffsets2 |
The values offset to be applied to raster 2 pixel values before the blended value calcule (one element for each used raster channel/band). More... | |
std::vector< double > | m_pixelScales1 |
The values scale to be applied to raster 1 pixel values before the blended value calcule (one element for each used raster channel/band). More... | |
std::vector< double > | m_pixelScales2 |
The values scale to be applied to raster 2 pixel values before the blended value calcule (one element for each used raster channel/band). More... | |
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 coods). More... | |
std::size_t | m_r1IntersectionSegmentsPointsSize |
Size of m_r1IntersectionSegmentsPoints;. More... | |
std::auto_ptr < te::gm::MultiPolygon > | m_r1ValidDataDelimiterPtr |
A pointer to a geometry (raster 1 world/projected coords) delimiting the raster region with valid data, or null if all raster data area is valid. More... | |
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 coods). More... | |
std::size_t | m_r2IntersectionSegmentsPointsSize |
Size of m_r2IntersectionSegmentsPoints;. More... | |
std::auto_ptr < te::gm::MultiPolygon > | m_r2ValidDataDelimiterPtr |
A pointer to a geometry (raster 2 world/projected coords) delimiting the raster region with valid data, or null if all raster data area is valid. More... | |
std::vector< unsigned int > | m_raster1Bands |
Input raster 1 band indexes to use. More... | |
std::vector< double > | m_raster1NoDataValues |
Raster 1 no-data values (on value per band). More... | |
te::rst::Raster * | m_raster1Ptr |
Input raster 1. More... | |
std::vector< unsigned int > | m_raster2Bands |
Input raster 2 band indexes to use. More... | |
std::vector< double > | m_raster2NoDataValues |
Raster 2 no-data values (on value per band). More... | |
te::rst::Raster const * | m_raster2Ptr |
Input raster 2. More... | |
te::gm::Point | m_sumMethodImp_auxPoint |
unsigned int | m_sumMethodImp_BandIdx |
std::complex< double > | m_sumMethodImp_cValue1 |
std::complex< double > | m_sumMethodImp_cValue2 |
unsigned int | m_sumMethodImp_IntersectionTileIndexersIdx |
double | m_sumMethodImp_Point2Col |
double | m_sumMethodImp_Point2Line |
bool | m_sumMethodImp_PointInsideIntersection |
unsigned int | m_threadsNumber |
The number of threads to use (0:automatic , 1:disabled, any other integer dictates the number of threads).. More... | |
Blended pixel value calculation for two overlaped rasters.
The overlap between the two images is modeled by the given geometric transformation direct mapping input raster 1 indexed coords (line, column) to input raster 2 indexed coords.
|
protected |
Type definition for the a bleding function pointer.
line | Raster 1 Line. |
col | Raster 1 Column. |
values | A pointer to a pre-allocated vector where the blended values will be stored. |
te::rp::Blender::Blender | ( | ) |
te::rp::Blender::~Blender | ( | ) |
bool te::rp::Blender::blendIntoRaster1 | ( | ) |
Execute blending of the given input rasters and write the result into raster1.
Definition at line 1060 of file Blender.cpp.
References blendIntoRaster1Thread(), te::gm::GeometricTransformation::clone(), te::rst::Raster::getAccessPolicy(), te::rst::Raster::getBand(), te::rst::Band::getBlockSize(), te::rst::Raster::getNumberOfColumns(), te::rst::Raster::getNumberOfRows(), te::rst::Band::getProperty(), te::common::GetTotalPhysicalMemory(), te::common::GetTotalVirtualMemory(), te::common::GetUsedVirtualMemory(), te::gm::GeometricTransformation::inverseMap(), te::rp::Blender::BlendIntoRaster1ThreadParams::m_abortValuePtr, te::rp::Blender::BlendIntoRaster1ThreadParams::m_blendMethod, m_blendMethod, te::rst::BandProperty::m_blkh, te::rp::Blender::RasterBlockInfo::m_blkTotalPixelsNumber, te::rst::BandProperty::m_blkw, te::rp::Blender::RasterBlockInfo::m_blkX, te::rp::Blender::RasterBlockInfo::m_blkY, te::rp::Blender::BlendIntoRaster1ThreadParams::m_blockProcessedSignalMutexPtr, te::rp::Blender::BlendIntoRaster1ThreadParams::m_blockProcessedSignalPtr, m_enableProgressInterface, te::rp::Blender::RasterBlockInfo::m_firstRasterCol2Process, te::rp::Blender::RasterBlockInfo::m_firstRasterRow2Process, te::rp::Blender::BlendIntoRaster1ThreadParams::m_forceRaster1NoDataValue, m_forceRaster1NoDataValue, te::rp::Blender::BlendIntoRaster1ThreadParams::m_forceRaster2NoDataValue, m_forceRaster2NoDataValue, m_geomTransformationPtr, te::rp::Blender::BlendIntoRaster1ThreadParams::m_interpMethod2, m_interpMethod2, te::rp::Blender::BlendIntoRaster1ThreadParams::m_mutexPtr, te::rst::BandProperty::m_nblocksx, te::rst::BandProperty::m_nblocksy, te::rp::Blender::BlendIntoRaster1ThreadParams::m_noDataValue, m_outputNoDataValue, te::rp::Blender::BlendIntoRaster1ThreadParams::m_pixelOffsets1, m_pixelOffsets1, te::rp::Blender::BlendIntoRaster1ThreadParams::m_pixelOffsets2, m_pixelOffsets2, te::rp::Blender::BlendIntoRaster1ThreadParams::m_pixelScales1, m_pixelScales1, te::rp::Blender::BlendIntoRaster1ThreadParams::m_pixelScales2, m_pixelScales2, m_r1ValidDataDelimiterPtr, m_r2ValidDataDelimiterPtr, te::rp::Blender::BlendIntoRaster1ThreadParams::m_raster1Bands, m_raster1Bands, te::rp::Blender::BlendIntoRaster1ThreadParams::m_raster1BlocksInfosPtr, m_raster1Ptr, te::rp::Blender::BlendIntoRaster1ThreadParams::m_raster2Bands, m_raster2Bands, m_raster2Ptr, te::rp::Blender::RasterBlockInfo::m_rasterCols2ProcessBound, te::rp::Blender::RasterBlockInfo::m_rasterRows2ProcessBound, te::rp::Blender::BlendIntoRaster1ThreadParams::m_returnValuePtr, te::rp::Blender::BlendIntoRaster1ThreadParams::m_runningThreadsCounterPtr, te::rp::Blender::BlendIntoRaster1ThreadParams::m_sync1Ptr, te::rp::Blender::BlendIntoRaster1ThreadParams::m_sync2Ptr, m_threadsNumber, te::rp::Blender::RasterBlockInfo::m_wasProcessed, MIN, te::common::RAccess, te::common::RWAccess, TERP_TRUE_OR_RETURN_FALSE, and te::common::WAccess.
Referenced by te::rp::GeoMosaic::execute(), te::rp::TiePointsMosaic::execute(), and te::rp::SequenceMosaic::execute().
|
staticprotected |
Thread entry for the method blendIntoRaster1.
Definition at line 1418 of file Blender.cpp.
References te::rst::SynchronizedRaster::getBand(), getBlendedValues(), te::rst::GetDataTypeRanges(), te::rst::Band::getProperty(), initialize(), te::rp::Blender::BlendIntoRaster1ThreadParams::m_abortValuePtr, te::rp::Blender::BlendIntoRaster1ThreadParams::m_blendMethod, te::rp::Blender::BlendIntoRaster1ThreadParams::m_blockProcessedSignalMutexPtr, te::rp::Blender::BlendIntoRaster1ThreadParams::m_blockProcessedSignalPtr, te::rp::Blender::RasterBlockInfo::m_firstRasterCol2Process, te::rp::Blender::RasterBlockInfo::m_firstRasterRow2Process, te::rp::Blender::BlendIntoRaster1ThreadParams::m_forceRaster1NoDataValue, te::rp::Blender::BlendIntoRaster1ThreadParams::m_forceRaster2NoDataValue, te::rp::Blender::BlendIntoRaster1ThreadParams::m_geomTransformationPtr, te::rp::Blender::BlendIntoRaster1ThreadParams::m_interpMethod2, te::rp::Blender::BlendIntoRaster1ThreadParams::m_maxRasterCachedBlocks, te::rp::Blender::BlendIntoRaster1ThreadParams::m_mutexPtr, te::rp::Blender::BlendIntoRaster1ThreadParams::m_noDataValue, te::rp::Blender::BlendIntoRaster1ThreadParams::m_pixelOffsets1, te::rp::Blender::BlendIntoRaster1ThreadParams::m_pixelOffsets2, te::rp::Blender::BlendIntoRaster1ThreadParams::m_pixelScales1, te::rp::Blender::BlendIntoRaster1ThreadParams::m_pixelScales2, te::rp::Blender::BlendIntoRaster1ThreadParams::m_r1ValidDataDelimiterPtr, te::rp::Blender::BlendIntoRaster1ThreadParams::m_r2ValidDataDelimiterPtr, te::rp::Blender::BlendIntoRaster1ThreadParams::m_raster1Bands, te::rp::Blender::BlendIntoRaster1ThreadParams::m_raster1BlocksInfosPtr, te::rp::Blender::BlendIntoRaster1ThreadParams::m_raster2Bands, te::rp::Blender::RasterBlockInfo::m_rasterCols2ProcessBound, te::rp::Blender::RasterBlockInfo::m_rasterRows2ProcessBound, te::rp::Blender::BlendIntoRaster1ThreadParams::m_returnValuePtr, te::rp::Blender::BlendIntoRaster1ThreadParams::m_runningThreadsCounterPtr, te::rp::Blender::BlendIntoRaster1ThreadParams::m_sync1Ptr, te::rp::Blender::BlendIntoRaster1ThreadParams::m_sync2Ptr, te::rst::BandProperty::m_type, te::rp::Blender::BlendIntoRaster1ThreadParams::m_useProgress, te::rp::Blender::RasterBlockInfo::m_wasProcessed, te::rst::NearestNeighbor, and te::rst::Raster::setValue().
Referenced by blendIntoRaster1().
|
protected |
Clear all internal allocated resources.
Definition at line 650 of file Blender.cpp.
References initState(), m_geomTransformationPtr, m_interp1Ptr, m_interp2Ptr, m_intersectionPtr, m_intersectionTileIndexers, m_pixelOffsets1, m_pixelOffsets2, m_pixelScales1, m_pixelScales2, m_r1IntersectionSegmentsPoints, m_r1ValidDataDelimiterPtr, m_r2IntersectionSegmentsPoints, m_r2ValidDataDelimiterPtr, m_raster1Bands, m_raster1NoDataValues, m_raster2Bands, and m_raster2NoDataValues.
Referenced by initialize(), and ~Blender().
|
protected |
Implementation for EuclideanDistanceMethod.
line | Raster 1 Line. |
col | Raster 1 Column. |
values | A pointer to a pre-allocated vector where the blended values will be stored. |
Definition at line 748 of file Blender.cpp.
References te::gm::GeometricTransformation::directMap(), getPerpendicularDistance, m_euclideanDistanceMethodImp_aux1, m_euclideanDistanceMethodImp_aux2, m_euclideanDistanceMethodImp_auxPoint, m_euclideanDistanceMethodImp_BandIdx, m_euclideanDistanceMethodImp_currDist, m_euclideanDistanceMethodImp_cValue1, m_euclideanDistanceMethodImp_cValue2, m_euclideanDistanceMethodImp_dist1, m_euclideanDistanceMethodImp_dist2, m_euclideanDistanceMethodImp_IntersectionTileIndexersIdx, m_euclideanDistanceMethodImp_Point2Col, m_euclideanDistanceMethodImp_Point2Line, m_euclideanDistanceMethodImp_PointInsideIntersection, m_euclideanDistanceMethodImp_vecIdx, m_geomTransformationPtr, m_interp1Ptr, m_interp2Ptr, m_intersectionPtr, m_intersectionTileIndexers, m_outputNoDataValue, m_pixelOffsets1, m_pixelOffsets2, m_pixelScales1, m_pixelScales2, m_r1IntersectionSegmentsPoints, m_r1IntersectionSegmentsPointsSize, m_r2IntersectionSegmentsPoints, m_r2IntersectionSegmentsPointsSize, m_raster1Bands, m_raster1NoDataValues, m_raster2Bands, m_raster2NoDataValues, noBlendMethodImp(), te::gm::Point::setX(), te::gm::Point::setY(), and TERP_DEBUG_TRUE_OR_THROW.
Referenced by setBlendFunctionPonter().
|
inline |
Blend a pixel value using the current parameters.
line | Line (raster 1 reference). |
col | Column (raster 1 reference). |
values | A pointer to a pre-allocated vector where the blended values will be stored. |
Definition at line 131 of file Blender.h.
References TERP_DEBUG_TRUE_OR_THROW.
Referenced by blendIntoRaster1Thread().
|
protected |
Extract segments from the given geometry.
geometryPtr | Input geometry. |
segments | Found segments (appended here). |
Definition at line 1594 of file Blender.cpp.
References te::gm::LineString::getCoordinates(), te::gm::GeometryCollection::getGeometryN(), te::gm::GeometryCollection::getNumGeometries(), te::gm::CurvePolygon::getNumRings(), te::gm::CurvePolygon::getRingN(), and te::gm::LineString::size().
Referenced by initialize().
|
protected |
Creater polygon tile indexers from the given geometry.
geometryPtr | Input geometry. |
tileIndexers | Created indexers (appended here). |
Definition at line 1645 of file Blender.cpp.
References te::gm::GeometryCollection::getGeometryN(), te::gm::GeometryCollection::getNumGeometries(), and te::gm::CurvePolygon::push_back().
Referenced by initialize().
bool te::rp::Blender::initialize | ( | te::rst::Raster & | raster1, |
const std::vector< unsigned int > & | raster1Bands, | ||
const te::rst::Raster & | raster2, | ||
const std::vector< unsigned int > & | raster2Bands, | ||
const BlendMethod & | blendMethod, | ||
const te::rst::Interpolator::Method & | interpMethod1, | ||
const te::rst::Interpolator::Method & | interpMethod2, | ||
const double & | noDataValue, | ||
const bool | forceRaster1NoDataValue, | ||
const bool | forceRaster2NoDataValue, | ||
const std::vector< double > & | pixelOffsets1, | ||
const std::vector< double > & | pixelScales1, | ||
const std::vector< double > & | pixelOffsets2, | ||
const std::vector< double > & | pixelScales2, | ||
te::gm::MultiPolygon const *const | r1ValidDataDelimiterPtr, | ||
te::gm::MultiPolygon const *const | r2ValidDataDelimiterPtr, | ||
const te::gm::GeometricTransformation & | geomTransformation, | ||
const unsigned int | threadsNumber, | ||
const bool | enableProgressInterface | ||
) |
Inititate the blender instance.
raster1 | Input raster 1. |
raster1Bands | Input raster 1 band indexes to use. |
raster2 | Input raster 2. |
raster2Bands | Input raster 2 band indexes to use (this vector has the same size as raster1Bands). |
blendMethod | The blend method to apply. |
interpMethod1 | The interpolation method to use when reading raster 1 data. |
interpMethod2 | The interpolation method to use when reading raster 2 data. |
noDataValue | The value returned where there is no pixel data bo blend. |
forceRaster1NoDataValue | Use noDataValue as the input raster 1 no-data value (The original rasters no-data values will be ignored) |
forceRaster2NoDataValue | Use noDataValue as the input raster 1 no-data value (The original rasters no-data values will be ignored) |
pixelOffsets1 | The values offset to be applied to raster 1 pixel values before the blended value calcule (one element for each used raster channel/band). |
pixelScales1 | The values scale to be applied to raster 1 pixel values before the blended value calcule (one element for each used raster channel/band). |
pixelOffsets2 | The values offset to be applied to raster 2 pixel values before the blended value calcule (one element for each used raster channel/band). |
pixelScales2 | The values scale to be applied to raster 2 pixel values before the blended value calcule (one element for each used raster channel/band). |
r1ValidDataDelimiterPtr | A pointer to a geometry (raster 1 world/projected coords) delimiting the raster region with valid data, or null if all raster data area is valid. |
r2ValidDataDelimiterPtr | A pointer to a geometry (raster 2 world/projected coords) delimiting the raster region with valid data, or null if all raster data area is valid. |
geomTransformation | A transformation mapping raster 1 pixels ( te::gm::GTParameters::TiePoint::first ) to raster 2 pixels ( te::gm::GTParameters::TiePoint::second ) (Note: all coords are indexed by lines/columns). |
threadsNumber | Enable/disable the use of threads when applicable (0:automatic , 1:disabled, any other integer dictates the number of threads). |
enableProgressInterface | Enable/disable the use of a progress interface when applicable. |
Definition at line 170 of file Blender.cpp.
References te::gm::CurvePolygon::add(), clear(), te::gm::MultiPolygon::clone(), te::gm::GeometricTransformation::clone(), EuclideanDistanceMethod, te::rst::Grid::geoToGrid(), te::rst::Raster::getAccessPolicy(), te::rst::Raster::getBand(), te::gm::LineString::getCoordinates(), te::gm::GeometryCollection::getGeometryN(), te::rst::Raster::getGrid(), te::gm::LineString::getNPoints(), te::rst::Raster::getNumberOfBands(), te::rst::Raster::getNumberOfColumns(), te::rst::Raster::getNumberOfRows(), te::gm::GeometryCollection::getNumGeometries(), te::gm::CurvePolygon::getNumRings(), te::common::GetPhysProcNumber(), te::rst::Band::getProperty(), te::gm::CurvePolygon::getRingN(), getSegments(), getTileIndexers(), te::gm::GeometricTransformation::inverseMap(), te::gm::GeometricTransformation::isValid(), te::gm::LineStringType, m_blendMethod, m_enableProgressInterface, m_forceRaster1NoDataValue, m_forceRaster2NoDataValue, m_geomTransformationPtr, m_interp1Ptr, m_interp2Ptr, m_interpMethod1, m_interpMethod2, m_intersectionPtr, m_intersectionTileIndexers, te::rst::BandProperty::m_noDataValue, m_outputNoDataValue, m_pixelOffsets1, m_pixelOffsets2, m_pixelScales1, m_pixelScales2, m_r1IntersectionSegmentsPoints, m_r1IntersectionSegmentsPointsSize, m_r1ValidDataDelimiterPtr, m_r2IntersectionSegmentsPoints, m_r2IntersectionSegmentsPointsSize, m_r2ValidDataDelimiterPtr, m_raster1Bands, m_raster1NoDataValues, m_raster1Ptr, m_raster2Bands, m_raster2NoDataValues, m_raster2Ptr, m_threadsNumber, te::gm::MultiPolygonType, NoBlendMethod, te::gm::PolygonType, te::common::RAccess, setBlendFunctionPonter(), te::gm::LineString::setPoint(), SumMethod, TERP_DEBUG_TRUE_OR_THROW, TERP_LOG_AND_THROW, TERP_TRUE_OR_RETURN_FALSE, TERP_TRUE_OR_THROW, te::gm::Coord2D::x, and te::gm::Coord2D::y.
Referenced by blendIntoRaster1Thread(), te::rp::GeoMosaic::execute(), te::rp::TiePointsMosaic::execute(), and te::rp::SequenceMosaic::execute().
|
protected |
Reset the instance to its initial default state.
Definition at line 632 of file Blender.cpp.
References InvalidBlendMethod, m_blendFuncPtr, m_blendMethod, m_enableProgressInterface, m_forceRaster1NoDataValue, m_forceRaster2NoDataValue, m_geomTransformationPtr, m_interpMethod1, m_interpMethod2, m_outputNoDataValue, m_r1IntersectionSegmentsPointsSize, m_r2IntersectionSegmentsPointsSize, m_raster1Ptr, m_raster2Ptr, m_threadsNumber, and te::rst::NearestNeighbor.
|
protected |
Implementation for NoBlendMethod.
line | Raster 1 Line. |
col | Raster 1 Column. |
values | A pointer to a pre-allocated vector where the blended values will be stored. |
Definition at line 700 of file Blender.cpp.
References te::gm::GeometricTransformation::directMap(), m_geomTransformationPtr, m_interp1Ptr, m_interp2Ptr, m_noBlendMethodImp_BandIdx, m_noBlendMethodImp_cValue, m_noBlendMethodImp_Point2Col, m_noBlendMethodImp_Point2Line, m_noBlendMethodImp_Value, m_outputNoDataValue, m_pixelOffsets1, m_pixelOffsets2, m_pixelScales1, m_pixelScales2, m_raster1Bands, m_raster1NoDataValues, m_raster2Bands, and m_raster2NoDataValues.
Referenced by euclideanDistanceMethodImp(), setBlendFunctionPonter(), and sumMethodImp().
|
protected |
Set the value of m_blendFuncPtr following the given blend method.
Definition at line 673 of file Blender.cpp.
References EuclideanDistanceMethod, euclideanDistanceMethodImp(), m_blendFuncPtr, NoBlendMethod, noBlendMethodImp(), SumMethod, sumMethodImp(), and TERP_LOG_AND_THROW.
Referenced by initialize().
|
protected |
Implementation for SumMethod.
line | Raster 1 Line. |
col | Raster 1 Column. |
values | A pointer to a pre-allocated vector where the blended values will be stored. |
Definition at line 949 of file Blender.cpp.
References te::gm::GeometricTransformation::directMap(), m_geomTransformationPtr, m_interp1Ptr, m_interp2Ptr, m_intersectionPtr, m_intersectionTileIndexers, m_outputNoDataValue, m_pixelOffsets1, m_pixelOffsets2, m_pixelScales1, m_pixelScales2, m_r1IntersectionSegmentsPointsSize, m_r2IntersectionSegmentsPointsSize, m_raster1Bands, m_raster1NoDataValues, m_raster2Bands, m_raster2NoDataValues, m_sumMethodImp_auxPoint, m_sumMethodImp_BandIdx, m_sumMethodImp_cValue1, m_sumMethodImp_cValue2, m_sumMethodImp_IntersectionTileIndexersIdx, m_sumMethodImp_Point2Col, m_sumMethodImp_Point2Line, m_sumMethodImp_PointInsideIntersection, noBlendMethodImp(), te::gm::Point::setX(), te::gm::Point::setY(), and TERP_DEBUG_TRUE_OR_THROW.
Referenced by setBlendFunctionPonter().
|
protected |
The current blend function.
Definition at line 219 of file Blender.h.
Referenced by initState(), and setBlendFunctionPonter().
|
protected |
The blend method to apply.
Definition at line 218 of file Blender.h.
Referenced by blendIntoRaster1(), initialize(), initState(), and te::rp::Blender::BlendIntoRaster1ThreadParams::operator=().
|
protected |
Enable progress interface.
Definition at line 214 of file Blender.h.
Referenced by blendIntoRaster1(), initialize(), and initState().
|
protected |
Definition at line 267 of file Blender.h.
Referenced by euclideanDistanceMethodImp().
|
protected |
Definition at line 268 of file Blender.h.
Referenced by euclideanDistanceMethodImp().
|
protected |
Definition at line 257 of file Blender.h.
Referenced by euclideanDistanceMethodImp().
|
protected |
Definition at line 262 of file Blender.h.
Referenced by euclideanDistanceMethodImp().
|
protected |
Definition at line 263 of file Blender.h.
Referenced by euclideanDistanceMethodImp().
|
protected |
Definition at line 260 of file Blender.h.
Referenced by euclideanDistanceMethodImp().
|
protected |
Definition at line 261 of file Blender.h.
Referenced by euclideanDistanceMethodImp().
|
protected |
Definition at line 264 of file Blender.h.
Referenced by euclideanDistanceMethodImp().
|
protected |
Definition at line 265 of file Blender.h.
Referenced by euclideanDistanceMethodImp().
|
protected |
Definition at line 269 of file Blender.h.
Referenced by euclideanDistanceMethodImp().
|
protected |
Definition at line 259 of file Blender.h.
Referenced by euclideanDistanceMethodImp().
|
protected |
Definition at line 258 of file Blender.h.
Referenced by euclideanDistanceMethodImp().
|
protected |
Definition at line 270 of file Blender.h.
Referenced by euclideanDistanceMethodImp().
|
protected |
Definition at line 266 of file Blender.h.
Referenced by euclideanDistanceMethodImp().
|
protected |
Use noDataValue as the input raster 1 no-data value (The original rasters no-data values will be ignored)
Definition at line 215 of file Blender.h.
Referenced by blendIntoRaster1(), initialize(), initState(), and te::rp::Blender::BlendIntoRaster1ThreadParams::operator=().
|
protected |
Use noDataValue as the input raster 2 no-data value (The original rasters no-data values will be ignored)
Definition at line 216 of file Blender.h.
Referenced by blendIntoRaster1(), initialize(), initState(), and te::rp::Blender::BlendIntoRaster1ThreadParams::operator=().
|
protected |
A transformation mapping raster 1 pixels ( te::gm::GTParameters::TiePoint::first ) to raster 2 ( te::gm::GTParameters::TiePoint::second ) (Note: all coords are indexed by lines/columns).
Definition at line 229 of file Blender.h.
Referenced by blendIntoRaster1(), clear(), euclideanDistanceMethodImp(), initialize(), initState(), noBlendMethodImp(), te::rp::Blender::BlendIntoRaster1ThreadParams::operator=(), and sumMethodImp().
|
protected |
Raster 1 interpolator instance pointer.
Definition at line 233 of file Blender.h.
Referenced by clear(), euclideanDistanceMethodImp(), initialize(), noBlendMethodImp(), and sumMethodImp().
|
protected |
Raster 2 interpolator instance pointer.
Definition at line 234 of file Blender.h.
Referenced by clear(), euclideanDistanceMethodImp(), initialize(), noBlendMethodImp(), and sumMethodImp().
|
protected |
The interpolation method to use when reading raster 1 data.
Definition at line 230 of file Blender.h.
Referenced by initialize(), and initState().
|
protected |
The interpolation method to use when reading raster 2 data.
Definition at line 231 of file Blender.h.
Referenced by blendIntoRaster1(), initialize(), initState(), and te::rp::Blender::BlendIntoRaster1ThreadParams::operator=().
|
protected |
The Intersection geometry ( raster 1 indexed coods).
Definition at line 224 of file Blender.h.
Referenced by clear(), euclideanDistanceMethodImp(), initialize(), and sumMethodImp().
|
protected |
The Intersection geometry tile indexers( raster 1 indexed coods), one indexer for each intersection polygon.
Definition at line 243 of file Blender.h.
Referenced by clear(), euclideanDistanceMethodImp(), initialize(), and sumMethodImp().
|
protected |
Definition at line 254 of file Blender.h.
Referenced by noBlendMethodImp().
|
protected |
Definition at line 252 of file Blender.h.
Referenced by noBlendMethodImp().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Definition at line 251 of file Blender.h.
Referenced by noBlendMethodImp().
|
protected |
Definition at line 250 of file Blender.h.
Referenced by noBlendMethodImp().
|
protected |
Definition at line 253 of file Blender.h.
Referenced by noBlendMethodImp().
|
protected |
The output raster no-data value.
Definition at line 232 of file Blender.h.
Referenced by blendIntoRaster1(), euclideanDistanceMethodImp(), initialize(), initState(), noBlendMethodImp(), and sumMethodImp().
|
protected |
The values offset to be applied to raster 1 pixel values before the blended value calcule (one element for each used raster channel/band).
Definition at line 237 of file Blender.h.
Referenced by blendIntoRaster1(), clear(), euclideanDistanceMethodImp(), initialize(), noBlendMethodImp(), te::rp::Blender::BlendIntoRaster1ThreadParams::operator=(), and sumMethodImp().
|
protected |
The values offset to be applied to raster 2 pixel values before the blended value calcule (one element for each used raster channel/band).
Definition at line 239 of file Blender.h.
Referenced by blendIntoRaster1(), clear(), euclideanDistanceMethodImp(), initialize(), noBlendMethodImp(), te::rp::Blender::BlendIntoRaster1ThreadParams::operator=(), and sumMethodImp().
|
protected |
The values scale to be applied to raster 1 pixel values before the blended value calcule (one element for each used raster channel/band).
Definition at line 238 of file Blender.h.
Referenced by blendIntoRaster1(), clear(), euclideanDistanceMethodImp(), initialize(), noBlendMethodImp(), te::rp::Blender::BlendIntoRaster1ThreadParams::operator=(), and sumMethodImp().
|
protected |
The values scale to be applied to raster 2 pixel values before the blended value calcule (one element for each used raster channel/band).
Definition at line 240 of file Blender.h.
Referenced by blendIntoRaster1(), clear(), euclideanDistanceMethodImp(), initialize(), noBlendMethodImp(), te::rp::Blender::BlendIntoRaster1ThreadParams::operator=(), and sumMethodImp().
|
protected |
A sub-set of the intersection polygon wich is part of raster 1 valid data polygon ( raster 1 indexed coods).
Definition at line 225 of file Blender.h.
Referenced by clear(), euclideanDistanceMethodImp(), and initialize().
|
protected |
Size of m_r1IntersectionSegmentsPoints;.
Definition at line 226 of file Blender.h.
Referenced by euclideanDistanceMethodImp(), initialize(), initState(), and sumMethodImp().
|
protected |
A pointer to a geometry (raster 1 world/projected coords) delimiting the raster region with valid data, or null if all raster data area is valid.
Definition at line 222 of file Blender.h.
Referenced by blendIntoRaster1(), clear(), initialize(), and te::rp::Blender::BlendIntoRaster1ThreadParams::operator=().
|
protected |
A sub-set of the intersection polygon wich is part of raster 2 valid data polygon ( raster 1 indexed coods).
Definition at line 227 of file Blender.h.
Referenced by clear(), euclideanDistanceMethodImp(), and initialize().
|
protected |
Size of m_r2IntersectionSegmentsPoints;.
Definition at line 228 of file Blender.h.
Referenced by euclideanDistanceMethodImp(), initialize(), initState(), and sumMethodImp().
|
protected |
A pointer to a geometry (raster 2 world/projected coords) delimiting the raster region with valid data, or null if all raster data area is valid.
Definition at line 223 of file Blender.h.
Referenced by blendIntoRaster1(), clear(), initialize(), and te::rp::Blender::BlendIntoRaster1ThreadParams::operator=().
|
protected |
Input raster 1 band indexes to use.
Definition at line 235 of file Blender.h.
Referenced by blendIntoRaster1(), clear(), euclideanDistanceMethodImp(), initialize(), noBlendMethodImp(), te::rp::Blender::BlendIntoRaster1ThreadParams::operator=(), and sumMethodImp().
|
protected |
Raster 1 no-data values (on value per band).
Definition at line 241 of file Blender.h.
Referenced by clear(), euclideanDistanceMethodImp(), initialize(), noBlendMethodImp(), and sumMethodImp().
|
protected |
Input raster 1.
Definition at line 220 of file Blender.h.
Referenced by blendIntoRaster1(), initialize(), and initState().
|
protected |
Input raster 2 band indexes to use.
Definition at line 236 of file Blender.h.
Referenced by blendIntoRaster1(), clear(), euclideanDistanceMethodImp(), initialize(), noBlendMethodImp(), te::rp::Blender::BlendIntoRaster1ThreadParams::operator=(), and sumMethodImp().
|
protected |
Raster 2 no-data values (on value per band).
Definition at line 242 of file Blender.h.
Referenced by clear(), euclideanDistanceMethodImp(), initialize(), noBlendMethodImp(), and sumMethodImp().
|
protected |
Input raster 2.
Definition at line 221 of file Blender.h.
Referenced by blendIntoRaster1(), initialize(), and initState().
|
protected |
Definition at line 273 of file Blender.h.
Referenced by sumMethodImp().
|
protected |
Definition at line 278 of file Blender.h.
Referenced by sumMethodImp().
|
protected |
Definition at line 276 of file Blender.h.
Referenced by sumMethodImp().
|
protected |
Definition at line 277 of file Blender.h.
Referenced by sumMethodImp().
|
protected |
Definition at line 279 of file Blender.h.
Referenced by sumMethodImp().
|
protected |
Definition at line 275 of file Blender.h.
Referenced by sumMethodImp().
|
protected |
Definition at line 274 of file Blender.h.
Referenced by sumMethodImp().
|
protected |
Definition at line 280 of file Blender.h.
Referenced by sumMethodImp().
|
protected |
The number of threads to use (0:automatic , 1:disabled, any other integer dictates the number of threads)..
Definition at line 217 of file Blender.h.
Referenced by blendIntoRaster1(), initialize(), and initState().