| TerraLib 4.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Examples

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
TePDIBlender Class Reference
Image processing auxiliary classes/methods.

Blended pixel value calculation for two overlaped rasters. More...

`#include <TePDIBlender.hpp>`

List of all members.

## Public Types

enum | BlendMethod { NoBlendMethod = 1, MeanBlendMethod = 2, EuclideanBlendMethod = 3 }
typedef TeSharedPtr< TePDIBlender > | pointer

## Public Member Functions

| TePDIBlender ()
| ~TePDIBlender ()
bool | init (const TePDITypes::TePDIRasterPtrType &raster1Ptr, const std::vector< unsigned int > raster1ChannelsVec, const TePDITypes::TePDIRasterPtrType &raster2Ptr, const std::vector< unsigned int > raster2ChannelsVec, BlendMethod blendMethod, TePDIInterpolator::InterpMethod interpMethod, const TeGTParams &transParams, const double &dummyValue, const std::vector< double > &pixelOffsets1, const std::vector< double > &pixelScales1, const std::vector< double > &pixelOffsets2, const std::vector< double > &pixelScales2, const TePolygon &raster1Pol=TePolygon(), const TePolygon &raster2Pol=TePolygon())
| Initiate this instance.
void | blend (const double &line, const double &col, const unsigned int &rasterChannelsVecsIdx, double &value)
| Blend a pixel value using the current parameters.

## Protected Types

typedef void(TePDIBlender::* | BlendFunctPtr )(const double &line, const double &col, const unsigned int &band, double &value)
| Type definition for the a bleding function pointer.

## Protected Member Functions

void | reset ()
| Reset this instance cleaning all allocated resources.
void | noBlendMethodImp (const double &line, const double &col, const unsigned int &rasterChannelsVecsIdx, double &value)
void | eucBlendMethodImp (const double &line, const double &col, const unsigned int &rasterChannelsVecsIdx, double &value)
void | meanBlendMethodImp (const double &line, const double &col, const unsigned int &rasterChannelsVecsIdx, double &value)

## Protected Attributes

double | dummyValue_
| Current dummy value (default:0).
BlendFunctPtr | blendFunctPtr_
| The current blending method pointer (default:noBlendMethod).
BlendMethod | blendMethod_
| Current blending method (default:NoBlendMethod).
short | relation_
| The relation between the two rasters boinding box - raster 1 indexed reference (default:0)
TeGeometricTransformation::pointer | transPrt_
| Current geometrical transformation pointer.
TePDITypes::TePDIRasterPtrType | raster1Ptr_
| Input raster 1 pointer.
std::vector< unsigned int > | raster1ChannelsVec_
| Input raster 1 used channels vector.
TePDITypes::TePDIRasterPtrType | raster2Ptr_
| Input raster 2 pointer.
std::vector< unsigned int > | raster2ChannelsVec_
| Input raster 2 used channels vector.
TePDIInterpolator | interp1Instance_
| Input raster 1 internal interpolator instance.
TePDIInterpolator | interp2Instance_
| Input raster 2 internal interpolator instance.
TeCoord2D | noBlendMethodImp_coord1_
TeCoord2D | noBlendMethodImp_coord2_
TeCoord2D | eucBlendMethodImp_coord1_
TeCoord2D | eucBlendMethodImp_coord2_
double | eucBlendMethodImp_value1_
double | eucBlendMethodImp_value2_
double | eucBlendMethodImp_weight1_
double | eucBlendMethodImp_weight2_
double | eucBlendMethodImp_minDistToR1_
double | eucBlendMethodImp_minDistToR2_
TeCoord2D | eucBlendMethodImp_curCoord_
TeCoord2D | eucBlendMethodImp_dummyCoord_
double | eucBlendMethodImp_currDist_
unsigned int | eucBlendMethodImp_iLSIdx_
TeCoord2D | meanBlendMethodImp_coord1_
TeCoord2D | meanBlendMethodImp_coord2_
double | meanBlendMethodImp_value1_
double | meanBlendMethodImp_value2_
TePolygon | interPolR1IdxRef_
| Intersection polygon between the two images (indexed - raster 1 indexed reference )
TeLineSet | interLineSetInR1_
| Intersection polygon line sets that are inside the raster 1 bounding box (raster 1 indexed reference)
TeLineSet | interLineSetInR2_
| Intersection polygon line sets that are inside the raster 2 bounding box (raster 1 indexed reference)
std::vector< double > | pixelOffsets1_
| The values offsets to be applied to raster 1 pixel values before the blended value calcule (one element for each used raster channel/band).
std::vector< double > | pixelScales1_
| pixelScale1 The values scale to be applied to raster 1 pixel values before the blended value calcule (one element for each used raster channel/band).
std::vector< double > | pixelOffsets2_
| pixelOff2 The values offset to be applied to raster 2 pixel values before the blended value calcule (one element for each used raster channel/band).
std::vector< double > | pixelScales2_

