ContrastDialog.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/ContrastDialog.h
22 
23  \brief A dialog used to execute image contrast enhencement.
24 */
25 
26 #ifndef __TERRALIB_QT_WIDGETS_RP_INTERNAL_CONTRASTDIALOG_H
27 #define __TERRALIB_QT_WIDGETS_RP_INTERNAL_CONTRASTDIALOG_H
28 
29 // TerraLib
30 #include "../Config.h"
31 #ifndef Q_MOC_RUN
32 #include "../../../raster/Raster.h"
33 #endif
34 
35 // Qt
36 #include <QDialog>
37 
38 // STL
39 
40 #include <map>
41 #include <string>
42 
43 // Boost
44 #ifndef Q_MOC_RUN
45 #include <boost/shared_ptr.hpp>
46 #endif
48 
49 // Forward user interface declaration
50 namespace Ui
51 {
52  class ContrastForm;
53 }
54 
55 namespace te
56 {
57  namespace qt
58  {
59  namespace widgets
60  {
61  /*!
62  \class ContrastDialog
63 
64  \brief A dialog used to execute image contrast enhencement.
65  */
66  class TEQTWIDGETSEXPORT ContrastDialog : public QDialog
67  {
68  Q_OBJECT
69 
70  public:
71 
72  /*! \brief Constructs a basic dialog which is a child of parent, with widget flags set to f.
73 
74  \param inputRasterPtr Input raster pointer.
75 
76  \param outpuRasterDSType Output raster data source type (as described in te::raster::RasterFactory ).
77 
78  \param outpuRasterInfo The necessary information to create the raster (as described in te::raster::RasterFactory).
79 
80  \param parent Parent widget pointer.
81 
82  \param f Widget flags.
83  */
84  ContrastDialog(te::rst::Raster const* inputRasterPtr,
85  const std::string& outpuRasterDSType,
86  const std::map< std::string, std::string >& outpuRasterInfo,
87  QWidget* parent = 0,
88  Qt::WindowFlags f = 0);
89 
90  /*! \brief Constructs a basic dialog which is a child of parent, with widget flags set to f.
91 
92  \param rasterPtr Raster pointer (this is both input and output raster, the result be written to this raster).
93 
94  \param parent Parent widget pointer.
95 
96  \param f Widget flags.
97  */
98  ContrastDialog(te::rst::Raster const* rasterPtr,
99  QWidget* parent = 0,
100  Qt::WindowFlags f = 0);
101 
102  /*! \brief Destructor. */
103  ~ContrastDialog();
104 
105  /*! \brief Returns the output result raster.
106 
107  \param outputRasterPtr A pointer to the output result raster
108 
109  \return true if OK, false on errors.
110  */
111  bool getOutputRaster( boost::shared_ptr< te::rst::Raster >& outputRasterPtr );
112 
113  protected slots:
114 
115  void on_okPushButton_clicked();
116 
117  private:
118 
119  Ui::ContrastForm* m_uiPtr; //! User interface.
120  te::rst::Raster const* m_inputRasterPtr; //! Input raster pointer.
121  bool m_outputRasterIsInputRaster; //! true if the output raster is the input raster.
122  std::string m_outpuRasterDSType; //! Output raster data source type (as described in te::raster::RasterFactory ).
123  std::map< std::string, std::string > m_outpuRasterInfo; //! The necessary information to create the raster (as described in te::raster::RasterFactory).
124  boost::shared_ptr< te::rst::Raster > m_outputRasterPtr; //! Output raster pointer.
125  };
126 
127  } // end namespace widgets
128  } // end namespace qt
129 } // end namespace te
130 
131 #endif // __TERRALIB_QT_WIDGETS_RP_INTERNAL_CONTRASTDIALOG_H
boost::shared_ptr< te::rst::Raster > m_outputRasterPtr
The necessary information to create the raster (as described in te::raster::RasterFactory).
te::rst::Raster const * m_inputRasterPtr
User interface.
A dialog used to build a basic fill element.
std::map< std::string, std::string > m_outpuRasterInfo
Output raster data source type (as described in te::raster::RasterFactory ).
An abstract class for raster data strucutures.
Definition: Raster.h:71
URI C++ Library.
std::string m_outpuRasterDSType
true if the output raster is the input raster.
bool m_outputRasterIsInputRaster
Input raster pointer.
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63
A dialog used to execute image contrast enhencement.