te::rp::Classifier Class Reference

Raster classification. More...

#include <Classifier.h>

Inheritance diagram for te::rp::Classifier:
te::rp::Algorithm

Classes

class  InputParameters
 Classifier input parameters. More...
 
class  OutputParameters
 Classifier output parameters. More...
 

Public Member Functions

 Classifier ()
 
bool execute (AlgorithmOutputParameters &outputParams) throw (te::rp::Exception)
 Executes the algorithm using the supplied parameters. More...
 
const std::string & getErrorMessage () const
 Return the current error message if there is any. More...
 
bool initialize (const AlgorithmInputParameters &inputParams) throw (te::rp::Exception)
 Initialize the algorithm instance making it ready for execution. More...
 
bool isInitialized () const
 Returns true if the algorithm instance is initialized and ready for execution. More...
 
void reset () throw (te::rp::Exception)
 Clear all internal allocated objects and reset the algorithm to its initial state. More...
 
 ~Classifier ()
 

Protected Member Functions

void setErrorMessage (const std::string &newErrorMessage)
 Set the current error message. More...
 

Protected Attributes

Classifier::InputParameters m_inputParameters
 Classifier execution parameters. More...
 
bool m_instanceInitialized
 Is this instance already initialized? More...
 

Detailed Description

Raster classification.

Raster classification following the choosed strategy.

Note
The created label image will be written to the raster instance pointed by m_outRasterPtr (in this case the output band must also be passed by m_outRasterBand).

Definition at line 65 of file Classifier.h.

Constructor & Destructor Documentation

te::rp::Classifier::Classifier ( )

Definition at line 161 of file src/terralib/rp/Classifier.cpp.

References ~Classifier().

te::rp::Classifier::~Classifier ( )
default

Referenced by Classifier().

Member Function Documentation

bool te::rp::Classifier::execute ( AlgorithmOutputParameters outputParams)
throw (te::rp::Exception
)
virtual

Executes the algorithm using the supplied parameters.

Parameters
outputParamsOutput parameters.
Returns
true if OK, false on errors.
Note
A return error string can be obtained via Algorithm::getErrorMessage()

Implements te::rp::Algorithm.

Definition at line 168 of file src/terralib/rp/Classifier.cpp.

References col, te::rp::Classifier::InputParameters::getClassifierStrategyParams(), te::rst::Band::getValue(), te::sa::Grid, te::rp::Classifier::InputParameters::m_createRasterPalette, te::rp::Classifier::InputParameters::m_enableMultiThread, te::rp::Classifier::InputParameters::m_enableProgressInterface, te::rp::Classifier::InputParameters::m_enableRasterCache, m_inputParameters, te::rp::Classifier::InputParameters::m_inputPolygons, te::rp::Classifier::InputParameters::m_inputRasterBands, te::rp::Classifier::InputParameters::m_inputRasterPtr, m_instanceInitialized, te::rp::Classifier::OutputParameters::m_metadata, te::rp::Classifier::OutputParameters::m_outputRasterPtr, te::rp::Classifier::OutputParameters::m_rInfo, te::rp::Classifier::OutputParameters::m_rType, te::rp::Classifier::InputParameters::m_strategyName, te::rst::BandProperty::m_type, te::rp::Classifier::InputParameters::m_userOutputPalette, te::rst::RasterFactory::make(), te::common::AbstractFactory< te::rp::ClassifierStrategy, std::string, std::less< std::string > >::make(), nCols, te::rst::PaletteIdxCInt, te::rst::Band::setValue(), TERP_INSTANCE_TRUE_OR_RETURN_FALSE, and te::dt::UCHAR_TYPE.

Referenced by BOOST_AUTO_TEST_CASE(), DummyClassifier(), EDClassifier(), EMClassifier(), te::qt::widgets::ClassifierWizard::execute(), ISOSegClassifier(), KMeansClassifier(), MAPClassifier(), te::qt::widgets::ClassifierDialog::on_okPushButton_clicked(), and SAMClassifier().

bool te::rp::Classifier::isInitialized ( ) const
virtual

Returns true if the algorithm instance is initialized and ready for execution.

Returns
true if the algorithm instance is initialized and ready for execution.

Implements te::rp::Algorithm.

Definition at line 334 of file src/terralib/rp/Classifier.cpp.

References m_instanceInitialized.

void te::rp::Classifier::reset ( )
throw (te::rp::Exception
)
virtual

Clear all internal allocated objects and reset the algorithm to its initial state.

Reimplemented from te::rp::Algorithm.

Definition at line 273 of file src/terralib/rp/Classifier.cpp.

References m_inputParameters, m_instanceInitialized, te::rp::Algorithm::reset(), and te::rp::Classifier::InputParameters::reset().

Referenced by initialize().

void te::rp::Algorithm::setErrorMessage ( const std::string &  newErrorMessage)
protectedinherited

Set the current error message.

Parameters
newErrorMessageNew error message;

Definition at line 49 of file rp/Algorithm.cpp.

References te::rp::Algorithm::m_errorMessage.

Member Data Documentation

Classifier::InputParameters te::rp::Classifier::m_inputParameters
protected

Classifier execution parameters.

Definition at line 184 of file Classifier.h.

Referenced by execute(), initialize(), and reset().

bool te::rp::Classifier::m_instanceInitialized
protected

Is this instance already initialized?

Definition at line 183 of file Classifier.h.

Referenced by execute(), initialize(), isInitialized(), and reset().


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