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/ClassifierSAMStrategy.h"
38 #endif
39 #include "../Config.h"
40 
41 // STL
42 #include <memory>
43 
44 // Qt
45 #include <QWizardPage>
46 #include <QTableWidget>
47 
48 // Forward declaration
49 namespace Ui { class ClassifierWizardPageForm; }
50 
51 namespace te
52 {
53  namespace qt
54  {
55  namespace widgets
56  {
57  class MapDisplay;
58  class ROIManagerDialog;
59 
60  /*!
61  \class ClassifierWizardPage
62 
63  \brief This class is GUI used to define the classifier parameters for the RP constast operation.
64  */
65  class TEQTWIDGETSEXPORT ClassifierWizardPage : public QWizardPage
66  {
67  Q_OBJECT
68 
70  {
75  CLASSIFIER_SAM
76  };
77 
78  public:
79 
80  ClassifierWizardPage(QWidget* parent = 0);
81 
83 
84  bool isComplete() const;
85 
86  public:
87 
88  /*!
89  \brief This method is used to set the selected layer for classifier operation
90 
91  \param layer The layer ptr
92 
93  \note This layer MUST HAVE a valid raster object.
94  */
95  void set(te::map::AbstractLayerPtr layer);
96 
97  void setList(std::list<te::map::AbstractLayerPtr>& layerList);
98 
99  te::rp::Classifier::InputParameters getInputParams();
100 
101  te::rp::Classifier::OutputParameters getOutputParams();
102 
103  te::cl::ROISet* getROISet();
104 
105  protected:
106 
107  void fillClassifierTypes();
108 
109  void listBands();
110 
112 
114 
115  public slots:
116 
117  void showROIManager(bool show);
118 
119  void onROIManagerClosed();
120 
121  void onRoiSetChanged(te::cl::ROISet* rs);
122 
123  private:
124 
125  std::auto_ptr<Ui::ClassifierWizardPageForm> m_ui;
126  std::auto_ptr<te::qt::widgets::ROIManagerDialog> m_roiMngDlg;
127 
129  };
130 
131  } // end namespace widgets
132  } // end namespace qt
133 } // end namespace te
134 
135 #endif // __TERRALIB_QT_WIDGETS_RP_INTERNAL_CLASSIFIERWIZARDPAGE_H
boost::shared_ptr< MClassesSamplesCT > MClassesSamplesCTPtr
A shared pointer to a multi classes samples container type definition.
std::auto_ptr< te::qt::widgets::ROIManagerDialog > m_roiMngDlg
Classifier output parameters.
Definition: Classifier.h:127
boost::shared_ptr< ClassesSamplesT > ClassesSamplesTPtr
A shared pointer to a multi classes samples container type definition.
A ROISet is a set of ROI&#39;s.
Definition: ROISet.h:53
std::auto_ptr< Ui::ClassifierWizardPageForm > m_ui
An abstract class for raster data strucutures.
Definition: Raster.h:71
URI C++ Library.
This class is GUI used to define the classifier parameters for the RP constast operation.
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
Classifier input parameters.
Definition: Classifier.h:74