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 #ifndef Q_MOC_RUN
31 #include "../../../maptools/AbstractLayer.h"
32 #include "../../../rp/IHSFusion.h"
33 #include "../../../rp/PCAFusion.h"
34 #include "../../../rp/WisperFusion.h"
35 #include "../../../qt/widgets/charts/ChartDisplay.h"
36 #include "../../../qt/widgets/charts/Scatter.h"
37 #endif
38 #include "../../../qt/widgets/charts/ScatterChart.h"
39 #include "../Config.h"
40 
41 // STL
42 #include <memory>
43 
44 // Qt
45 #include <QComboBox>
46 #include <QToolButton>
47 #include <QWizardPage>
48 
49 
50 // Forward declaration
51 namespace Ui { class FusionWizardPageForm; }
52 
53 namespace te
54 {
55  namespace qt
56  {
57  namespace widgets
58  {
60  {
64  };
65 
66  /*!
67  \class FusionWizardPage
68 
69  \brief This class is GUI used to define the fusion parameters for the RP fusion operation.
70  */
71  class TEQTWIDGETSEXPORT FusionWizardPage : public QWizardPage
72  {
73  Q_OBJECT
74 
75  public:
76 
77  FusionWizardPage(QWidget* parent = 0);
78 
80 
81  bool isComplete() const;
82 
83  public:
84 
85  /*!
86  \brief This method is used to set the selected layer for classifier operation
87 
88  \param layer The layer ptr
89 
90  \note This layer MUST HAVE a valid raster object.
91  */
92  void setLower(te::map::AbstractLayerPtr layer);
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  */
101  void setHigher(te::map::AbstractLayerPtr layer);
102 
103  bool isIHSFusion();
104 
105  bool isPCAFusion();
106 
107  bool isWisperFusion();
108 
109  bool cropRasters();
110 
111  te::rp::IHSFusion::InputParameters getInputIHSParams();
112 
113  te::rp::IHSFusion::OutputParameters getOutputIHSParams();
114 
115  te::rp::PCAFusion::InputParameters getInputPCAParams();
116 
117  te::rp::PCAFusion::OutputParameters getOutputPCAParams();
118 
119  te::rp::WisperFusion::InputParameters getInputWisperParams();
120 
121  te::rp::WisperFusion::OutputParameters getOutputWisperParams();
122 
123  protected slots:
124 
125  void onHighResSensorTypeActivated(int idx);
126 
127  void onLowResSensorTypeActivated(int idx);
128 
129  void onHighCsvToolButtonClicked();
130 
131  void onLowCsvToolButtonClicked();
132 
133  protected:
134 
135  void fillFusionTypes();
136 
137  void fillSensorTypes(QComboBox* combo);
138 
139  void fillWaveletTypes();
140 
141  void listBandsLower();
142 
143  void listBandsHigher();
144 
145  std::map<double, double> getSRFMap(const int& st, std::string stName);
146 
147  private:
148 
149  std::auto_ptr<Ui::FusionWizardPageForm> m_ui;
150 
151  QDialog* m_chartDialog;
152 
154 
157 
158  std::vector<te::qt::widgets::Scatter*> m_scatterLowResVec;
159  std::vector<te::qt::widgets::ScatterChart*> m_scatterChartLowResVec;
160 
161  std::map<QComboBox*, int> m_comboMap;
162  std::map<QToolButton*, int> m_buttonMap;
163 
166  };
167 
168  } // end namespace widgets
169  } // end namespace qt
170 } // end namespace te
171 
172 #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