FusionWizardPage.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/FusionWizardPage.h
22 
23  \brief This file defines a class for a Fusion Wizard page.
24 */
25 
26 #ifndef __TERRALIB_QT_WIDGETS_RP_INTERNAL_FUSIONWIZARDPAGE_H
27 #define __TERRALIB_QT_WIDGETS_RP_INTERNAL_FUSIONWIZARDPAGE_H
28 
29 // TerraLib
30 #include "../../../maptools/AbstractLayer.h"
31 #include "../../../rp/IHSFusion.h"
32 #include "../../../rp/PCAFusion.h"
33 #include "../../../rp/WisperFusion.h"
34 #include "../../../qt/widgets/charts/ChartDisplay.h"
35 #include "../../../qt/widgets/charts/Scatter.h"
36 #include "../../../qt/widgets/charts/ScatterChart.h"
37 #include "../Config.h"
38 
39 // STL
40 #include <memory>
41 
42 // Qt
43 #include <QComboBox>
44 #include <QToolButton>
45 #include <QWizardPage>
46 
47 
48 // Forward declaration
49 namespace Ui { class FusionWizardPageForm; }
50 
51 namespace te
52 {
53  namespace qt
54  {
55  namespace widgets
56  {
58  {
62  };
63 
64  /*!
65  \class FusionWizardPage
66 
67  \brief This class is GUI used to define the fusion parameters for the RP fusion operation.
68  */
69  class TEQTWIDGETSEXPORT FusionWizardPage : public QWizardPage
70  {
71  Q_OBJECT
72 
73  public:
74 
75  FusionWizardPage(QWidget* parent = 0);
76 
78 
79  bool isComplete() const;
80 
81  public:
82 
83  /*!
84  \brief This method is used to set the selected layer for classifier operation
85 
86  \param layer The layer ptr
87 
88  \note This layer MUST HAVE a valid raster object.
89  */
90  void setLower(te::map::AbstractLayerPtr layer);
91 
92  /*!
93  \brief This method is used to set the selected layer for classifier operation
94 
95  \param layer The layer ptr
96 
97  \note This layer MUST HAVE a valid raster object.
98  */
99  void setHigher(te::map::AbstractLayerPtr layer);
100 
101  bool isIHSFusion();
102 
103  bool isPCAFusion();
104 
105  bool isWisperFusion();
106 
107  bool cropRasters();
108 
109  te::rp::IHSFusion::InputParameters getInputIHSParams();
110 
111  te::rp::IHSFusion::OutputParameters getOutputIHSParams();
112 
113  te::rp::PCAFusion::InputParameters getInputPCAParams();
114 
115  te::rp::PCAFusion::OutputParameters getOutputPCAParams();
116 
117  te::rp::WisperFusion::InputParameters getInputWisperParams();
118 
119  te::rp::WisperFusion::OutputParameters getOutputWisperParams();
120 
121  protected slots:
122 
123  void onHighResSensorTypeActivated(int idx);
124 
125  void onLowResSensorTypeActivated(int idx);
126 
127  void onHighCsvToolButtonClicked();
128 
129  void onLowCsvToolButtonClicked();
130 
131  protected:
132 
133  void fillFusionTypes();
134 
135  void fillSensorTypes(QComboBox* combo);
136 
137  void fillWaveletTypes();
138 
139  void listBandsLower();
140 
141  void listBandsHigher();
142 
143  std::map<double, double> getSRFMap(const int& st, std::string stName);
144 
145  private:
146 
147  std::auto_ptr<Ui::FusionWizardPageForm> m_ui;
148 
149  QDialog* m_chartDialog;
150 
152 
155 
156  std::vector<te::qt::widgets::Scatter*> m_scatterLowResVec;
157  std::vector<te::qt::widgets::ScatterChart*> m_scatterChartLowResVec;
158 
159  std::map<QComboBox*, int> m_comboMap;
160  std::map<QToolButton*, int> m_buttonMap;
161 
164  };
165 
166  } // end namespace widgets
167  } // end namespace qt
168 } // end namespace te
169 
170 #endif // __TERRALIB_QT_WIDGETS_RP_INTERNAL_FUSIONWIZARDPAGE_H
te::map::AbstractLayerPtr m_layerLower
te::qt::widgets::ChartDisplay * m_chartDisplay
IHSFusion output parameters.
Definition: IHSFusion.h:108
IHSFusion input parameters.
Definition: IHSFusion.h:64
PCAFusion output parameters.
Definition: PCAFusion.h:96
te::qt::widgets::ScatterChart * m_scatterChartHighRes
std::map< QToolButton *, int > m_buttonMap
WisperFusion output parameters.
Definition: WisperFusion.h:117
std::vector< te::qt::widgets::ScatterChart * > m_scatterChartLowResVec
A class to represent a scatter.
Definition: Scatter.h:51
WisperFusion input parameters.
Definition: WisperFusion.h:65
std::auto_ptr< Ui::FusionWizardPageForm > m_ui
std::vector< te::qt::widgets::Scatter * > m_scatterLowResVec
URI C++ Library.
A class to represent a chart display.
Definition: ChartDisplay.h:65
This class is GUI used to define the fusion parameters for the RP fusion operation.
te::qt::widgets::Scatter * m_scatterHighRes
A class to represent a scatter chart.
Definition: ScatterChart.h:55
PCAFusion input parameters.
Definition: PCAFusion.h:58
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63
std::map< QComboBox *, int > m_comboMap
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
te::map::AbstractLayerPtr m_layerHigher