All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
43  /*!
44  \class ColorMap
45 
46  \brief A ColorMap defines either the colors of a pallette-type raster source or the mapping of numeric pixel values to colors.
47 
48  The ColorMap element defines the mapping of palette-type
49  raster colors or fixed-numeric pixel values to colors
50  using an Interpolate or Categorize SE function. The LookUpValue
51  is in this case set to Rasterdata.
52  For example, a DEM raster giving elevations in meters above
53  sea level can be translated to a colored image with a ColorMap
54  using a Categorize function.
55 
56  \ingroup se
57 
58  \sa RasterSymbolizer, Categorize, Interpolate
59  */
60  class TESEEXPORT ColorMap : public boost::noncopyable
61  {
62  public:
63 
64  /** @name Initializer Methods
65  * Methods related to instantiation and destruction.
66  */
67  //@{
68 
69  /*! \brief It initializes a new ColorMap. */
70  ColorMap();
71 
72  /*!
73  \brief Copy constructor.
74 
75  \param rhs The other color map.
76  */
77  ColorMap(const ColorMap& rhs);
78 
79  /*! \brief Destructor. */
80  ~ColorMap();
81 
82  //@}
83 
84  /** @name Accessor methods
85  * Methods used to get or set properties.
86  */
87  //@{
88 
89  void setCategorize(Categorize* c);
90 
91  Categorize* getCategorize() const;
92 
93  void setInterpolate(Interpolate* i);
94 
95  Interpolate* getInterpolate() const;
96 
97  //@}
98 
99  ColorMap* clone() const;
100 
101  private:
102 
103  Categorize* m_categorize; //!< Categorize function. (Mandatory if interpolate_ is not defined or empty otherwise)
104  Interpolate* m_interpolate; //!< Interpolate function. (Mandatory if categorize_ is not defined or empty otherwise)
105  };
106 
107  } // end namespace se
108 } // end namespace te
109 
110 #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:103
Interpolate * m_interpolate
Interpolate function. (Mandatory if categorize_ is not defined or empty otherwise) ...
Definition: ColorMap.h:104
#define TESEEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:190
Configuration flags for the Symbology Encoding support of TerraLib.
A ColorMap defines either the colors of a pallette-type raster source or the mapping of numeric pixel...
Definition: ColorMap.h:60