All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Texture.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/rp/Texture.cpp
22 
23  \brief A structure to hold the set of GLCM metrics.
24 */
25 
26 // TerraLib
27 #include "Texture.h"
28 
30  : m_contrast(0.0),
31  m_dissimilarity(0.0),
32  m_energy(0.0),
33  m_entropy(0.0),
34  m_homogeneity(0.0)
35 {
36 }
37 
39 {
40  m_contrast = rhs.m_contrast;
41  m_dissimilarity = rhs.m_dissimilarity;
42  m_energy = rhs.m_energy;
43  m_entropy = rhs.m_entropy;
44  m_homogeneity = rhs.m_homogeneity;
45 }
46 
48 {
49  clear();
50 }
51 
53 {
54  if(this != &rhs)
55  {
56  clear();
57 
58  m_contrast = rhs.m_contrast;
59  m_dissimilarity = rhs.m_dissimilarity;
60  m_energy = rhs.m_energy;
61  m_entropy = rhs.m_entropy;
62  m_homogeneity = rhs.m_homogeneity;
63  }
64 
65  return *this;
66 }
67 
69 {
70  m_contrast = 0.0;
71  m_dissimilarity = 0.0;
72  m_energy = 0.0;
73  m_entropy = 0.0;
74  m_homogeneity = 0.0;
75 }
76 
void clear()
Clear the structure.
Definition: Texture.cpp:68
A structure to hold the set of GLCM metrics.
Texture()
Constructor.
Definition: Texture.cpp:29
Texture & operator=(const Texture &rhs)
Assignment operator.
Definition: Texture.cpp:52
double m_energy
GLCM metric Energy (the square root of Angular Second Moment) ${{i,j=0}^{N-1}P_{i,j}^2}$.
Definition: Texture.h:77
double m_homogeneity
GLCM metric Homogeneity (also called Inverse Difference Moment) ${i,j=0}^{N-1}{P_{i,j}}{1+(i-j)^2}$.
Definition: Texture.h:79
double m_dissimilarity
GLCM metric Dissimilarity ${i,j=0}^{N-1}P_{i,j}|i-j|$.
Definition: Texture.h:76
~Texture()
Destructor.
Definition: Texture.cpp:47
double m_entropy
GLCM metric Entropy ${i,j=0}^{N-1}P_{i,j}(-{P_{i,j}})$.
Definition: Texture.h:78
double m_contrast
GLCM metric Contrast (also called Sum of Squares Variance) ${i,j=0}^{N-1}P_{i,j}(i-j)^2$.
Definition: Texture.h:75
A structure to hold the set of GLCM metrics.
Definition: Texture.h:44