#include <BlenderRule.h>
|
| BlenderRule () |
|
| BlenderRule (const BlenderRule &other) |
|
virtual BlenderRule * | clone () const =0 |
| Create a clone of this instance. More...
|
|
virtual void | getBlendedValues (const double &line1, const double &col1, const double &line2, const double &col2, double *const blendedValuesPtr) const =0 |
| Blend a pixel value using the current parameters. More...
|
|
virtual bool | initialize (const te::rst::Raster &raster1, const std::vector< unsigned int > &raster1Bands, const te::rst::Raster &raster2, const std::vector< unsigned int > &raster2Bands, 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) |
| Inititate the blender instance. More...
|
|
const BlenderRule & | operator= (const BlenderRule &other) |
|
void | setErrorMessage (const std::string &newErrorMessage) |
| Set the current error message. More...
|
|
Definition at line 44 of file BlenderRule.h.
◆ ~BlenderRule()
virtual te::rp::BlenderRule::~BlenderRule |
( |
| ) |
|
|
virtual |
◆ BlenderRule() [1/2]
te::rp::BlenderRule::BlenderRule |
( |
const BlenderRule & |
other | ) |
|
|
protected |
◆ BlenderRule() [2/2]
te::rp::BlenderRule::BlenderRule |
( |
| ) |
|
|
protected |
◆ clear()
void te::rp::BlenderRule::clear |
( |
| ) |
|
|
private |
◆ clone()
virtual BlenderRule * te::rp::BlenderRule::clone |
( |
| ) |
const |
|
protectedpure virtual |
Create a clone of this instance.
- Returns
- A clone of this instance.
- Note
- The caller of this method must take othe owndershipd of the returned pointer.
◆ getBlendedValues()
virtual void te::rp::BlenderRule::getBlendedValues |
( |
const double & |
line1, |
|
|
const double & |
col1, |
|
|
const double & |
line2, |
|
|
const double & |
col2, |
|
|
double *const |
blendedValuesPtr |
|
) |
| const |
|
protectedpure virtual |
Blend a pixel value using the current parameters.
- Parameters
-
line1 | Line (raster 1 reference). |
col1 | Column (raster 1 reference). |
line2 | Line (raster 2). |
col2 | Column (raster 2).
|
blendedValuesPtr | A pointer to a pre-allocated vector where the blended values will be stored. |
- Note
- The caller of this method must be aware that the returned blended value may be outside the original input rasters valid values range.
-
Raster 1 values have precedence over raster 2 values (when applicable).
◆ getErrorMessage()
const std::string & te::rp::BlenderRule::getErrorMessage |
( |
| ) |
const |
Return the current error message if there is any.
- Returns
- Return the current error message if there is any.
◆ initialize()
virtual bool te::rp::BlenderRule::initialize |
( |
const te::rst::Raster & |
raster1, |
|
|
const std::vector< unsigned int > & |
raster1Bands, |
|
|
const te::rst::Raster & |
raster2, |
|
|
const std::vector< unsigned int > & |
raster2Bands, |
|
|
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 |
|
) |
| |
|
protectedvirtual |
Inititate the blender instance.
- Parameters
-
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). |
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). |
- Returns
- true if ok, false on errors
- Note
- Aboute scale and offset parametrs: outValue = ( inputValue * scale ) + offset
◆ initState()
void te::rp::BlenderRule::initState |
( |
| ) |
|
|
private |
◆ operator=()
◆ setErrorMessage()
void te::rp::BlenderRule::setErrorMessage |
( |
const std::string & |
newErrorMessage | ) |
|
|
protected |
Set the current error message.
- Parameters
-
newErrorMessage | New error message; |
◆ Blender
◆ m_errorMessage
std::string te::rp::BlenderRule::m_errorMessage |
|
protected |
◆ m_forceRaster1NoDataValue
bool te::rp::BlenderRule::m_forceRaster1NoDataValue |
|
protected |
Use noDataValue as the input raster 1 no-data value (The original rasters no-data values will be ignored)
Definition at line 61 of file BlenderRule.h.
◆ m_forceRaster2NoDataValue
bool te::rp::BlenderRule::m_forceRaster2NoDataValue |
|
protected |
Use noDataValue as the input raster 2 no-data value (The original rasters no-data values will be ignored)
Definition at line 62 of file BlenderRule.h.
◆ 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).
Definition at line 67 of file BlenderRule.h.
◆ m_interpMethod1
The interpolation method to use when reading raster 1 data.
Definition at line 68 of file BlenderRule.h.
◆ m_interpMethod2
The interpolation method to use when reading raster 2 data.
Definition at line 69 of file BlenderRule.h.
◆ m_outputNoDataValue
double te::rp::BlenderRule::m_outputNoDataValue |
|
protected |
The output raster no-data value.
Definition at line 70 of file BlenderRule.h.
◆ m_pixelOffsets1
std::vector< double > te::rp::BlenderRule::m_pixelOffsets1 |
|
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 73 of file BlenderRule.h.
◆ m_pixelOffsets2
std::vector< double > te::rp::BlenderRule::m_pixelOffsets2 |
|
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 75 of file BlenderRule.h.
◆ m_pixelScales1
std::vector< double > te::rp::BlenderRule::m_pixelScales1 |
|
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 74 of file BlenderRule.h.
◆ m_pixelScales2
std::vector< double > te::rp::BlenderRule::m_pixelScales2 |
|
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 76 of file BlenderRule.h.
◆ 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.
Definition at line 65 of file BlenderRule.h.
◆ 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.
Definition at line 66 of file BlenderRule.h.
◆ m_raster1Bands
std::vector< unsigned int > te::rp::BlenderRule::m_raster1Bands |
|
protected |
Input raster 1 band indexes to use.
Definition at line 71 of file BlenderRule.h.
◆ m_raster1Ptr
◆ m_raster2Bands
std::vector< unsigned int > te::rp::BlenderRule::m_raster2Bands |
|
protected |
Input raster 2 band indexes to use.
Definition at line 72 of file BlenderRule.h.
◆ m_raster2Ptr
The documentation for this class was generated from the following file:
- /home/castejon/castejon_files/develop/terralib5/git_release/src/terralib/rp/BlenderRule.h