Loading...
Searching...
No Matches
GammaModel.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/rp/radar/GammaModel.h
22 \brief Gamma model data manipulation.
23*/
24
25#ifndef __TERRALIB_RP_RADAR_INTERNAL_GAMMAMODEL_H
26#define __TERRALIB_RP_RADAR_INTERNAL_GAMMAMODEL_H
27
28// TerraLib includes
29#include "../Config.h"
30#include "../../raster/Raster.h"
31#include "../../geometry/Polygon.h"
32
33// Boost includes
34#include <boost/shared_ptr.hpp>
35#include <boost/numeric/ublas/matrix.hpp>
36#include <boost/math/distributions/chi_squared.hpp>
37
38namespace te
39{
40 namespace rp
41 {
42 namespace radar
43 {
44 /*!
45 \class GammaModel
46
47 \brief Gamma model data manipulation.
48 */
50 {
51 public:
52
53 unsigned int m_sourcesNumber; //!< Number of sources.
54
55 te::rst::Raster* m_inputRasterPtr; //!< Input raster.
56
57 std::vector< unsigned int > m_inputRastersBands; //!< Bands to process.
58
59 std::vector< te::gm::Polygon* > m_polygonsSegImage; //!< Polygons of segmented image.
60
61 typedef unsigned int ClassIDT; //!< CLass ID type definiton.
62
63 std::vector< unsigned int > m_classesIDT; //!< Training class ID.
64
65 std::vector< te::gm::Polygon > m_polygonSamplesT; //!< Training samples polygons.
66 std::vector< std::vector< double > > m_polygonSamplesTNew; //!< Training samples polygons.
67 std::vector< int > m_numberOfSamples;
68
69 typedef std::vector< double > ClassSampleT; //!< Class sample type definition.
70
71 typedef std::vector< ClassSampleT > ClassSamplesContainerT; //!< Class samples container type definition.
72
73 typedef std::map< ClassIDT, ClassSamplesContainerT > MClassesSamplesCT; //!< Multi-classes samples container type definition.
74
75 typedef boost::shared_ptr< MClassesSamplesCT > MClassesSamplesCTPtr; //!< A shared pointer to a multi classes samples container type definition.
76
77 MClassesSamplesCTPtr m_trainSamplesPtr; //!< A shared pointer to a always-valid structure where training samples are stored.
78
79 std::vector< ClassIDT > m_classesIndex2IDLambda; //!< A class index ordered vector of classes IDs for Lambda parameter.
80
81 std::vector< std::vector< double > > m_lambdaClassesParameters; //!< Lambda classes parameter.
82
83 std::vector< double > m_lambdaRegionsParameters; //!< Lambda regions parameter.
84
85 double m_ENL; //!< Equivalent Number Look type.
86
87 unsigned int m_lagX; //!< The horizontal correlation value.
88
89 unsigned int m_lagY; //!< The vertical correlation value.
90
91 double m_significanceLevel; //!< The significance level.
92
93 std::string m_stochasticDistanceType; //!< The stochastic distance type definition.
94
95 std::vector < std::vector< double > > m_stochasticDistance; //!< Stochastic distance container.
96
97 std::vector < std::vector< double > > m_statisticalTest; //!< Statistical test container.
98
99 std::vector< std::vector< double > > m_pValue; //!< P-values container.
100
101 double m_betaValue; //!< Beta value for Renyi distance type.
102
103 std::vector< double > m_regionsSize; //!< Size of regions.
104
105 std::vector< double > m_samplesSize; //!< Size of sample containers.
106
107 /*! \brief Constructor. */
109
110 /*! \brief Destructor. */
112
113 bool LoadingSamples(void);
114
116
118
120
122
123 bool execute(void);
124 };
125
126 } // end namespace radar
127 } // end namespace rp
128} // end namespace msc
129
130#endif
Gamma model data manipulation.
Definition: GammaModel.h:50
std::vector< unsigned int > m_classesIDT
Training class ID.
Definition: GammaModel.h:63
std::map< ClassIDT, ClassSamplesContainerT > MClassesSamplesCT
Multi-classes samples container type definition.
Definition: GammaModel.h:73
bool GettingStatisticalTests(void)
unsigned int m_lagY
The vertical correlation value.
Definition: GammaModel.h:89
std::vector< te::gm::Polygon * > m_polygonsSegImage
Polygons of segmented image.
Definition: GammaModel.h:59
bool CalculatingLambdaClass(void)
unsigned int m_sourcesNumber
Number of sources.
Definition: GammaModel.h:53
std::vector< std::vector< double > > m_polygonSamplesTNew
Training samples polygons.
Definition: GammaModel.h:66
double m_ENL
Equivalent Number Look type.
Definition: GammaModel.h:85
te::rst::Raster * m_inputRasterPtr
Input raster.
Definition: GammaModel.h:55
std::vector< unsigned int > m_inputRastersBands
Bands to process.
Definition: GammaModel.h:57
unsigned int m_lagX
The horizontal correlation value.
Definition: GammaModel.h:87
MClassesSamplesCTPtr m_trainSamplesPtr
A shared pointer to a always-valid structure where training samples are stored.
Definition: GammaModel.h:77
std::vector< int > m_numberOfSamples
Definition: GammaModel.h:67
std::vector< double > m_lambdaRegionsParameters
Lambda regions parameter.
Definition: GammaModel.h:83
double m_betaValue
Beta value for Renyi distance type.
Definition: GammaModel.h:101
std::vector< ClassIDT > m_classesIndex2IDLambda
A class index ordered vector of classes IDs for Lambda parameter.
Definition: GammaModel.h:79
boost::shared_ptr< MClassesSamplesCT > MClassesSamplesCTPtr
A shared pointer to a multi classes samples container type definition.
Definition: GammaModel.h:75
bool CalculatingLambdaRegion(void)
std::vector< ClassSampleT > ClassSamplesContainerT
Class samples container type definition.
Definition: GammaModel.h:71
unsigned int ClassIDT
CLass ID type definiton.
Definition: GammaModel.h:61
double m_significanceLevel
The significance level.
Definition: GammaModel.h:91
std::vector< double > ClassSampleT
Class sample type definition.
Definition: GammaModel.h:69
std::vector< std::vector< double > > m_stochasticDistance
Stochastic distance container.
Definition: GammaModel.h:95
bool GettingStochasticDistances(void)
std::vector< std::vector< double > > m_lambdaClassesParameters
Lambda classes parameter.
Definition: GammaModel.h:81
std::vector< double > m_regionsSize
Size of regions.
Definition: GammaModel.h:103
std::string m_stochasticDistanceType
The stochastic distance type definition.
Definition: GammaModel.h:93
std::vector< te::gm::Polygon > m_polygonSamplesT
Training samples polygons.
Definition: GammaModel.h:65
std::vector< double > m_samplesSize
Size of sample containers.
Definition: GammaModel.h:105
std::vector< std::vector< double > > m_statisticalTest
Statistical test container.
Definition: GammaModel.h:97
std::vector< std::vector< double > > m_pValue
P-values container.
Definition: GammaModel.h:99
An abstract class for raster data strucutures.
Definition: Raster.h:72
TerraLib.
#define TERPEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:139