Loading...
Searching...
No Matches
ColorTransformDialog.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/ColorTransformDialog.h
22
23 \brief This file defines a class for a ColorTransform dialog.
24*/
25
26#ifndef __TERRALIB_QT_WIDGETS_RP_INTERNAL_COLORTRANSFORMDIALOG_H
27#define __TERRALIB_QT_WIDGETS_RP_INTERNAL_COLORTRANSFORMDIALOG_H
28
29// TerraLib
30#ifndef Q_MOC_RUN
31#include "../../../maptools/AbstractLayer.h"
32#endif
33#include "../Config.h"
34#include "OutputRasterWidget.h"
35
36// STL
37#include <memory>
38
39// Qt
40#include <QComboBox>
41#include <QDialog>
42
43
44// Forward declaration
45namespace Ui { class ColorTransformDialogForm; }
46
47namespace te
48{
49 namespace qt
50 {
51 namespace widgets
52 {
53 //forward declaration
54 class Canvas;
55 class MapDisplay;
56
57 /*!
58 \class ColorTransformDialog
59
60 \brief This class is GUI used to define the colorTransform parameters for the RP colorTransform operation.
61 */
63 {
64 Q_OBJECT
65
67 {
71 COLORTRANSFORM_HLS2RGB
72 };
73
74 public:
75
76 ColorTransformDialog(QWidget* parent = 0);
77
79
80 public:
81
82 bool isRGB2IHS();
83
84 bool isIHS2RGB();
85
86 bool isRGB2HLS();
87
88 bool isHLS2RGB();
89
90 void setList(std::list<te::map::AbstractLayerPtr>& layerList);
91
93
94 public slots:
95
97
98 void rgbRComboBoxActivated(int index);
99 void rgbGComboBoxActivated(int index);
100 void rgbBComboBoxActivated(int index);
101
102 void ihsIComboBoxActivated(int index);
103 void ihsHComboBoxActivated(int index);
104 void ihsSComboBoxActivated(int index);
105
109
110 void hlsHComboBoxActivated(int index);
111 void hlsLComboBoxActivated(int index);
112 void hlsSComboBoxActivated(int index);
113
115
117
120
122
123 signals:
124
126
128
129 void closeTool();
130
131 protected:
132
133 bool execute();
134
136
137 void prepareOutputLayerName(std::map<std::string, unsigned int> rasterSelectedBands);
138
140
142
144
146
148
150
152
154
156
158
159 int getNBits();
160
161 void getRasterBands(QComboBox* layer, int index, QComboBox* band);
162
163 std::map<std::string, unsigned int> getSelectedBands();
164
166
168
170
172
174
176
178
179 void drawGeom();
180
182
183 void closeEvent(QCloseEvent* e);
184
185 void getRGBMinMax( double& min, double& max ) const;
186
187 private:
188
189 std::unique_ptr<Ui::ColorTransformDialogForm> m_ui;
190
191 std::list<te::map::AbstractLayerPtr> m_layerList;
192
203 std::vector< std::map<std::string, std::string> > m_outputRastersInfos;
204
205 };
206
207 } // end namespace widgets
208 } // end namespace qt
209} // end namespace te
210
211#endif // __TERRALIB_QT_WIDGETS_RP_INTERNAL_COLORTRANSFORMDIALOG_H
This file has the OutputRasterWidget class.
An Envelope defines a 2D rectangular region.
Definition: Envelope.h:52
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
Definition: Geometry.h:78
Polygon is a subclass of CurvePolygon whose rings are defined by linear rings.
Definition: Polygon.h:51
This class is GUI used to define the colorTransform parameters for the RP colorTransform operation.
void getRGBMinMax(double &min, double &max) const
void setList(std::list< te::map::AbstractLayerPtr > &layerList)
void drawPreview(te::rst::Raster *raster)
void prepareOutputLayerName(std::map< std::string, unsigned int > rasterSelectedBands)
std::list< te::map::AbstractLayerPtr > m_layerList
void setMapDisplay(te::qt::widgets::MapDisplay *mapDisplay)
std::map< std::string, unsigned int > getSelectedBands()
void addLayer(te::map::AbstractLayerPtr layer)
void getRasterBands(QComboBox *layer, int index, QComboBox *band)
void onEnvelopeAcquired(te::gm::Envelope env)
std::vector< std::map< std::string, std::string > > m_outputRastersInfos
void colorTransformTypeComboBoxActivated(int index)
void geomAquired(te::gm::Polygon *poly)
te::qt::widgets::OutputRasterWidget * m_outputWidget
std::unique_ptr< Ui::ColorTransformDialogForm > m_ui
te::qt::widgets::MapDisplay * m_mapDisplay
A widget to control the display of a set of layers.
Definition: MapDisplay.h:72
This class is used to set output layer.
An abstract class for raster data strucutures.
Definition: Raster.h:72
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
TerraLib.
#define slots
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63