All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
te::rp::SegmenterDummyStrategy Class Reference

Dummy strategy (just for testing purposes). More...

#include <SegmenterDummyStrategy.h>

Inheritance diagram for te::rp::SegmenterDummyStrategy:
te::rp::SegmenterStrategy

Public Member Functions

bool execute (SegmenterIdsManager &segmenterIdsManager, const te::rp::SegmenterSegmentsBlock &block2ProcessInfo, const te::rst::Raster &inputRaster, const std::vector< unsigned int > &inputRasterBands, const std::vector< double > &inputRasterNoDataValues, const std::vector< double > &inputRasterBandMinValues, const std::vector< double > &inputRasterBandMaxValues, te::rst::Raster &outputRaster, const unsigned int outputRasterBand, const bool enableProgressInterface) throw ( te::rp::Exception )
 Executes the segmentation strategy over region delimited by the given block. More...
 
double getMemUsageEstimation (const unsigned int bandsToProcess, const unsigned int pixelsNumber) const
 Returns a memory estimation (bytes). More...
 
unsigned int getOptimalBlocksOverlapSize () const
 Returns a optimal blocks overlap size (number of border pixels overlapped between blocks, under one direction). More...
 
bool initialize (SegmenterStrategyParameters const *const strategyParams) throw ( te::rp::Exception )
 Initialize the segmentation strategy. More...
 
void reset ()
 Clear all internal allocated resources and go back to the initial not-initialized state. More...
 
 SegmenterDummyStrategy ()
 
 ~SegmenterDummyStrategy ()
 

Detailed Description

Dummy strategy (just for testing purposes).

Definition at line 41 of file SegmenterDummyStrategy.h.

Constructor & Destructor Documentation

te::rp::SegmenterDummyStrategy::~SegmenterDummyStrategy ( )

Definition at line 43 of file SegmenterDummyStrategy.cpp.

te::rp::SegmenterDummyStrategy::SegmenterDummyStrategy ( )

Definition at line 39 of file SegmenterDummyStrategy.cpp.

Member Function Documentation

bool te::rp::SegmenterDummyStrategy::execute ( SegmenterIdsManager segmenterIdsManager,
const te::rp::SegmenterSegmentsBlock block2ProcessInfo,
const te::rst::Raster inputRaster,
const std::vector< unsigned int > &  inputRasterBands,
const std::vector< double > &  inputRasterNoDataValues,
const std::vector< double > &  inputRasterBandMinValues,
const std::vector< double > &  inputRasterBandMaxValues,
te::rst::Raster outputRaster,
const unsigned int  outputRasterBand,
const bool  enableProgressInterface 
)
throw (te::rp::Exception
)
virtual

Executes the segmentation strategy over region delimited by the given block.

Parameters
segmenterIdsManagerThe segments IDs manager to be used when acquiring/releaseing unique segment IDs.
block2ProcessInfoThe information about the block of raster that must be processed.
inputRasterInput raster.
inputRasterBandsInput raster bands.
inputRasterNoDataValuesA vector of values to be used as input raster no-data values.
inputRasterBandMinValuesThe minimum value present on each band.
inputRasterBandMinValuesThe maximum value present on each band.
outputRasterOutput raster.
outputRasterBandOutput raster band.
enableProgressInterfaceEnable the internal strategy to update the progress interface.
Returns
true if OK, false on errors.
Note
The used gaind/ofset calcule: new_value = ( old_value + offset ) * gain

Implements te::rp::SegmenterStrategy.

Definition at line 58 of file SegmenterDummyStrategy.cpp.

double te::rp::SegmenterDummyStrategy::getMemUsageEstimation ( const unsigned int  bandsToProcess,
const unsigned int  pixelsNumber 
) const
virtual

Returns a memory estimation (bytes).

This parameter is used by the segmenter to guess the sub-image blocks size.

Parameters
bandsToProcessThe number of input raster bands that will be processed at the strategy execution time.
pixelsNumberThe number of pixels.
Returns
A positive memory use estimation.

Implements te::rp::SegmenterStrategy.

Definition at line 151 of file SegmenterDummyStrategy.cpp.

unsigned int te::rp::SegmenterDummyStrategy::getOptimalBlocksOverlapSize ( ) const
virtual

Returns a optimal blocks overlap size (number of border pixels overlapped between blocks, under one direction).

Note
This value will be used in the case where the image is splitted into blocks for segmentation.
Returns
The blocks overlap size.

Implements te::rp::SegmenterStrategy.

Definition at line 157 of file SegmenterDummyStrategy.cpp.

bool te::rp::SegmenterDummyStrategy::initialize ( SegmenterStrategyParameters const *const  strategyParams)
throw (te::rp::Exception
)
virtual

Initialize the segmentation strategy.

Parameters
strategyParamsA pointer to the user given specific segmentation strategy parameters ou NULL if no parameters are present.
Returns
true if OK, false on errors.

Implements te::rp::SegmenterStrategy.

Definition at line 47 of file SegmenterDummyStrategy.cpp.

void te::rp::SegmenterDummyStrategy::reset ( )
virtual

Clear all internal allocated resources and go back to the initial not-initialized state.

Implements te::rp::SegmenterStrategy.

Definition at line 54 of file SegmenterDummyStrategy.cpp.


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