All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ColorMap.cpp
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.cpp
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 // TerraLib
27 #include "Categorize.h"
28 #include "ColorMap.h"
29 #include "Interpolate.h"
30 
32  : m_categorize(0),
33  m_interpolate(0)
34 {
35 }
36 
38  : m_categorize(0),
39  m_interpolate(0)
40 {
41  if(rhs.m_categorize)
42  {
44  }
45 
46  if(rhs.m_interpolate)
47  {
49  }
50 }
51 
53 {
54  delete m_categorize;
55  delete m_interpolate;
56 }
57 
59 {
60  delete m_categorize;
61  m_categorize = c;
62 }
63 
65 {
66  return m_categorize;
67 }
68 
70 {
71  delete m_interpolate;
72  m_interpolate = i;
73 }
74 
76 {
77  return m_interpolate;
78 }
79 
81 {
82  return new ColorMap(*this);
83 }
84 
The transformation of continuous values to distinct values (Categorize function). ...
ColorMap * clone() const
Definition: ColorMap.cpp:80
The transformation of continuous values to distinct values (Categorize function). ...
Definition: Categorize.h:90
Interpolate * getInterpolate() const
Definition: ColorMap.cpp:75
virtual Categorize * clone() const
It returns a clone of this object.
Definition: Categorize.cpp:76
void setCategorize(Categorize *c)
Definition: ColorMap.cpp:58
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
~ColorMap()
Destructor.
Definition: ColorMap.cpp:52
ColorMap()
It initializes a new ColorMap.
Definition: ColorMap.cpp:31
Categorize * getCategorize() const
Definition: ColorMap.cpp:64
A ColorMap defines either the colors of a pallette-type raster source or the mapping of numeric pixel...
void setInterpolate(Interpolate *i)
Definition: ColorMap.cpp:69
A ColorMap defines either the colors of a pallette-type raster source or the mapping of numeric pixel...
Definition: ColorMap.h:60
The transformation of continuous values to a number of values (Interpolate function).
virtual Interpolate * clone() const
It returns a clone of this object.
Definition: Interpolate.cpp:65