te::rp::MixtureModelPCAStrategy Class Reference

#include <MixtureModelPCAStrategy.h>

Inheritance diagram for te::rp::MixtureModelPCAStrategy:
te::rp::MixtureModelStrategy

Classes

class  Parameters
 MixtureModel Parameters. More...
 

Public Member Functions

bool execute (const te::rst::Raster &inputRaster, const std::vector< unsigned int > &inputRasterBands, const std::vector< std::string > &inputSensorBands, const std::map< std::string, std::vector< double > > &components, std::vector< te::rst::Raster * > &outputRaster, const bool normalize, const bool enableProgressInterface) throw (te::rp::Exception)
 Executes the segmentation strategy. More...
 
bool generateTransformMatrix (const std::vector< unsigned int > &inputRasterBands, const std::vector< std::string > &inputSensorBands, const std::map< std::string, std::vector< double > > &components)
 Generates the used transformation matrix (when applicable). More...
 
const std::string & getErrorMessage () const
 Return the current error message if there is any. More...
 
bool getMinMax (std::vector< double > &, std::vector< double > &) const
 
bool getMinMaxError (std::vector< double > &, std::vector< double > &) const
 
bool getTransformMatrix (boost::numeric::ublas::matrix< double > &matrix) const
 Returns the used transformation matrix (when applicable). More...
 
bool initialize (StrategyParameters const *const strategyParams) throw (te::rp::Exception)
 Initialize the segmentation strategy. More...
 
 MixtureModelPCAStrategy ()
 
bool setTransformMatrix (boost::numeric::ublas::matrix< double > &matrix)
 Sets the used transformation matrix. More...
 
 ~MixtureModelPCAStrategy ()
 

Protected Member Functions

virtual void reset ()
 Reset to an initial state. More...
 
void setErrorMessage (const std::string &newErrorMessage)
 Set the current error message. More...
 

Protected Attributes

bool m_isInitialized
 True if this instance is initialized. More...
 
std::vector< double > m_max
 Maximum value. More...
 
std::vector< double > m_maxerror
 Maximum error value. More...
 
std::vector< double > m_min
 Transformation matrix;. More...
 
std::vector< double > m_minerror
 Minimun error value. More...
 
MixtureModelPCAStrategy::Parameters m_parameters
 Internal execution parameters. More...
 
boost::numeric::ublas::matrix< double > m_transfMatrix
 

Detailed Description

Definition at line 49 of file MixtureModelPCAStrategy.h.

Constructor & Destructor Documentation

te::rp::MixtureModelPCAStrategy::MixtureModelPCAStrategy ( )

Definition at line 73 of file MixtureModelPCAStrategy.cpp.

References m_isInitialized.

te::rp::MixtureModelPCAStrategy::~MixtureModelPCAStrategy ( )

Definition at line 78 of file MixtureModelPCAStrategy.cpp.

Member Function Documentation

bool te::rp::MixtureModelPCAStrategy::execute ( const te::rst::Raster inputRaster,
const std::vector< unsigned int > &  inputRasterBands,
const std::vector< std::string > &  inputSensorBands,
const std::map< std::string, std::vector< double > > &  components,
std::vector< te::rst::Raster * > &  outputRaster,
const bool  normalize,
const bool  enableProgressInterface 
)
throw (te::rp::Exception
)
virtual

Executes the segmentation strategy.

Parameters
inputRasterInput raster.
inputRasterBandsInput raster bands.
componentsThe set of endmembers and its radiances.
outputRasterOutput raster vector, contains output raster and error raster if requested.
enableProgressInterfaceEnable the internal strategy to update the progress interface.
Returns
true if OK, false on errors.

Implements te::rp::MixtureModelStrategy.

Definition at line 100 of file MixtureModelPCAStrategy.cpp.

References b, te::dt::DOUBLE_TYPE, te::common::EigenVectors(), fowardBackSubstitution(), gaussElimination(), generateTransformMatrix(), te::rp::GetDigitalNumberBandMax(), te::rp::GetDigitalNumberBandMin(), te::rst::GrayIdxCInt, te::sa::Grid, te::rst::BandProperty::m_colorInterp, m_isInitialized, m_max, m_maxerror, m_min, m_minerror, m_transfMatrix, te::rst::BandProperty::m_type, te::rst::RasterFactory::make(), TE_TR, TERP_TRUE_OR_RETURN_FALSE, and te::common::TaskProgress::UNDEFINED.

