All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
MixtureModelWizardPage.h
Go to the documentation of this file.
1 /* Copyright (C) 2011-2012 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/MixtureModelWizardPage.h
22 
23  \brief This file defines a class for a MixtureModel Wizard page.
24 */
25 
26 #ifndef __TERRALIB_QT_WIDGETS_RP_INTERNAL_MIXTUREMODELWIZARDPAGE_H
27 #define __TERRALIB_QT_WIDGETS_RP_INTERNAL_MIXTUREMODELWIZARDPAGE_H
28 
29 // TerraLib
30 #include "../../../color/RGBAColor.h"
31 #include "../../../geometry/Coord2D.h"
32 #include "../../../maptools/AbstractLayer.h"
33 #include "../../../raster/Raster.h"
34 #include "../../../rp/MixtureModel.h"
35 #include "../Config.h"
36 
37 // STL
38 #include <memory>
39 
40 // Qt
41 #include <QWizardPage>
42 #include <QTableWidget>
43 
44 // Forward declaration
45 namespace Ui { class MixtureModelWizardPageForm; }
46 
47 namespace te
48 {
49  namespace se { class Mark; }
50 
51  namespace qt
52  {
53  namespace widgets
54  {
55  class RasterNavigatorDialog;
56 
57  /*!
58  \class MixtureModelWizardPage
59 
60  \brief This class is GUI used to define the mixture model parameters for the RP constast operation.
61  */
62  class TEQTWIDGETSEXPORT MixtureModelWizardPage : public QWizardPage
63  {
64  Q_OBJECT
65 
67  {
69  MIXMODEL_PCA
70  };
71 
73  {
74  std::string m_id;
75  std::string m_name;
78  std::vector<double> m_values;
79  };
80 
81  public:
82 
83  MixtureModelWizardPage(QWidget* parent = 0);
84 
86 
87  bool isComplete() const;
88 
89  public:
90 
91  /*!
92  \brief This method is used to set the selected layer for mixture model operation
93 
94  \param layer The layer ptr
95 
96  \note This layer MUST HAVE a valid raster object.
97  */
98  void set(te::map::AbstractLayerPtr layer);
99 
101 
102  te::rp::MixtureModel::InputParameters getInputParams();
103 
104  te::rp::MixtureModel::OutputParameters getOutputParams();
105 
106  public slots:
107 
108  void onMapDisplayExtentChanged();
109 
110  void onPointPicked(double x, double y);
111 
112  void onItemChanged(QTableWidgetItem* item);
113 
114  void onRemoveToolButtonClicked();
115 
116  void showNavigator(bool show);
117 
118  void onNavigatorClosed();
119 
120  protected:
121 
122  void fillMixtureModelTypes();
123 
124  void listBands();
125 
126  void drawMarks();
127 
128  void updateComponents();
129 
130  private:
131 
132  std::auto_ptr<Ui::MixtureModelWizardPageForm> m_ui;
133  std::auto_ptr<te::qt::widgets::RasterNavigatorDialog> m_navigatorDlg;
134 
135  std::map<std::string, MixModelComponent > m_components; //!< The map of selected components
136  unsigned int m_countComponents; //!< The maximum number of components inserted.
137 
141  };
142 
143  } // end namespace widgets
144  } // end namespace qt
145 } // end namespace te
146 
147 #endif // __TERRALIB_QT_WIDGETS_RP_INTERNAL_MIXTUREMODELWIZARDPAGE_H
A Mark specifies a geometric shape and applies coloring to it.
Definition: Mark.h:84
std::auto_ptr< te::qt::widgets::RasterNavigatorDialog > m_navigatorDlg
unsigned int m_countComponents
The maximum number of components inserted.
An utility struct for representing 2D coordinates.
Definition: Coord2D.h:40
This class is GUI used to define the mixture model parameters for the RP constast operation...
MixtureModel input parameters.
Definition: MixtureModel.h:69
std::map< std::string, MixModelComponent > m_components
The map of selected components.
std::auto_ptr< Ui::MixtureModelWizardPageForm > m_ui
MixtureModel output parameters.
Definition: MixtureModel.h:123
A helper class for 32-bit RGBA (Red-Green-Blue-Alpha channel) color.
Definition: RGBAColor.h:57
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:66
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr