te::rp::MixtureModel Class Reference

Raster decomposition using mixture model. More...

#include <MixtureModel.h>

Inheritance diagram for te::rp::MixtureModel:
te::rp::Algorithm

Classes

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

Public Member Functions

bool execute (AlgorithmOutputParameters &outputParams) throw (te::rp::Exception)
 Executes the mixing model using the parameters defined in inputParams and outputParams. More...
 
bool generateTransformMatrix (boost::numeric::ublas::matrix< double > &matrix)
 Generates a Transform Matrix. 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)
 Initializes model with paramters defined in inputParams. More...
 
bool isInitialized () const
 Model already initialized? More...
 
 MixtureModel ()
 
void reset () throw (te::rp::Exception)
 Resets all variables. More...
 
bool setTransformMatrix (boost::numeric::ublas::matrix< double > &matrix)
 Sets Transform Matrix, read from a file or pre-calculated. More...
 
 ~MixtureModel ()
 

Protected Member Functions

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

Protected Attributes

MixtureModel::InputParameters m_inputParameters
 Mixture model execution parameters. More...
 
bool m_instanceInitialized
 Is this instance already initialized? More...
 

Detailed Description

Raster decomposition using mixture model.

Raster decomposition following the choosed mixture model strategy.

Note
The created output 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 62 of file MixtureModel.h.

Constructor & Destructor Documentation

te::rp::MixtureModel::MixtureModel ( )

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

te::rp::MixtureModel::~MixtureModel ( )

Definition at line 173 of file src/terralib/rp/MixtureModel.cpp.

Member Function Documentation

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

Executes the mixing model using the parameters defined in inputParams and outputParams.

Implements te::rp::Algorithm.

Definition at line 177 of file src/terralib/rp/MixtureModel.cpp.

References b, te::dt::DOUBLE_TYPE, te::rst::Raster::getBand(), te::rst::Raster::getGrid(), te::rp::MixtureModel::InputParameters::getMixtureModelStrategyParams(), te::rst::Band::getProperty(), te::rst::BandProperty::getType(), te::rst::GrayIdxCInt, te::sa::Grid, te::rst::BandProperty::m_colorInterp, te::rp::MixtureModel::InputParameters::m_components, te::rp::MixtureModel::OutputParameters::m_createErrorRaster, te::rst::BandProperty::m_description, te::rp::MixtureModel::OutputParameters::m_errorRasterPtr, m_inputParameters, te::rp::MixtureModel::InputParameters::m_inputRasterBands, te::rp::MixtureModel::InputParameters::m_inputRasterNoDataValues, te::rp::MixtureModel::InputParameters::m_inputRasterPtr, te::rp::MixtureModel::InputParameters::m_inputSensorBands, m_instanceInitialized, te::rp::MixtureModel::OutputParameters::m_max, te::rp::MixtureModel::OutputParameters::m_maxerror, te::rp::MixtureModel::OutputParameters::m_min, te::rp::MixtureModel::OutputParameters::m_minerror, te::rst::BandProperty::m_noDataValue, te::rp::MixtureModel::OutputParameters::m_normalizeOutput, te::rp::MixtureModel::OutputParameters::m_outputRasterPtr, te::rp::MixtureModel::OutputParameters::m_rInfo, te::rp::MixtureModel::OutputParameters::m_rInfoError, te::rp::MixtureModel::OutputParameters::m_rType, te::rp::MixtureModel::InputParameters::m_strategyName, te::rp::MixtureModel::InputParameters::m_transfMatrix, te::rst::BandProperty::m_type, te::rst::RasterFactory::make(), te::common::AbstractFactory< te::rp::MixtureModelStrategy, std::string, std::less< std::string > >::make(), TERP_TRUE_OR_RETURN_FALSE, and te::dt::UCHAR_TYPE.

Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_SUITE(), te::qt::widgets::MixtureModelWizard::execute(), MixtureModel(), and te::qt::widgets::MixtureModelDialog::on_okPushButton_clicked().

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

Model already initialized?

Implements te::rp::Algorithm.

Definition at line 325 of file src/terralib/rp/MixtureModel.cpp.

References m_instanceInitialized.

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

Resets all variables.

Reimplemented from te::rp::Algorithm.

Definition at line 264 of file src/terralib/rp/MixtureModel.cpp.

References m_inputParameters, m_instanceInitialized, and te::rp::MixtureModel::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.

bool te::rp::MixtureModel::setTransformMatrix ( boost::numeric::ublas::matrix< double > &  matrix)

Sets Transform Matrix, read from a file or pre-calculated.

Member Data Documentation

MixtureModel::InputParameters te::rp::MixtureModel::m_inputParameters
protected

Mixture model execution parameters.

Definition at line 195 of file MixtureModel.h.

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

bool te::rp::MixtureModel::m_instanceInitialized
protected

Is this instance already initialized?

Definition at line 194 of file MixtureModel.h.

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


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