Loading...
Searching...
No Matches
ClassifierWizardPage.h
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.h
22
23 \brief This file defines a class for a Classifier Wizard page.
24*/
25
26#ifndef __TERRALIB_QT_WIDGETS_RP_INTERNAL_CLASSIFIERWIZARDPAGE_H
27#define __TERRALIB_QT_WIDGETS_RP_INTERNAL_CLASSIFIERWIZARDPAGE_H
28
29// TerraLib
30#include "../../../classification/ROISet.h"
31#ifndef Q_MOC_RUN
32#include "../../../geometry/Polygon.h"
33#include "../../../maptools/AbstractLayer.h"
34#include "../../../raster/Raster.h"
35#include "../../../rp/Classifier.h"
36#include "../../../rp/ClassifierMAPStrategy.h"
37#include "../../../rp/ClassifierEDStrategy.h"
38#include "../../../rp/ClassifierSAMStrategy.h"
39#include "../../../qt/widgets/canvas/MapDisplay.h"
40#endif
41#include "../Config.h"
42
43// STL
44#include <memory>
45
46// Qt
47#include <QWizardPage>
48#include <QTableWidget>
49#include <QActionGroup>
50
51// Forward declaration
52namespace Ui { class ClassifierWizardPageForm; }
53
54namespace te
55{
56 namespace qt
57 {
58 namespace widgets
59 {
60 class MapDisplay;
61 class ROIManagerDialog;
62
63 /*!
64 \class ClassifierWizardPage
65
66 \brief This class is GUI used to define the classifier parameters for the RP constast operation.
67 */
68 class TEQTWIDGETSEXPORT ClassifierWizardPage : public QWizardPage
69 {
70 Q_OBJECT
71
73 {
81 CLASSIFIER_ID
82 };
83
84 public:
85
86 ClassifierWizardPage(QWidget* parent = 0);
87
89
90 bool isComplete() const;
91
92 public:
93
94 /*!
95 \brief This method is used to set the selected layer for classifier operation
96
97 \param layer The layer ptr
98
99 \note This layer MUST HAVE a valid raster object.
100 */
102
104
105 void setActionGroup(QActionGroup* actionGroup);
106
107 void setList(std::list<te::map::AbstractLayerPtr>& layerList);
108
110
112
114
116
118
120
121 protected:
122
124
125 void listBands();
126
128
130
132
134
135 public slots:
136
137 void showROIManager(bool show);
138
140
141 void onChangeClassifier(int index);
142
143 private:
144
146
148
150
152
154
155 private:
156
157 std::unique_ptr<Ui::ClassifierWizardPageForm> m_ui;
158 std::unique_ptr<te::qt::widgets::ROIManagerDialog> m_roiMngDlg;
159
161
163
165 };
166
167 } // end namespace widgets
168 } // end namespace qt
169} // end namespace te
170
171#endif // __TERRALIB_QT_WIDGETS_RP_INTERNAL_CLASSIFIERWIZARDPAGE_H
A ROISet is a set of ROI's.
Definition: ROISet.h:54
A region of interest (often abbreviated ROI), is a selected subset of samples within a dataset identi...
Definition: ROI.h:61
This class is GUI used to define the classifier parameters for the RP constast operation.
void onROIManagerClosed(te::cl::ROISet *rs)
std::unique_ptr< Ui::ClassifierWizardPageForm > m_ui
void setList(std::list< te::map::AbstractLayerPtr > &layerList)
void set(te::map::AbstractLayerPtr layer)
This method is used to set the selected layer for classifier operation.
te::rp::Classifier::OutputParameters getOutputParams()
te::rp::ClassifierMAPStrategy::Parameters::MClassesSamplesCTPtr getMAPSamples(te::cl::ROISet *rs, te::rst::Raster *raster)
void setActionGroup(QActionGroup *actionGroup)
te::rp::ClassifierSAMStrategy::ClassesSamplesTPtr getSAMSamples(te::cl::ROISet *rs, te::rst::Raster *raster)
std::unique_ptr< te::qt::widgets::ROIManagerDialog > m_roiMngDlg
te::rp::ClassifierMAPStrategy::Parameters::MClassesSamplesCTPtr getMaxLikelihoodSamples(te::cl::ROISet *rs, te::rst::Raster *raster)
void setMapDisplay(te::qt::widgets::MapDisplay *mapDisplay)
te::rp::ClassifierEDStrategy::Parameters::MClassesSamplesCTPtr getEDSamples(te::cl::ROISet *rs, te::rst::Raster *raster)
void fillSAMTable(te::cl::ROI *roi)
void fillMAPTable(te::cl::ROI *roi)
void fillMaxLikelihoodTable(te::cl::ROI *roi)
te::rp::Classifier::InputParameters getInputParams()
void fillEDTable(te::cl::ROI *roi)
A widget to control the display of a set of layers.
Definition: MapDisplay.h:72
boost::shared_ptr< MClassesSamplesCT > MClassesSamplesCTPtr
A shared pointer to a multi classes samples container type definition.
boost::shared_ptr< MClassesSamplesCT > MClassesSamplesCTPtr
A shared pointer to a multi classes samples container type definition.
boost::shared_ptr< ClassesSamplesT > ClassesSamplesTPtr
A shared pointer to a multi classes samples container type definition.
Classifier input parameters.
Definition: Classifier.h:79
Classifier output parameters.
Definition: Classifier.h:142
An abstract class for raster data strucutures.
Definition: Raster.h:72
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
TerraLib.
#define slots
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63