All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ClassifierWizardPage.cpp
Go to the documentation of this file.
1 /* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of the TerraLib - a Framework for building GIS enabled applications.
4 
5  TerraLib is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  TerraLib is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with TerraLib. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@terralib.org>.
18  */
19 
20 /*!
21  \file terralib/qt/widgets/rp/ClassifierWizardPage.cpp
22 
23  \brief This file defines a class for a Classifier Wizard page.
24 */
25 
26 // TerraLib
27 #include "../../../dataaccess/dataset/DataSet.h"
28 #include "../../../dataaccess/dataset/DataSetType.h"
29 #include "../../../dataaccess/utils/Utils.h"
30 #include "../../../geometry/GeometryProperty.h"
31 #include "../../../geometry/MultiPolygon.h"
32 #include "../../../raster/Raster.h"
33 #include "../../../raster/PositionIterator.h"
34 #include "../../../rp/ClassifierEMStrategy.h"
35 #include "../../../rp/ClassifierKMeansStrategy.h"
36 #include "../../../rp/ClassifierISOSegStrategy.h"
37 #include "../classification/ROIManagerDialog.h"
38 #include "../classification/ROIManagerWidget.h"
39 #include "ClassifierWizardPage.h"
40 #include "ui_ClassifierWizardPageForm.h"
41 
42 // Qt
43 #include <QGridLayout>
44 #include <QDoubleValidator>
45 #include <QIntValidator>
46 #include <QMessageBox>
47 
48 // stl
49 #include <memory>
50 
52 
54  : QWizardPage(parent),
55  m_ui(new Ui::ClassifierWizardPageForm),
56  m_layer(0)
57 {
58 // setup controls
59  m_ui->setupUi(this);
60 
62 
63  QIntValidator* intMaxPoints = new QIntValidator(this);
64  intMaxPoints->setBottom(0);
65  m_ui->m_kMeansMaxPointsLineEdit->setValidator(intMaxPoints);
66 
67  QDoubleValidator* doubleStopCriteria = new QDoubleValidator(this);
68  doubleStopCriteria->setBottom(0.0);
69  m_ui->m_kMeansStopCriteriaLineEdit->setValidator(doubleStopCriteria);
70 
71 //configure page
72  this->setTitle(tr("Classifier"));
73  this->setSubTitle(tr("Select the type of classifier and set their specific parameters."));
74 
75  //configure roi manager
76  m_roiMngDlg.reset(new te::qt::widgets::ROIManagerDialog(this, Qt::Tool));
77 
78  //connects
79  connect(m_ui->m_acquireToolButton, SIGNAL(toggled(bool)), this, SLOT(showROIManager(bool)));
80  connect(m_ui->m_samAcquireToolButton, SIGNAL(toggled(bool)), this, SLOT(showROIManager(bool)));
81  connect(m_roiMngDlg.get(), SIGNAL(roiManagerClosed()), this, SLOT(onROIManagerClosed()));
82  connect(m_ui->m_classifierTypeComboBox, SIGNAL(activated(int)), this, SIGNAL(completeChanged()));
83  connect(m_ui->m_inputRasterBandsListWidget, SIGNAL(itemSelectionChanged()), this, SIGNAL(completeChanged()));
84 
85  connect(m_roiMngDlg->getWidget(), SIGNAL(roiSetChanged(te::cl::ROISet*)), this, SLOT(onRoiSetChanged(te::cl::ROISet*)));
86 
87  m_ui->m_acquireToolButton->setIcon(QIcon::fromTheme("wand"));
88  m_ui->m_samAcquireToolButton->setIcon(QIcon::fromTheme("wand"));
89 }
90 
92 {
93 
94 }
95 
97 {
98  int idx = m_ui->m_classifierTypeComboBox->currentIndex();
99  int type = m_ui->m_classifierTypeComboBox->itemData(idx).toInt();
100 
101  if(type == CLASSIFIER_ISOSEG)
102  {
103  if(m_ui->m_isosegLayersComboBox->currentText().isEmpty())
104  return false;
105  }
106  else if(type == CLASSIFIER_MAP)
107  {
108  if(m_ui->m_mapTableWidget->rowCount() == 0)
109  return false;
110  }
111  else if(type == CLASSIFIER_SAM)
112  {
113  if(m_ui->m_samTableWidget->rowCount() == 0)
114  return false;
115  }
116 
117  if(m_ui->m_inputRasterBandsListWidget->selectedItems().empty())
118  return false;
119 
120  return true;
121 }
122 
124 {
125  m_layer = layer;
126 
127  m_roiMngDlg->set(m_layer);
128 
129  listBands();
130 }
131 
132 void te::qt::widgets::ClassifierWizardPage::setList(std::list<te::map::AbstractLayerPtr>& layerList)
133 {
134  m_roiMngDlg->setList(layerList);
135 
136  m_ui->m_isosegLayersComboBox->clear();
137 
138  std::list<te::map::AbstractLayerPtr>::iterator it = layerList.begin();
139 
140  while(it != layerList.end())
141  {
143 
144  std::auto_ptr<te::da::DataSetType> dsType = l->getSchema();
145 
146  if(dsType->hasGeom())
147  m_ui->m_isosegLayersComboBox->addItem(it->get()->getTitle().c_str(), QVariant::fromValue(l));
148 
149  ++it;
150  }
151 }
152 
154 {
155  int idx = m_ui->m_classifierTypeComboBox->currentIndex();
156  int type = m_ui->m_classifierTypeComboBox->itemData(idx).toInt();
157 
158  te::rp::Classifier::InputParameters algoInputParams;
159 
160  if(type == CLASSIFIER_ISOSEG)
161  {
162  algoInputParams.m_strategyName = "isoseg";
163 
165  classifierparameters.m_acceptanceThreshold = m_ui->m_acceptanceThresholdComboBox->currentText().toDouble();
166 
167  //get layer
168  int idxLayer = m_ui->m_isosegLayersComboBox->currentIndex();
169  QVariant varLayer = m_ui->m_isosegLayersComboBox->itemData(idxLayer, Qt::UserRole);
170  te::map::AbstractLayerPtr layer = varLayer.value<te::map::AbstractLayerPtr>();
171 
172  //get polygons
173  std::auto_ptr<te::da::DataSetType> dsType = layer->getSchema();
175 
176  if(gp && gp->getGeometryType() == te::gm::MultiPolygonType)
177  {
178  std::auto_ptr<te::da::DataSet> ds = layer->getData();
179  ds->moveBeforeFirst();
180 
181  while(ds->moveNext())
182  {
183  te::gm::MultiPolygon* mp = (te::gm::MultiPolygon*)ds->getGeometry(gp->getName()).release();
184  te::gm::Polygon* poly = (te::gm::Polygon*)mp->getGeometries()[0];
185 
186  algoInputParams.m_inputPolygons.push_back(poly);
187  }
188  }
189 
190  algoInputParams.setClassifierStrategyParams(classifierparameters);
191  }
192  else if(type == CLASSIFIER_KMEANS)
193  {
194  algoInputParams.m_strategyName = "kmeans";
195 
197  classifierparameters.m_K = m_ui->m_kMeansClusterSpinBox->value();
198  classifierparameters.m_maxIterations = m_ui->m_kMeansIterationsSpinBox->value();
199  classifierparameters.m_maxInputPoints = m_ui->m_kMeansMaxPointsLineEdit->text().toInt();
200  classifierparameters.m_epsilon = m_ui->m_kMeansStopCriteriaLineEdit->text().toDouble();
201 
202  algoInputParams.setClassifierStrategyParams(classifierparameters);
203  }
204  else if(type == CLASSIFIER_MAP)
205  {
206  algoInputParams.m_strategyName = "map";
207 
208  std::auto_ptr<te::da::DataSet> ds = m_layer->getData();
209  std::size_t rpos = te::da::GetFirstPropertyPos(ds.get(), te::dt::RASTER_TYPE);
210  std::auto_ptr<te::rst::Raster> inputRst = ds->getRaster(rpos);
211 
212  te::rp::ClassifierMAPStrategy::Parameters classifierparameters;
213  classifierparameters.m_trainSamplesPtr = getMAPSamples(m_roiMngDlg->getWidget()->getROISet(), inputRst.get());
214 
215  algoInputParams.setClassifierStrategyParams(classifierparameters);
216  }
217  else if(type == CLASSIFIER_EM)
218  {
219  algoInputParams.m_strategyName = "em";
220 
221  te::rp::ClassifierEMStrategy::Parameters classifierparameters;
222  classifierparameters.m_numberOfClusters = m_ui->m_emClusterSpinBox->value();
223  classifierparameters.m_maxIterations = m_ui->m_emIterationsSpinBox->value();
224  classifierparameters.m_maxInputPoints = m_ui->m_emMaxPointsLineEdit->text().toInt();
225  classifierparameters.m_epsilon = m_ui->m_emStopCriteriaLineEdit->text().toDouble();
226  classifierparameters.m_clustersMeans = std::vector<std::vector<double> >();
227 
228  algoInputParams.setClassifierStrategyParams(classifierparameters);
229  }
230  else if(type == CLASSIFIER_SAM)
231  {
232  algoInputParams.m_strategyName = "sam";
233 
234  std::auto_ptr<te::da::DataSet> ds = m_layer->getData();
235  std::size_t rpos = te::da::GetFirstPropertyPos(ds.get(), te::dt::RASTER_TYPE);
236  std::auto_ptr<te::rst::Raster> inputRst = ds->getRaster(rpos);
237 
238  te::rp::ClassifierSAMStrategy::Parameters classifierparameters;
239  classifierparameters.m_trainSamplesPtr = getSAMSamples(m_roiMngDlg->getWidget()->getROISet(), inputRst.get());
240 
241  //get angle values
242  for(int i = 0; i < m_ui->m_samTableWidget->rowCount(); ++i)
243  {
244  double val = ((QDoubleSpinBox*)m_ui->m_samTableWidget->cellWidget(i, 3))->value();
245 
246  classifierparameters.m_maxAngularDistances.push_back(val);
247  }
248 
249  algoInputParams.setClassifierStrategyParams(classifierparameters);
250  }
251 
252  //get bands
253  QList<QListWidgetItem*> selectedBands = m_ui->m_inputRasterBandsListWidget->selectedItems();
254 
255  QList<QListWidgetItem*>::const_iterator it = selectedBands.begin();
256  QList<QListWidgetItem*>::const_iterator itend = selectedBands.end();
257 
258  while(it != itend)
259  {
260  algoInputParams.m_inputRasterBands.push_back((*it)->text().toUInt());
261 
262  ++it;
263  }
264 
265  return algoInputParams;
266 }
267 
269 {
270  te::rp::Classifier::OutputParameters algoOutputParams;
271 
272  return algoOutputParams;
273 }
274 
276 {
277  return m_roiMngDlg->getWidget()->getROISet();
278 }
279 
281 {
282  m_ui->m_classifierTypeComboBox->clear();
283 
284  m_ui->m_classifierTypeComboBox->addItem(tr("ISOSeg"), CLASSIFIER_ISOSEG);
285  m_ui->m_classifierTypeComboBox->addItem(tr("KMeans"), CLASSIFIER_KMEANS);
286  m_ui->m_classifierTypeComboBox->addItem(tr("MAP - Maximum a Posteriori Probability"), CLASSIFIER_MAP);
287  m_ui->m_classifierTypeComboBox->addItem(tr("EM - Expectation Maximization"), CLASSIFIER_EM);
288  m_ui->m_classifierTypeComboBox->addItem(tr("SAM - Spectral Angle Mapper"), CLASSIFIER_SAM);
289 }
290 
292 {
293  m_ui->m_inputRasterBandsListWidget->clear();
294 
295  assert(m_layer.get());
296 
297  //get input raster
298  std::auto_ptr<te::da::DataSet> ds = m_layer->getData();
299 
300  if(ds.get())
301  {
302  std::size_t rpos = te::da::GetFirstPropertyPos(ds.get(), te::dt::RASTER_TYPE);
303 
304  std::auto_ptr<te::rst::Raster> inputRst = ds->getRaster(rpos);
305 
306  if(inputRst.get())
307  {
308  for(unsigned int i = 0; i < inputRst->getNumberOfBands(); ++i)
309  {
310  m_ui->m_inputRasterBandsListWidget->addItem(QString::number(i));
311  }
312  }
313  }
314 }
315 
317 {
319 
320  std::map<std::string, te::cl::ROI*> roiSetMap = rs->getROISet();
321  std::map<std::string, te::cl::ROI*>::iterator it = roiSetMap.begin();
322 
323  int count = 1;
324 
325  //iterate roi set
326  while(it != roiSetMap.end())
327  {
328  std::map<std::string, te::gm::Polygon*> roiMap = it->second->getPolygons();
329  std::map<std::string, te::gm::Polygon*>::iterator itPoly = roiMap.begin();
330 
332 
333  //iterate roi
334  while(itPoly != roiMap.end())
335  {
336  te::gm::Polygon* p = itPoly->second;
337 
340 
341  //iterate polygon
342  while (itRaster != itRasterEnd)
343  {
345 
346  raster->getValues(itRaster.getColumn(), itRaster.getRow(), cst);
347 
348  csct.push_back(cst);
349 
350  ++itRaster;
351  }
352 
353  ++itPoly;
354  }
355 
356  mcsctPtr->insert(te::rp::ClassifierMAPStrategy::Parameters::MClassesSamplesCT::value_type(count, csct));
357 
358  ++count;
359 
360  ++it;
361  }
362 
363  return mcsctPtr;
364 }
365 
367 {
369 
370  std::map<std::string, te::cl::ROI*> roiSetMap = rs->getROISet();
371  std::map<std::string, te::cl::ROI*>::iterator it = roiSetMap.begin();
372 
373  int count = 1;
374 
375  //iterate roi set
376  while(it != roiSetMap.end())
377  {
378  std::map<std::string, te::gm::Polygon*> roiMap = it->second->getPolygons();
379  std::map<std::string, te::gm::Polygon*>::iterator itPoly = roiMap.begin();
380 
382 
383  //iterate roi
384  while(itPoly != roiMap.end())
385  {
386  te::gm::Polygon* p = itPoly->second;
387 
390 
391  //iterate polygon
392  while (itRaster != itRasterEnd)
393  {
395 
396  raster->getValues(itRaster.getColumn(), itRaster.getRow(), s);
397 
398  st.push_back(s);
399 
400  ++itRaster;
401  }
402 
403  ++itPoly;
404  }
405 
406  cstPtr->insert(te::rp::ClassifierSAMStrategy::ClassesSamplesT::value_type(count, st));
407 
408  ++count;
409 
410  ++it;
411  }
412 
413  return cstPtr;
414 }
415 
417 {
418  if(show)
419  m_roiMngDlg->show();
420  else
421  m_roiMngDlg->hide();
422 }
423 
425 {
426  m_ui->m_acquireToolButton->setChecked(false);
427  m_ui->m_samAcquireToolButton->setChecked(false);
428 }
429 
431 {
432  int idx = m_ui->m_classifierTypeComboBox->currentIndex();
433  int type = m_ui->m_classifierTypeComboBox->itemData(idx).toInt();
434 
435  if(type == CLASSIFIER_MAP)
436  {
437  m_ui->m_mapTableWidget->setRowCount(0);
438 
439  if(!rs)
440  return;
441 
442  std::map<std::string, te::cl::ROI*> roiSetMap = rs->getROISet();
443  std::map<std::string, te::cl::ROI*>::iterator it = roiSetMap.begin();
444 
445  //iterate roi set
446  while(it != roiSetMap.end())
447  {
448  //get roi info
449  te::cl::ROI* r = it->second;
450 
451  std::string label = r->getLabel();
452 
453  std::size_t samples = r->getPolygons().size();
454  QString samplesNum;
455  samplesNum.setNum(samples);
456 
457  QColor color(r->getColor().c_str());
458 
459  //add table entry
460  int newrow = m_ui->m_mapTableWidget->rowCount();
461  m_ui->m_mapTableWidget->insertRow(newrow);
462 
463  QPixmap pix(16,16);
464  pix.fill(color);
465  QIcon icon(pix);
466 
467  QTableWidgetItem* itemColor = new QTableWidgetItem(icon, "");
468  itemColor->setFlags(Qt::ItemIsEnabled);
469  m_ui->m_mapTableWidget->setItem(newrow, 0, itemColor);
470 
471  QTableWidgetItem* itemLabel = new QTableWidgetItem(QString::fromStdString(label));
472  itemLabel->setFlags(Qt::ItemIsEnabled);
473  m_ui->m_mapTableWidget->setItem(newrow, 1, itemLabel);
474 
475  QTableWidgetItem* itemSamples = new QTableWidgetItem(samplesNum);
476  itemSamples->setFlags(Qt::ItemIsEnabled);
477  m_ui->m_mapTableWidget->setItem(newrow, 2, itemSamples);
478 
479  ++it;
480  }
481 
482  m_ui->m_mapTableWidget->resizeColumnsToContents();
483  }
484  else if(type == CLASSIFIER_SAM)
485  {
486  m_ui->m_samTableWidget->setRowCount(0);
487 
488  if(!rs)
489  return;
490 
491  std::map<std::string, te::cl::ROI*> roiSetMap = rs->getROISet();
492  std::map<std::string, te::cl::ROI*>::iterator it = roiSetMap.begin();
493 
494  //iterate roi set
495  while(it != roiSetMap.end())
496  {
497  //get roi info
498  te::cl::ROI* r = it->second;
499 
500  std::string label = r->getLabel();
501 
502  std::size_t samples = r->getPolygons().size();
503  QString samplesNum;
504  samplesNum.setNum(samples);
505 
506  QColor color(r->getColor().c_str());
507 
508  //add table entry
509  int newrow = m_ui->m_mapTableWidget->rowCount();
510  m_ui->m_samTableWidget->insertRow(newrow);
511 
512  QPixmap pix(16,16);
513  pix.fill(color);
514  QIcon icon(pix);
515 
516  QTableWidgetItem* itemColor = new QTableWidgetItem(icon, "");
517  itemColor->setFlags(Qt::ItemIsEnabled);
518  m_ui->m_samTableWidget->setItem(newrow, 0, itemColor);
519 
520  QTableWidgetItem* itemLabel = new QTableWidgetItem(QString::fromStdString(label));
521  itemLabel->setFlags(Qt::ItemIsEnabled);
522  m_ui->m_samTableWidget->setItem(newrow, 1, itemLabel);
523 
524  QTableWidgetItem* itemSamples = new QTableWidgetItem(samplesNum);
525  itemSamples->setFlags(Qt::ItemIsEnabled);
526  m_ui->m_samTableWidget->setItem(newrow, 2, itemSamples);
527 
528  QDoubleSpinBox* dsb = new QDoubleSpinBox(m_ui->m_samTableWidget);
529  dsb->setMinimum(0.0);
530  dsb->setMaximum(1.0);
531  dsb->setSingleStep(0.1);
532  dsb->setValue(0.1);
533 
534  m_ui->m_samTableWidget->setCellWidget(newrow, 3, dsb);
535 
536  ++it;
537  }
538 
539  m_ui->m_samTableWidget->resizeColumnsToContents();
540  }
541 
542  emit completeChanged();
543 }
544 
std::vector< te::gm::Polygon * > m_inputPolygons
The polygons to be classified when using object-based image analysis (OBIA).
Definition: Classifier.h:115
MultiPolygon is a MultiSurface whose elements are Polygons.
Definition: MultiPolygon.h:50
std::map< ClassIDT, SamplesT > ClassesSamplesT
Classes samples container type definition.
Geometric property.
MClassesSamplesCTPtr m_trainSamplesPtr
A shared pointer to a always-valid structure where trainning samples are stored.
te::rp::Classifier::InputParameters getInputParams()
boost::shared_ptr< MClassesSamplesCT > MClassesSamplesCTPtr
A shared pointer to a multi classes samples container type definition.
unsigned int m_numberOfClusters
The number of clusters (classes) to estimate in the image.
std::string m_strategyName
The classifier strategy name see each te::rp::ClassifierStrategyFactory inherited classes documentati...
Definition: Classifier.h:116
void set(te::map::AbstractLayerPtr layer)
This method is used to set the selected layer for classifier operation.
void setClassifierStrategyParams(const StrategyParameters &p)
Set specific classifier strategy parameters.
Definition: Classifier.cpp:60
std::auto_ptr< te::qt::widgets::ROIManagerDialog > m_roiMngDlg
virtual void getValues(unsigned int c, unsigned int r, std::vector< double > &values) const
Returns the imaginary attribute values in all complex bands of a cell.
Definition: Raster.cpp:258
This class implements the strategy to iterate with spatial restriction, the iteration occurs inside a...
unsigned int getRow() const
Returns the current row in iterator.
unsigned int m_maxInputPoints
The maximum number of points used to estimate the clusters (default = 1000).
Classifier output parameters.
Definition: Classifier.h:127
boost::shared_ptr< ClassesSamplesT > ClassesSamplesTPtr
A shared pointer to a multi classes samples container type definition.
ClassesSamplesTPtr m_trainSamplesPtr
A shared pointer to a always-valid structure where trainning samples are stored.
A ROISet is a set of ROI's.
Definition: ROISet.h:53
te::rp::ClassifierMAPStrategy::Parameters::MClassesSamplesCTPtr getMAPSamples(te::cl::ROISet *rs, te::rst::Raster *raster)
std::vector< double > SampleT
Class sample type definition.
te::rp::ClassifierSAMStrategy::ClassesSamplesTPtr getSAMSamples(te::cl::ROISet *rs, te::rst::Raster *raster)
std::auto_ptr< Ui::ClassifierWizardPageForm > m_ui
std::map< ClassIDT, ClassSamplesContainerT > MClassesSamplesCT
Multi-classes samples container type definition.
unsigned int m_K
The number of clusters (means) to detect in image.
std::vector< double > ClassSampleT
Class sample type definition.
static PolygonIterator end(const te::rst::Raster *r, const te::gm::Polygon *p)
Returns an iterator referring to after the end of the iterator.
This file defines a class for a Classifier Wizard page.
An abstract class for raster data strucutures.
Definition: Raster.h:71
This class is a dialog for the ROI Manager widget.
GeomType getGeometryType() const
It returns the geometry subtype allowed for the property.
std::vector< unsigned int > m_inputRasterBands
Bands to be processed from the input raster.
Definition: Classifier.h:114
unsigned int m_maxInputPoints
The maximum number of points used to estimate the clusters (default = 1000).
A region of interest (often abbreviated ROI), is a selected subset of samples within a dataset identi...
Definition: ROI.h:60
Q_DECLARE_METATYPE(te::map::AbstractLayerPtr)
double m_epsilon
The stop criteria. When the clusters change in a value smaller then epsilon, the convergence is achie...
Polygon is a subclass of CurvePolygon whose rings are defined by linear rings.
Definition: Polygon.h:50
unsigned int m_maxIterations
The maximum of iterations (E/M steps) to perform if convergence is not achieved.
static PolygonIterator begin(const te::rst::Raster *r, const te::gm::Polygon *p)
Returns an iterator referring to the first value of the band.
std::vector< SampleT > SamplesT
Class samples container type definition.
const std::vector< Geometry * > & getGeometries() const
It returns a reference to the internal list of geometries.
std::string getLabel()
Get the ROI label.
Definition: ROI.cpp:47
unsigned int m_maxIterations
The maximum of iterations to perform if convergence is not achieved.
double m_acceptanceThreshold
The acceptance threshold (the closer to 100%, few clusters are created).
TEDATAACCESSEXPORT std::size_t GetFirstPropertyPos(const te::da::DataSet *dataset, int datatype)
Definition: Utils.cpp:481
unsigned int getColumn() const
Returns the current column in iterator.
TEDATAACCESSEXPORT te::gm::GeometryProperty * GetFirstGeomProperty(const DataSetType *dt)
Definition: Utils.cpp:557
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
std::vector< ClassSampleT > ClassSamplesContainerT
Class samples container type definition.
void setList(std::list< te::map::AbstractLayerPtr > &layerList)
std::vector< double > m_maxAngularDistances
This is a vector of maximum acceptable angles (radians) between one pixel spectra and the reference s...
std::vector< std::vector< double > > m_clustersMeans
The previously estimated means of the clusters (optional).
std::map< std::string, te::cl::ROI * > & getROISet()
Get the roi set map.
Definition: ROISet.cpp:79
te::rp::Classifier::OutputParameters getOutputParams()
Classifier input parameters.
Definition: Classifier.h:74
double m_epsilon
The stop criteria. When the clusters change in a value smaller then epsilon, the convergence is achie...
std::map< std::string, te::gm::Polygon * > & getPolygons()
Get all polygons belongs to this roi.
Definition: ROI.cpp:62
const std::string & getName() const
It returns the property name.
Definition: Property.h:127
std::string getColor()
Get the ROI color defined by a hexadecimal color name.
Definition: ROI.cpp:57