## Detailed Description

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.

Author:
  Emiliano F. Castejon <castejon@dpi.inpe.br>

Examples:

  TePDIBlender_test.cpp.

## Member Typedef Documentation

typedef void(TePDIBlender::* TePDIBlender::BlendFunctPtr)(const double &line, const double &col, const unsigned int &band, double &value)`[protected]`

Type definition for the a bleding function pointer.

Parameters:

  line | Line.
  col | Column.
  band | Band.
  value | Interpolated value.

TeSharedPtr< TePDIBlender > TePDIBlender::pointer

Type definition for a instance pointer

## Member Enumeration Documentation

enum TePDIBlender::BlendMethod

Enumerator:

  NoBlendMethod | No blending performed.
  MeanBlendMethod | Mean of overlapped pixels method.
  EuclideanBlendMethod | Euclidean distance based blending method.

## Constructor & Destructor Documentation

TePDIBlender::TePDIBlender | ( |  | ) |

TePDIBlender::~TePDIBlender | ( |  | ) |

## Member Function Documentation

void TePDIBlender::blend | ( | const double & | line,
|  | const double & | col,
|  | const unsigned int & | rasterChannelsVecsIdx,
|  | double & | value
| ) |  | `[inline]`

Blend a pixel value using the current parameters.

Parameters:

  line | Line (raster 1 reference).
  col | Column (raster 1 reference).
  rasterChannelsVecsIdx | Vector index (the index to search the correct band/channel for each input raster from raster1ChannelsVec and raster2ChannelsVec).
  value | Blended value.

Note:
  The caller of this method must be aware that the returned blended value may be outside the original input rasters valid values range.

Examples:
  TePDIBlender_test.cpp.

void TePDIBlender::eucBlendMethodImp | ( | const double & | line,
|  | const double & | col,
|  | const unsigned int & | rasterChannelsVecsIdx,
|  | double & | value
| ) |  | `[protected]`

bool TePDIBlender::init | ( | const TePDITypes::TePDIRasterPtrType & | raster1Ptr,
|  | const std::vector< unsigned int > | raster1ChannelsVec,
|  | const TePDITypes::TePDIRasterPtrType & | raster2Ptr,
|  | const std::vector< unsigned int > | raster2ChannelsVec,
|  | BlendMethod | blendMethod,
|  | TePDIInterpolator::InterpMethod | interpMethod,
|  | const TeGTParams & | transParams,
|  | const double & | dummyValue,
|  | const std::vector< double > & | pixelOffsets1,
|  | const std::vector< double > & | pixelScales1,
|  | const std::vector< double > & | pixelOffsets2,
|  | const std::vector< double > & | pixelScales2,
|  | const TePolygon & | raster1Pol = `TePolygon()`,
|  | const TePolygon & | raster2Pol = `TePolygon()`
| ) |  |

Initiate this instance.

Parameters:

  raster1Ptr | Input raster 1 pointer.
  raster1ChannelsVec | Input raster 1 bands/channels.
  raster2Ptr | Input raster 2 pointer.
  raster2ChannelsVec | Input raster 2 bands/channels.
  blendMethod | Blending method.
  interpMethod | Interpolation method.
  transParams | Transformation parameters.
  dummyValue | The value to be returned for cases where there is no raster data to blend.
  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).
  raster1Pol | A polygon (raster 1 indexed coords - line, col) delimiting the raster region with valid data (if an empty polygon is given the entire raster will be considered).
  raster2Pol | A polygon (raster 2 indexed coords - line, col) delimiting the raster region with valid data (if an empty polygon is given the entire raster will be considered).

Returns:
  true if OK, false on errors.

Note:
  Transformation tie-points: TeCoordPair::pt1 are raster 1 indexed (line, column) coordinates and TeCoordPair::pt2 are raster 2 indexed (line, column) coordinates.
  raster1ChannelsVec, raster2ChannelsVec, pixelOffsets1, pixelScales1, pixelOffsets2 and pixelScales2 must have the same number of elements.

Examples:
  TePDIBlender_test.cpp.

void TePDIBlender::meanBlendMethodImp | ( | const double & | line,
|  | const double & | col,
|  | const unsigned int & | rasterChannelsVecsIdx,
|  | double & | value
| ) |  | `[protected]`

