TerraLib 4.1
TePDITPMosaic Class Reference

Mosaic of two rasters linked by a tie-points set. strategy. More...

#include <TePDITPMosaic.hpp>

Inheritance diagram for TePDITPMosaic:
TePDIAlgorithm

List of all members.

Public Member Functions

 TePDITPMosaic ()
 ~TePDITPMosaic ()
bool CheckParameters (const TePDIParameters &parameters) const
 Checks if the supplied parameters fits the requirements of each PDI algorithm implementation.

Protected Member Functions

void ResetState (const TePDIParameters &params)
 Reset the internal state to the initial state.
bool RunImplementation ()
 Runs the current algorithm implementation.
bool calcEqParams (const TePDITypes::TePDIRasterPtrType &raster1, const std::vector< unsigned int > &channels1, TePolygon &interPolR1Ref, const TePDITypes::TePDIRasterPtrType &raster2, const std::vector< unsigned int > &channels2, TePolygon &interPolR2Ref, const double &dummyValue, std::vector< double > &pixelOffsets1, std::vector< double > &pixelScales1, std::vector< double > &pixelOffsets2, std::vector< double > &pixelScales2) const
 Calc equalization parameters.
bool calcStats (const TePDITypes::TePDIRasterPtrType &raster, const std::vector< unsigned int > &channels, TePolygon &interPol, const double &dummyValue, std::vector< double > &means, std::vector< double > &variances) const
 Calc mean and variances for each raster channel.

Detailed Description

Mosaic of two rasters linked by a tie-points set. strategy.

Author:
Emiliano F. Castejon <castejon@dpi.inpe.br>
Note:
The required parameters are:
Parameters:
input_raster1( TePDITypes::TePDIRasterPtrType ) - Input raster 1 (this will be the reference raster).
input_raster2( TePDITypes::TePDIRasterPtrType ) - Input raster 2.
channels1( std::vector< unsigned int > ) - The channels to process from input_raster1.
channels2( std::vector< unsigned int > ) - The channels to process from input_raster2.
output_raster( TePDITypes::TePDIRasterPtrType ) - Output raster.
trans_params( TeGTParams ) - Geometric transformation parameters.
Note:
The optional parameters are:
Parameters:
blend_method( TePDIBlender::BlendMethod ) - Blending method (default: TePDIBlender::NoBlendMethod).
interp_method( TePDIInterpolator::InterpMethod ) - Interpolation method (default TePDIInterpolator::NNMethod) .
dummy_value(double) - A dummy pixel value for use in pixels where no data is available.
auto_equalize( int ) - If present ( any value ) auto-equalizing will be made ( using overlap area reference ).
Note:
The output_raster parameters will take the reference raster parameters.
The output raster data type will be automatically to fit the range of both input rasters.
Transformation tie-points: TeCoordPair::pt1 are raster 1 indexed (line, column) coordinates and TeCoordPair::pt2 are raster 2 indexed (line, column) coordinates.
Examples:

TePDIMosaic_test.cpp.


Constructor & Destructor Documentation

TePDITPMosaic::TePDITPMosaic ( )
TePDITPMosaic::~TePDITPMosaic ( )

Member Function Documentation

bool TePDITPMosaic::calcEqParams ( const TePDITypes::TePDIRasterPtrType raster1,
const std::vector< unsigned int > &  channels1,
TePolygon interPolR1Ref,
const TePDITypes::TePDIRasterPtrType raster2,
const std::vector< unsigned int > &  channels2,
TePolygon interPolR2Ref,
const double &  dummyValue,
std::vector< double > &  pixelOffsets1,
std::vector< double > &  pixelScales1,
std::vector< double > &  pixelOffsets2,
std::vector< double > &  pixelScales2 
) const [protected]

Calc equalization parameters.

Parameters:
raster1Raster 1 pointer.
channels1Raster 1 channels.
interPolR1RefIntersection polygon - Raster 1 projected reference coords.
raster1Raster 2 pointer.
channels1Raster 2 channels.
interPolR2RefIntersection polygon - Raster 2 projected reference coords.
dummyValueDummy value.
pixelOffsets2The generated offsets values for raster 1.
pixelScales2The generated scales values for raster 1.
pixelOffsets2The generated offsets values for raster 2.
pixelScales2The generated scales values for raster 2.
Returns:
true if OK, false on errors.
bool TePDITPMosaic::calcStats ( const TePDITypes::TePDIRasterPtrType raster,
const std::vector< unsigned int > &  channels,
TePolygon interPol,
const double &  dummyValue,
std::vector< double > &  means,
std::vector< double > &  variances 
) const [protected]

Calc mean and variances for each raster channel.

Parameters:
rasterRaster pointer.
channelsRaster channels.
interPolThe restriction polygon over input raster (projected coords).
dummyValueDummy value.
meansThe generated mean values.
meansThe generated variance values.
Returns:
true if OK, false on errors.
bool TePDITPMosaic::CheckParameters ( const TePDIParameters parameters) const [virtual]

Checks if the supplied parameters fits the requirements of each PDI algorithm implementation.

Note:
Error log messages must be generated. No exceptions generated.
Parameters:
parametersThe parameters to be checked.
Returns:
true if the parameters are OK. false if not.

Implements TePDIAlgorithm.

void TePDITPMosaic::ResetState ( const TePDIParameters params) [protected, virtual]

Reset the internal state to the initial state.

Parameters:
paramsThe new parameters referente at initial state.

Implements TePDIAlgorithm.

bool TePDITPMosaic::RunImplementation ( ) [protected, virtual]

Runs the current algorithm implementation.

Returns:
true if OK. false on error.

Implements TePDIAlgorithm.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines