All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
SegmenterDialog.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/SegmenterDialog.h
22 
23  \brief A dialog used to execute image segmentation.
24 */
25 
26 #ifndef __TERRALIB_QT_WIDGETS_RP_INTERNAL_SEGMENTERDIALOG_H
27 #define __TERRALIB_QT_WIDGETS_RP_INTERNAL_SEGMENTERDIALOG_H
28 
29 // TerraLib
30 #include "../Config.h"
31 #include "../../../raster/Raster.h"
32 
33 // Qt
34 #include <QDialog>
35 
36 // STL
37 
38 #include <map>
39 #include <string>
40 
41 // Boost
42 #include <boost/shared_ptr.hpp>
44 
45 // Forward user interface declaration
46 namespace Ui
47 {
48  class SegmenterForm;
49 }
50 
51 namespace te
52 {
53  namespace qt
54  {
55  namespace widgets
56  {
57  /*!
58  \class SegmenterDialog
59 
60  \brief A dialog used to execute image segmentation.
61  */
62  class TEQTWIDGETSEXPORT SegmenterDialog : public QDialog
63  {
64  Q_OBJECT
65 
66  public:
67 
68  /*! \brief Constructs a basic dialog which is a child of parent, with widget flags set to f.
69 
70  \param inputRasterPtr Input raster pointer.
71 
72  \param outpuRasterDSType Output raster data source type (as described in te::raster::RasterFactory ).
73 
74  \param outpuRasterInfo The necessary information to create the raster (as described in te::raster::RasterFactory).
75  */
76  SegmenterDialog(te::rst::Raster const* inputRasterPtr,
77  const std::string& outpuRasterDSType,
78  const std::map< std::string, std::string >& outpuRasterInfo,
79  QWidget* parent = 0,
80  Qt::WindowFlags f = 0);
81 
82  /*! \brief Destructor. */
83  ~SegmenterDialog();
84 
85  /*! \brief Returns the output result raster.
86 
87  \param outputRasterPtr A pointer to the output result raster
88 
89  \return true if OK, false on errors.
90  */
91  bool getOutputRaster( boost::shared_ptr< te::rst::Raster >& outputRasterPtr );
92 
93  protected slots:
94 
95  void on_okPushButton_clicked();
96 
97  private:
98 
99  Ui::SegmenterForm* m_uiPtr; //! User interface.
100  te::rst::Raster const* m_inputRasterPtr; //! Input raster pointer.
101  std::string m_outpuRasterDSType; //! Output raster data source type (as described in te::raster::RasterFactory ).
102  std::map< std::string, std::string > m_outpuRasterInfo; //! The necessary information to create the raster (as described in te::raster::RasterFactory).
103  boost::shared_ptr< te::rst::Raster > m_outputRasterPtr; //! Output raster pointer.
104  };
105 
106  } // end namespace widgets
107  } // end namespace qt
108 } // end namespace te
109 
110 #endif // __TERRALIB_QT_WIDGETS_RP_INTERNAL_SEGMENTERDIALOG_H
std::map< std::string, std::string > m_outpuRasterInfo
Output raster data source type (as described in te::raster::RasterFactory ).
te::rst::Raster const * m_inputRasterPtr
User interface.
A dialog used to build a basic fill element.
std::string m_outpuRasterDSType
Input raster pointer.
An abstract class for raster data strucutures.
Definition: Raster.h:71
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:66
A dialog used to execute image segmentation.
boost::shared_ptr< te::rst::Raster > m_outputRasterPtr
The necessary information to create the raster (as described in te::raster::RasterFactory).