Loading...
Searching...
No Matches
IntensityPairModel.h
Go to the documentation of this file.
1
2/* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
3
4 This file is part of the TerraLib - a Framework for building GIS enabled applications.
5
6 TerraLib is free software: you can redistribute it and/or modify
7 it under the terms of the GNU Lesser General Public License as published by
8 the Free Software Foundation, either version 3 of the License,
9 or (at your option) any later version.
10
11 TerraLib is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public License
17 along with TerraLib. See COPYING. If not, write to
18 TerraLib Team at <terralib-team@terralib.org>.
19 */
20
21/*!
22 \file terralib/rp/radar/IntensityPairModel.h
23 \brief Intensity Pair model data manipulation.
24*/
25
26#ifndef __TERRALIB_RP_RADAR_INTERNAL_INTENSITYPAIRMODEL_H
27#define __TERRALIB_RP_RADAR_INTERNAL_INTENSITYPAIRMODEL_H
28
29// TerraLib includes
30#include "../Config.h"
31#include "../../raster/Raster.h"
32#include "../../geometry/Polygon.h"
33
34// Boost includes
35#include <boost/numeric/ublas/matrix.hpp>
36#include <boost/math/distributions/chi_squared.hpp>
37
38#include <fstream>
39#include <vector>
40#include <map>
41
42namespace te
43{
44 namespace rp
45 {
46 namespace radar
47 {
48 /*!
49 \class Intensity PairModel
50
51 \brief Intensity Pair model data manipulation.
52 */
54 {
55 public:
56
57 te::rst::Raster* m_inputRasterPtr; //!< Input raster.
58
59 std::vector< unsigned int > m_inputRastersBands; //!< Bands to process.
60
61 unsigned int m_numberOfColumns; //!< Number of columns that all input rasters must have.
62
63 unsigned int m_numberOfRows; //!< Number of rows that all input rasters must have.
64
65 std::vector< te::gm::Polygon* > m_polygonsSegImage; //!< Polygons of segmented image.
66
67 std::vector< te::gm::Polygon > m_polygonSamplesT; //!< Training samples polygons.
68 std::vector< std::vector< double > > m_polygonSamplesTNew; //!< Training samples polygons.
69 std::vector< int > m_numberOfSamples;
70
71 unsigned int m_lagX; //!< The horizontal correlation value.
72
73 unsigned int m_lagY; //!< The vertical correlation value.
74
75 std::vector< unsigned int > m_classesIDT; //!< Training class ID.
76
77 typedef unsigned int ClassIDT; //!< Class ID type definiton.
78
79 typedef std::vector< double > ClassSampleT; //!< Class sample type definition.
80
81 typedef std::vector< ClassSampleT > ClassSamplesContainerT; //!< Class samples container type definition.
82
83 typedef std::map< ClassIDT, ClassSamplesContainerT > MClassesSamplesCT; //!< Multi-classes samples container type definition.
84
85 typedef boost::shared_ptr< MClassesSamplesCT > MClassesSamplesCTPtr; //!< A shared pointer to a multi classes samples container type definition.
86
87 MClassesSamplesCTPtr m_trainSamplesPtr; //!< A shared pointer to a always-valid structure where training samples are stored.
88
89 std::vector< ClassIDT > m_classesIndex2IDH; //!< A class index ordered vector of classes IDs for h11 and h22 parameters.
90
91 std::vector< std::vector< double > > m_hClassesParameters; //!< h11 and h22 classes parameters.
92
93 std::vector< std::vector< double > > m_hRegionsParameters; //!< h11 and h22 regions parameters.
94
95 std::vector< double > m_pcRegionsParameters; //!< pc regions parameters.
96
97 std::vector< double > m_pcClassesParameters; //!< pc regions parameters.
98
99 double m_ENL; //!< Equivalent Number Look type.
100
101 double m_betaValue; //!< Beta value for Renyi distance type.
102
103 double m_significanceLevel; //!< The significance level.
104
105 std::string m_stochasticDistanceType; //!< The stochastic distance type definition.
106
107 std::vector < std::vector< double > > m_stochasticDistance; //!< Stochastic distance container.
108
109 std::vector < std::vector< double > > m_stochasticDistanceTriangular; //!< Triangular Stochastic distance container.
110
111 std::vector < std::vector< double > > m_statisticalTest; //!< Statistical test container.
112
113 std::vector < std::vector< double > > m_statisticalTestTriangular; //!< Triangular Statistical test container.
114
115 std::vector< std::vector< double > > m_pValue; //!< P-values container.
116
117 std::vector< std::vector< double > > m_pValueTriangular; //!< Triangular P-values container.
118
119 std::vector< double > m_regionsSize; //!< Size of regions.
120
121 std::vector< double > m_samplesSize; //!< Size of sample containers.
122
123 long double m_sum; //!< Integral value;
124
125 std::vector< double > m_abcissas; //!< Abcissas for integration method.
126
127 std::vector< double > m_weights; //!< Weights for integration method.
128
129 /*! \brief Constructor. */
131
132 /*! \brief Destructor. */
134
135 bool LoadingSamples(void);
136
138
140
142
144
146
147 bool execute(void);
148 };
149
150 } // end namespace radar
151 } // end namespace rp
152} // end namespace msc
153
154#endif
155
156
std::vector< std::vector< double > > m_statisticalTest
Statistical test container.
std::vector< ClassIDT > m_classesIndex2IDH
A class index ordered vector of classes IDs for h11 and h22 parameters.
std::vector< double > m_weights
Weights for integration method.
std::map< ClassIDT, ClassSamplesContainerT > MClassesSamplesCT
Multi-classes samples container type definition.
te::rst::Raster * m_inputRasterPtr
Input raster.
std::vector< std::vector< double > > m_pValue
P-values container.
std::vector< std::vector< double > > m_hRegionsParameters
h11 and h22 regions parameters.
long double m_sum
Integral value;.
double m_ENL
Equivalent Number Look type.
std::vector< unsigned int > m_classesIDT
Training class ID.
unsigned int m_numberOfRows
Number of rows that all input rasters must have.
MClassesSamplesCTPtr m_trainSamplesPtr
A shared pointer to a always-valid structure where training samples are stored.
std::vector< std::vector< double > > m_polygonSamplesTNew
Training samples polygons.
std::vector< std::vector< double > > m_stochasticDistance
Stochastic distance container.
std::vector< double > ClassSampleT
Class sample type definition.
std::vector< std::vector< double > > m_stochasticDistanceTriangular
Triangular Stochastic distance container.
std::vector< double > m_samplesSize
Size of sample containers.
std::vector< double > m_pcClassesParameters
pc regions parameters.
unsigned int ClassIDT
Class ID type definiton.
std::vector< te::gm::Polygon > m_polygonSamplesT
Training samples polygons.
std::vector< std::vector< double > > m_statisticalTestTriangular
Triangular Statistical test container.
unsigned int m_lagX
The horizontal correlation value.
unsigned int m_lagY
The vertical correlation value.
double m_significanceLevel
The significance level.
std::vector< std::vector< double > > m_hClassesParameters
h11 and h22 classes parameters.
boost::shared_ptr< MClassesSamplesCT > MClassesSamplesCTPtr
A shared pointer to a multi classes samples container type definition.
std::vector< unsigned int > m_inputRastersBands
Bands to process.
std::vector< std::vector< double > > m_pValueTriangular
Triangular P-values container.
std::vector< ClassSampleT > ClassSamplesContainerT
Class samples container type definition.
std::vector< double > m_pcRegionsParameters
pc regions parameters.
unsigned int m_numberOfColumns
Number of columns that all input rasters must have.
std::vector< double > m_regionsSize
Size of regions.
std::vector< double > m_abcissas
Abcissas for integration method.
std::vector< te::gm::Polygon * > m_polygonsSegImage
Polygons of segmented image.
double m_betaValue
Beta value for Renyi distance type.
std::string m_stochasticDistanceType
The stochastic distance type definition.
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