te::rp::SegmenterStrategy Class Referenceabstract

Raster segmenter strategy base class. More...

#include <SegmenterStrategy.h>

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

Public Types

enum  BlocksMergingMethod { NoMerging = 0, GradientMerging = 1 }
 Blocks merging method. More...
 

Public Member Functions

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

Protected Member Functions

 SegmenterStrategy ()
 

Private Member Functions

const SegmenterStrategyoperator= (const SegmenterStrategy &)
 
 SegmenterStrategy (const SegmenterStrategy &)
 

Detailed Description

Raster segmenter strategy base class.

Definition at line 46 of file SegmenterStrategy.h.

Member Enumeration Documentation

Blocks merging method.

Enumerator
NoMerging 

No merging.

GradientMerging 

Gradient Merging.

Definition at line 52 of file SegmenterStrategy.h.

Constructor & Destructor Documentation

virtual te::rp::SegmenterStrategy::~SegmenterStrategy ( )
virtual
te::rp::SegmenterStrategy::SegmenterStrategy ( )
protected
te::rp::SegmenterStrategy::SegmenterStrategy ( const SegmenterStrategy )
private

Member Function Documentation

virtual bool te::rp::SegmenterStrategy::execute ( SegmenterIdsManager segmenterIdsManager,
const te::rp::SegmenterSegmentsBlock block2ProcessInfo,
const te::rst::Raster inputRaster,
const std::vector< unsigned int > &  inputRasterBands,
const std::vector< std::complex< double > > &  inputRasterNoDataValues,
const std::vector< std::complex< double > > &  inputRasterBandMinValues,
const std::vector< std::complex< double > > &  inputRasterBandMaxValues,
te::rst::Raster outputRaster,
const unsigned int  outputRasterBand,
const bool  enableProgressInterface 
)
throw (te::rp::Exception
)
pure 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

Implemented in te::rp::SegmenterRegionGrowingBaatzStrategy, te::rp::SegmenterRegionGrowingMeanStrategy, and te::rp::SegmenterDummyStrategy.

virtual BlocksMergingMethod te::rp::SegmenterStrategy::getBlocksMergingMethod ( ) const
pure virtual

Return the strategy blocks merging method.

Returns
The blocks merging method.

Implemented in te::rp::SegmenterRegionGrowingBaatzStrategy, te::rp::SegmenterRegionGrowingMeanStrategy, and te::rp::SegmenterDummyStrategy.

virtual double te::rp::SegmenterStrategy::getMemUsageEstimation ( const unsigned int  bandsToProcess,
const unsigned int  pixelsNumber 
) const
pure 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.

Implemented in te::rp::SegmenterRegionGrowingBaatzStrategy, te::rp::SegmenterRegionGrowingMeanStrategy, and te::rp::SegmenterDummyStrategy.

virtual unsigned int te::rp::SegmenterStrategy::getOptimalBlocksOverlapSize ( ) const
pure 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.

Implemented in te::rp::SegmenterRegionGrowingBaatzStrategy, te::rp::SegmenterRegionGrowingMeanStrategy, and te::rp::SegmenterDummyStrategy.

virtual bool te::rp::SegmenterStrategy::initialize ( SegmenterStrategyParameters const *const  strategyParams)
throw (te::rp::Exception
)
pure 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.

Implemented in te::rp::SegmenterRegionGrowingBaatzStrategy, te::rp::SegmenterRegionGrowingMeanStrategy, and te::rp::SegmenterDummyStrategy.

const SegmenterStrategy& te::rp::SegmenterStrategy::operator= ( const SegmenterStrategy )
private
virtual void te::rp::SegmenterStrategy::reset ( )
pure virtual

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

Implemented in te::rp::SegmenterRegionGrowingBaatzStrategy, te::rp::SegmenterRegionGrowingMeanStrategy, and te::rp::SegmenterDummyStrategy.

virtual bool te::rp::SegmenterStrategy::shouldComputeMinMaxValues ( ) const
pure virtual

Returns if the min and max pixel values should be computed.

Returns
True if min and max values should be computed. False otherwise.

Implemented in te::rp::SegmenterRegionGrowingBaatzStrategy, te::rp::SegmenterRegionGrowingMeanStrategy, and te::rp::SegmenterDummyStrategy.


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