RasterTransformConfigurer.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 RasterTransformConfigurer.h
22 
23  \brief A Raster Transform configurer generates a Raster Transform given a RasterSymbolzier.
24 */
25 
26 #ifndef __TERRALIB_MAPTOOLS_INTERNAL_RASTERTRANSFORMCONFIGURER_H
27 #define __TERRALIB_MAPTOOLS_INTERNAL_RASTERTRANSFORMCONFIGURER_H
28 
29 // TerraLib
30 #include "Config.h"
31 #include "RasterTransform.h"
32 
33 // STL
34 #include <map>
35 
36 namespace te
37 {
38 // Forward declarations
39  namespace se
40  {
41  class ContrastEnhancement;
42  class RasterSymbolizer;
43  class SelectedChannel;
44  class Interpolate;
45  class Categorize;
46  class Recode;
47  }
48 
49  namespace rst
50  {
51  class Raster;
52  class RasterProperty;
53  }
54 
55  namespace map
56  {
57  /*!
58  \class RasterTransformConfigurer
59 
60  \brief A Raster Transform configurer generates a Raster Transform given a RasterSymbolzier.
61 
62  \sa RasterTransform
63  */
65  {
66  public:
67 
68  /*!
69  \brief Constructor
70 
71  \param rs Valid raster symbolizer pointer
72  \param rt Pointer to a raster transform object that will be configurated
73 
74  \note
75  */
77 
78  /*! \brief Destructor. */
80 
81  /*! \brief Configure Transformation. */
82  void configure();
83 
84  protected:
85 
86  /*! Function used to get the commun properties (gain, offset, opacity) */
87  void getGeneralProperties();
88 
89  /*! Function used to get channel selection order */
90  void getChannelSelection();
91 
92  /*! Function used to get gray channel properties */
93  void getGrayChannelProperties(te::se::SelectedChannel* se);
94 
95  /*! Function used to get red channel properties */
96  void getRedChannelProperties(te::se::SelectedChannel* se);
97 
98  /*! Function used to get green channel properties */
99  void getGreenChannelProperties(te::se::SelectedChannel* se);
100 
101  /*! Function used to get blue channel properties */
102  void getBlueChannelProperties(te::se::SelectedChannel* se);
103 
104  /*! Function used to get gamma value from a Contrast Enhancement */
105  double getGammaProperty(te::se::ContrastEnhancement* ce);
106 
107  /*! Function used to get the color map information */
108  void getColorMapInformation();
109 
110  /*! Function used to get the color map Interpolated information */
111  void getInterpolatedMap(te::se::Interpolate* interpolate);
112 
113  /*! Function used to get the color map Categorized information */
114  void getCategorizedMap(te::se::Categorize* caterogize);
115 
116  /*! Function used to get the color map Recoded information */
117  void getRecodedMap(te::se::Recode* recode);
118 
119 
120  private:
121 
122  te::se::RasterSymbolizer* m_rstSymbolizer; //!< SE element that describes the raster style.
123  te::map::RasterTransform* m_rstTransform; //!< Raster transformation object.
124 
125  };
126 
127  } // end namespace map
128 } // end namespace te
129 
130 #endif // __TERRALIB_MAPTOOLS_INTERNAL_RASTERTRANSFORMCONFIGURER_H
A selected channel to be display.
A Raster Transform is a class that defines functions to transform a styled raster.
The transformation of continuous values to distinct values (Categorize function). ...
Definition: Categorize.h:90
te::se::RasterSymbolizer * m_rstSymbolizer
SE element that describes the raster style.
te::map::RasterTransform * m_rstTransform
Raster transformation object.
The transformation of continuous values to a number of values (Interpolate function).
Definition: Interpolate.h:88
URI C++ Library.
ContrastEnhancement defines the 'stretching' of contrast for a channel of a false-color image or for ...
#define TEMAPEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:60
The RasterSymbolizer describes how to render raster/matrix-coverage data (e.g., satellite photos...
Transformation of discrete values to other values.
Definition: Recode.h:75
A Raster Transform configurer generates a Raster Transform given a RasterSymbolzier.
A Raster Transform is a class that defines functions to transform a styled raster.