void TePDIBlender::noBlendMethodImp | ( | const double & | line,
|  | const double & | col,
|  | const unsigned int & | rasterChannelsVecsIdx,
|  | double & | value
| ) |  | `[protected]`

void TePDIBlender::reset | ( |  | ) | `[protected]`

Reset this instance cleaning all allocated resources.

## Member Data Documentation

BlendFunctPtr TePDIBlender::blendFunctPtr_`[protected]`

The current blending method pointer (default:noBlendMethod).

BlendMethod TePDIBlender::blendMethod_`[protected]`

Current blending method (default:NoBlendMethod).

double TePDIBlender::dummyValue_`[protected]`

Current dummy value (default:0).

TeCoord2D TePDIBlender::eucBlendMethodImp_coord1_`[protected]`

TeCoord2D TePDIBlender::eucBlendMethodImp_coord2_`[protected]`

TeCoord2D TePDIBlender::eucBlendMethodImp_curCoord_`[protected]`

double TePDIBlender::eucBlendMethodImp_currDist_`[protected]`

TeCoord2D TePDIBlender::eucBlendMethodImp_dummyCoord_`[protected]`

unsigned int TePDIBlender::eucBlendMethodImp_iLSIdx_`[protected]`

double TePDIBlender::eucBlendMethodImp_minDistToR1_`[protected]`

double TePDIBlender::eucBlendMethodImp_minDistToR2_`[protected]`

double TePDIBlender::eucBlendMethodImp_value1_`[protected]`

double TePDIBlender::eucBlendMethodImp_value2_`[protected]`

double TePDIBlender::eucBlendMethodImp_weight1_`[protected]`

double TePDIBlender::eucBlendMethodImp_weight2_`[protected]`

TeLineSet TePDIBlender::interLineSetInR1_`[protected]`

Intersection polygon line sets that are inside the raster 1 bounding box (raster 1 indexed reference)

TeLineSet TePDIBlender::interLineSetInR2_`[protected]`

Intersection polygon line sets that are inside the raster 2 bounding box (raster 1 indexed reference)

TePDIInterpolator TePDIBlender::interp1Instance_`[protected]`

Input raster 1 internal interpolator instance.

TePDIInterpolator TePDIBlender::interp2Instance_`[protected]`

Input raster 2 internal interpolator instance.

TePolygon TePDIBlender::interPolR1IdxRef_`[protected]`

Intersection polygon between the two images (indexed - raster 1 indexed reference )

TeCoord2D TePDIBlender::meanBlendMethodImp_coord1_`[protected]`

TeCoord2D TePDIBlender::meanBlendMethodImp_coord2_`[protected]`

double TePDIBlender::meanBlendMethodImp_value1_`[protected]`

double TePDIBlender::meanBlendMethodImp_value2_`[protected]`

TeCoord2D TePDIBlender::noBlendMethodImp_coord1_`[protected]`

TeCoord2D TePDIBlender::noBlendMethodImp_coord2_`[protected]`

std::vector< double > TePDIBlender::pixelOffsets1_`[protected]`

The values offsets to be applied to raster 1 pixel values before the blended value calcule (one element for each used raster channel/band).

std::vector< double > TePDIBlender::pixelOffsets2_`[protected]`

pixelOff2 The values offset to be applied to raster 2 pixel values before the blended value calcule (one element for each used raster channel/band).

std::vector< double > TePDIBlender::pixelScales1_`[protected]`

pixelScale1 The values scale to be applied to raster 1 pixel values before the blended value calcule (one element for each used raster channel/band).

std::vector< double > TePDIBlender::pixelScales2_`[protected]`

Parameters:

  pixelScale2 | The values scale to be applied to raster 2 pixel values before the blended value calcule (one element for each used raster channel/band).

std::vector< unsigned int > TePDIBlender::raster1ChannelsVec_`[protected]`

Input raster 1 used channels vector.

TePDITypes::TePDIRasterPtrType TePDIBlender::raster1Ptr_`[protected]`

Input raster 1 pointer.

std::vector< unsigned int > TePDIBlender::raster2ChannelsVec_`[protected]`

Input raster 2 used channels vector.

TePDITypes::TePDIRasterPtrType TePDIBlender::raster2Ptr_`[protected]`

Input raster 2 pointer.

short TePDIBlender::relation_`[protected]`

The relation between the two rasters boinding box - raster 1 indexed reference (default:0)

TeGeometricTransformation::pointer TePDIBlender::transPrt_`[protected]`

Current geometrical transformation pointer.

The documentation for this class was generated from the following files:

- E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/image_processing/TePDIBlender.hpp
- E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/image_processing/TePDIBlender.cpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines