ColorMap.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/se/ColorMap.h
22 
23  \brief A ColorMap defines either the colors of a pallette-type raster source or the mapping of numeric pixel values to colors.
24 */
25 
26 #ifndef __TERRALIB_SE_INTERNAL_COLORMAP_H
27 #define __TERRALIB_SE_INTERNAL_COLORMAP_H
28 
29 // TerraLib
30 #include "Config.h"
31 
32 // Boost
33 #include <boost/noncopyable.hpp>
34 
35 namespace te
36 {
37  namespace se
38  {
39 // Forward declarations
40  class Categorize;
41  class Interpolate;
42  class Recode;
43 
44  /*!
45  \class ColorMap
46 
47  \brief A ColorMap defines either the colors of a pallette-type raster source or the mapping of numeric pixel values to colors.
48 
49  The ColorMap element defines the mapping of palette-type
50  raster colors or fixed-numeric pixel values to colors
51  using an Interpolate or Categorize SE function. The LookUpValue
52  is in this case set to Rasterdata.
53  For example, a DEM raster giving elevations in meters above
54  sea level can be translated to a colored image with a ColorMap
55  using a Categorize function.
56 
57  \ingroup se
58 
59  \sa RasterSymbolizer, Categorize, Interpolate
60  */
61  class TESEEXPORT ColorMap : public boost::noncopyable
62  {
63  public:
64 
65  /** @name Initializer Methods
66  * Methods related to instantiation and destruction.
67  */
68  //@{
69 
70  /*! \brief It initializes a new ColorMap. */
71  ColorMap();
72 
73  /*!
74  \brief Copy constructor.
75 
76  \param rhs The other color map.
77  */
78  ColorMap(const ColorMap& rhs);
79 
80  /*! \brief Destructor. */
81  ~ColorMap();
82 
83  //@}
84 
85  /** @name Accessor methods
86  * Methods used to get or set properties.
87  */
88  //@{
89 
90  void setCategorize(Categorize* c);
91 
92  Categorize* getCategorize() const;
93 
94  void setInterpolate(Interpolate* i);
95 
96  Interpolate* getInterpolate() const;
97 
98  void setRecode(Recode* i);
99 
100  Recode* getRecode() const;
101 
102  //@}
103 
104  ColorMap* clone() const;
105 
106  private:
107 
108  Categorize* m_categorize; //!< Categorize function. (Mandatory if interpolate_ is not defined or empty otherwise)
109  Interpolate* m_interpolate; //!< Interpolate function. (Mandatory if categorize_ is not defined or empty otherwise)
110  Recode* m_recode; //!< Recode function.
111  };
112 
113  } // end namespace se
114 } // end namespace te
115 
116 #endif // __TERRALIB_SE_INTERNAL_COLORMAP_H
The transformation of continuous values to distinct values (Categorize function). ...
Definition: Categorize.h:90
The transformation of continuous values to a number of values (Interpolate function).
Definition: Interpolate.h:88
Categorize * m_categorize
Categorize function. (Mandatory if interpolate_ is not defined or empty otherwise) ...
Definition: ColorMap.h:108
Interpolate * m_interpolate
Interpolate function. (Mandatory if categorize_ is not defined or empty otherwise) ...
Definition: ColorMap.h:109
URI C++ Library.
#define TESEEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:187
Configuration flags for the Symbology Encoding support of TerraLib.
Transformation of discrete values to other values.
Definition: Recode.h:75
Recode * m_recode
Recode function.
Definition: ColorMap.h:110
A ColorMap defines either the colors of a pallette-type raster source or the mapping of numeric pixel...
Definition: ColorMap.h:61