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 #include "../../../geometry/Polygon.h"
32 #include "../../../maptools/AbstractLayer.h"
33 #include "../../../raster/Raster.h"
34 #include "../../../rp/Classifier.h"
35 #include "../../../rp/ClassifierMAPStrategy.h"
36 #include "../../../rp/ClassifierSAMStrategy.h"
37 #include "../Config.h"
38 
39 // STL
40 #include <memory>
41 
42 // Qt
43 #include <QWizardPage>
44 #include <QTableWidget>
45 
46 // Forward declaration
47 namespace Ui { class ClassifierWizardPageForm; }
48 
49 namespace te
50 {
51  namespace qt
52  {
53  namespace widgets
54  {
55  class MapDisplay;
56  class ROIManagerDialog;
57 
58  /*!
59  \class ClassifierWizardPage
60 
61  \brief This class is GUI used to define the classifier parameters for the RP constast operation.
62  */
63  class TEQTWIDGETSEXPORT ClassifierWizardPage : public QWizardPage
64  {
65  Q_OBJECT
66 
68  {
73  CLASSIFIER_SAM
74  };
75 
76  public:
77 
78  ClassifierWizardPage(QWidget* parent = 0);
79 
81 
82  bool isComplete() const;
83 
84  public:
85 
86  /*!
87  \brief This method is used to set the selected layer for classifier operation
88 
89  \param layer The layer ptr
90 
91  \note This layer MUST HAVE a valid raster object.
92  */
93  void set(te::map::AbstractLayerPtr layer);
94 
95  void setList(std::list<te::map::AbstractLayerPtr>& layerList);
96 
97  te::rp::Classifier::InputParameters getInputParams();
98 
99  te::rp::Classifier::OutputParameters getOutputParams();
100 
101  te::cl::ROISet* getROISet();
102 
103  protected:
104 
105  void fillClassifierTypes();
106 
107  void listBands();
108 
110 
112 
113  public slots:
114 
115  void showROIManager(bool show);
116 
117  void onROIManagerClosed();
118 
119  void onRoiSetChanged(te::cl::ROISet* rs);
120 
121  private:
122 
123  std::auto_ptr<Ui::ClassifierWizardPageForm> m_ui;
124  std::auto_ptr<te::qt::widgets::ROIManagerDialog> m_roiMngDlg;
125 
127  };
128 
129  } // end namespace widgets
130  } // end namespace qt
131 } // end namespace te
132 
133 #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'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