25#ifndef __TERRALIB_RP_INTERNAL_CLASSIFIERISOSEGSTRATEGY_H
26#define __TERRALIB_RP_INTERNAL_CLASSIFIERISOSEGSTRATEGY_H
38#include <condition_variable>
41#include <boost/numeric/ublas/matrix.hpp>
135 Pattern(
int i,
double a, std::vector<double> mv, boost::numeric::ublas::matrix<double> cm);
236 double getThreshold(
const double acceptanceThreshold,
const unsigned nBands)
const;
249 static void printMatrix(
const boost::numeric::ublas::matrix<double>& matrix);
Raster classifier strategy factory base class.
Raster classifier strategy base class.
An access synchronizer to be used in SynchronizedRaster raster instances.
AbstractParameters()
Constructor.
~ClassifierISOSegStrategyFactory()
te::rp::ClassifierStrategy * build()
Concrete factories (derived from this one) must implement this method in order to create objects.
ClassifierISOSegStrategyFactory()
The parameters passed to the fill regions thread entry.
std::multimap< double, Pattern > * m_outputRegionsPtr
Pointer to the output regions container.
std::vector< unsigned int > const * m_inputRasterBandsPtr
Pointer to the input raster bands do be processed.
std::mutex * m_globalMutexPtr
Pointer to the mutex.
te::rst::RasterSynchronizer * m_inputRasterSyncPtr
Pointer to the input raster sync.
unsigned int * m_runningThreadsCounterPtr
Pointer to variable pointing the current number of running threads.
std::condition_variable * m_condVarPtr
Pointer to the condition variable.
std::size_t * m_nextInputPolIdx2ProcessPtr
Pointer to variable pointing the next polygon index to process.
std::vector< te::gm::Polygon * > const * m_inputPolygonsPtr
FillRegionsThreadEntryParams()
std::mutex * m_condVarMutexPtr
Pointer to the condition variable mutex.
bool m_enableProgress
Pointer to variable pointing the variable to enable or disable the thread internal progress interface...
~FillRegionsThreadEntryParams()
bool * m_continueProcessingFlagPtr
Pointer to variable pointing the variable to allow the process to continue.
AbstractParameters * clone() const
Create a clone copy of this instance.
bool serialize(AlgorithmParametersSerializer &serializer) const
Returns a parameter serialization object.
void reset()
Clear all internal allocated resources and reset the parameters instance to its initial state.
@ MahalanobisDistanceType
Mahalanobis Distance Type.
@ BhattacharyyaDistanceType
Bhattacharyya Distance Type.
@ InvalidDistanceType
Invalid distance type.
DistanceType m_distanceType
Distance type.
const Parameters & operator=(const Parameters ¶ms)
double m_acceptanceThreshold
The acceptance threshold (the closer to 100%, few clusters are created).
double getMahalanobisDistance(Pattern const *const p) const
Returns the Mahalanobis distance between two patterns.
boost::numeric::ublas::matrix< double > m_covarianceMatrix
The covariance matrix between bands.
int m_id
The id of the region of the pattern.
std::vector< double > m_meanVector
The vector of mean values, 1 value per band;.
double getBhattacharyyaDistance(Pattern const *const p) const
Returns the Bhattacharyya distance between two patterns.
void reset()
Reset to initial state.
double m_covarianceMatrixDet
The covariance matrix determinant.
double m_getBhattacharyyaDistance_covsMegeDet
boost::numeric::ublas::matrix< double > m_getBhattacharyyaDistance_meansDif
boost::numeric::ublas::matrix< double > m_covarianceInversion
The inversion of covariance matrix between bands.
Pattern * m_myCluster
The associated cluster of this pattern (optional).
Pattern(int i, double a, std::vector< double > mv, boost::numeric::ublas::matrix< double > cm)
Constructor.
double m_area
The area of all regions inside a pattern.
boost::numeric::ublas::matrix< double > m_getBhattacharyyaDistance_covsMege
double m_getBhattacharyyaDistance_distanceValue
Pattern & operator=(const Pattern &rhs)
boost::numeric::ublas::matrix< double > m_getBhattacharyyaDistance_covsMegeInv
Pattern(const Pattern &rhs)
Copy constructor.
bool operator==(const Pattern &rhs) const
Return true if two clusters are equal.
unsigned int m_getBhattacharyyaDistance_bandIdx
bool operator<(const Pattern &rhs) const
unsigned int m_getBhattacharyyaDistance_nBands
boost::numeric::ublas::matrix< double > m_getBhattacharyyaDistance_distanceTerm1
bool initialize(ClassifierStrategyParameters const *const strategyParams)
Initialize the classification strategy.
bool m_isInitialized
True if this instance is initialized.
ClassifierISOSegStrategy()
bool execute()
Executes the classification strategy.
static void fillRegionsThreadEntry(FillRegionsThreadEntryParams *paramsPtr)
Fill regions thread entry.
~ClassifierISOSegStrategy()
double getThreshold(const double acceptanceThreshold, const unsigned nBands) const
ClassifierISOSegStrategy::Parameters m_parameters
Internal execution parameters.
static void printMatrix(const boost::numeric::ublas::matrix< double > &matrix)
Print a matrix to std::out.
ClassifierStrategyFactory(const std::string &factoryKey)
Classifier Strategy Parameters.
ClassifierStrategyParameters()
Raster classifier strategy base class.
ClassifierStrategy()
Default constructor.
An access synchronizer to be used in SynchronizedRaster raster instances.
Namespace for Raster Processing module of TerraLib.
Configuration flags for the Raster Processing module of TerraLib.
#define TERPEXPORT
You can use this macro in order to export/import classes and functions from this module.