bool te::rp::MixtureModelPCAStrategy::generateTransformMatrix ( const std::vector< unsigned int > &  inputRasterBands,
const std::vector< std::string > &  inputSensorBands,
const std::map< std::string, std::vector< double > > &  components 
)
virtual

Generates the used transformation matrix (when applicable).

Parameters
inputRasterBandsInput raster bands.
inputSensorBandsInput names of the sensor/bands.
componentsA set of endmembers and its radiances.
Returns
true if OK, false on errors or not applicable cases.

Implements te::rp::MixtureModelStrategy.

Definition at line 433 of file MixtureModelPCAStrategy.cpp.

References te::rp::GetDigitalNumberBandMax(), and m_transfMatrix.

Referenced by execute().

const std::string & te::rp::MixtureModelStrategy::getErrorMessage ( ) const
inherited

Return the current error message if there is any.

Returns
Return the current error message if there is any.

Definition at line 38 of file MixtureModelStrategy.cpp.

References te::rp::MixtureModelStrategy::m_errorMessage.

bool te::rp::MixtureModelPCAStrategy::getMinMax ( std::vector< double > &  min,
std::vector< double > &  max 
) const
virtual

Implements te::rp::MixtureModelStrategy.

Definition at line 458 of file MixtureModelPCAStrategy.cpp.

References m_max, and m_min.

bool te::rp::MixtureModelPCAStrategy::getMinMaxError ( std::vector< double > &  min,
std::vector< double > &  max 
) const
virtual

Implements te::rp::MixtureModelStrategy.

Definition at line 465 of file MixtureModelPCAStrategy.cpp.

References m_maxerror, and m_minerror.

bool te::rp::MixtureModelPCAStrategy::getTransformMatrix ( boost::numeric::ublas::matrix< double > &  matrix) const
virtual

Returns the used transformation matrix (when applicable).

Parameters
matrixThe transformation matrix.
Returns
true if OK, false on errors or not applicable cases.

Implements te::rp::MixtureModelStrategy.

Definition at line 420 of file MixtureModelPCAStrategy.cpp.

References m_transfMatrix.

bool te::rp::MixtureModelPCAStrategy::initialize ( StrategyParameters 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::MixtureModelStrategy.

Definition at line 82 of file MixtureModelPCAStrategy.cpp.

References m_isInitialized, and m_parameters.

void te::rp::MixtureModelStrategy::reset ( )
protectedvirtualinherited

Reset to an initial state.

Definition at line 48 of file MixtureModelStrategy.cpp.

References te::rp::MixtureModelStrategy::m_errorMessage.

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

Set the current error message.

Parameters
newErrorMessageNew error message;

Definition at line 43 of file MixtureModelStrategy.cpp.

References te::rp::MixtureModelStrategy::m_errorMessage.

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

Sets the used transformation matrix.

Parameters
matrixThe transformation matrix.
Returns
true if OK, false on errors or not applicable cases.

Implements te::rp::MixtureModelStrategy.

Definition at line 427 of file MixtureModelPCAStrategy.cpp.

References m_transfMatrix.

Member Data Documentation

bool te::rp::MixtureModelPCAStrategy::m_isInitialized
protected

True if this instance is initialized.

Definition at line 106 of file MixtureModelPCAStrategy.h.

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

std::vector<double> te::rp::MixtureModelPCAStrategy::m_max
protected

Maximum value.

Definition at line 110 of file MixtureModelPCAStrategy.h.

Referenced by execute(), and getMinMax().

std::vector<double> te::rp::MixtureModelPCAStrategy::m_maxerror
protected

Maximum error value.

Definition at line 112 of file MixtureModelPCAStrategy.h.

Referenced by execute(), and getMinMaxError().

std::vector<double> te::rp::MixtureModelPCAStrategy::m_min
protected

Transformation matrix;.

Minimun value

Definition at line 109 of file MixtureModelPCAStrategy.h.

Referenced by execute(), and getMinMax().

std::vector<double> te::rp::MixtureModelPCAStrategy::m_minerror
protected

Minimun error value.

Definition at line 111 of file MixtureModelPCAStrategy.h.

Referenced by execute(), and getMinMaxError().

MixtureModelPCAStrategy::Parameters te::rp::MixtureModelPCAStrategy::m_parameters
protected

Internal execution parameters.

Definition at line 107 of file MixtureModelPCAStrategy.h.

Referenced by initialize().

boost::numeric::ublas::matrix<double> te::rp::MixtureModelPCAStrategy::m_transfMatrix
protected

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