MixtureModelPCAStrategy.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/MixtureModelPCAStrategy.h
22 
23  \brief PCA (Principal Component Analysis) strategy for mixture model.
24  */
25 
26 #ifndef __TERRALIB_RP_INTERNAL_MIXTUREMODELPCASTRATEGY_H
27 #define __TERRALIB_RP_INTERNAL_MIXTUREMODELPCASTRATEGY_H
28 
29 // TerraLib
30 #include "MixtureModelStrategy.h"
32 #include "Config.h"
33 
34 // STL
35 #include <map>
36 
37 // Boost
38 #include <boost/numeric/ublas/matrix.hpp>
39 
40 namespace te
41 {
42  namespace rp
43  {
44  /*!
45  \class MixtureModelPCAStrategy
46 
47  \ingroup rp_class
48  */
50  {
51  public:
52 
53  /*!
54  \class Parameters
55 
56  \brief MixtureModel Parameters
57  */
59  {
60  public:
61 
62  Parameters();
63 
64  ~Parameters();
65 
66  //overload
67  const Parameters& operator=(const Parameters& params);
68 
69  //overload
70  void reset() throw( te::rp::Exception );
71 
72  //overload
73  AbstractParameters* clone() const;
74  };
75 
76  public:
77 
79 
81 
82  //overload
83  bool initialize(StrategyParameters const* const strategyParams) throw(te::rp::Exception);
84 
85  //overload
86  bool execute(const te::rst::Raster& inputRaster, const std::vector<unsigned int>& inputRasterBands,
87  const std::vector<std::string>& inputSensorBands, const std::map<std::string, std::vector<double> >& components,
88  te::rst::Raster& outputRaster, const bool enableProgressInterface) throw(te::rp::Exception);
89 
90  //overload
91  bool getTransformMatrix( boost::numeric::ublas::matrix<double>& matrix ) const;
92 
93  //overload
94  bool setTransformMatrix(boost::numeric::ublas::matrix<double>& matrix);
95 
96  //overload
97  bool generateTransformMatrix(const std::vector<unsigned int>& inputRasterBands, const std::vector<std::string>& inputSensorBands,
98  const std::map<std::string, std::vector<double> >& components);
99 
100  //overload
101  bool getMinMax(std::vector<double>&, std::vector<double>&) const;
102 
103  protected:
104 
105  bool m_isInitialized; //!< True if this instance is initialized.
106  MixtureModelPCAStrategy::Parameters m_parameters; //!< Internal execution parameters.
107  boost::numeric::ublas::matrix<double> m_transfMatrix; //! Transformation matrix;
108  std::vector<double> m_min; //!< Minimun value
109  std::vector<double> m_max; //!< Maximum value
110  };
111 
112  /*!
113  \class MixtureModelPCAStrategyFactory
114 
115  \brief Raster PCA mixture model strategy factory.
116 
117  \note Factory key: RegionGrowing
118  */
120  {
121  public:
122 
124 
126 
127  //overload
129  };
130 
131  } // end namespace rp
132 } // end namespace te
133 
134 #endif // __TERRALIB_RP_INTERNAL_MIXTUREMODELPCASTRATEGY_H
Raster Mixture model strategy factory base class.
std::vector< double > m_max
Maximum value.
Raster mixture model strategy factory base class.
MixtureModelPCAStrategy::Parameters m_parameters
Internal execution parameters.
Raster mixture model strategy base class.
TEMNTEXPORT void getMinMax(te::rst::Raster *inputRst, double &vmin, double &vmax)
An abstract class for raster data strucutures.
Definition: Raster.h:71
URI C++ Library.
Raster strategy parameters base class.
#define TERPEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:139
Raster PCA mixture model strategy factory.
std::vector< double > m_min
Transformation matrix;.
Configuration flags for the Raster Processing module of TerraLib.
boost::numeric::ublas::matrix< double > m_transfMatrix
bool m_isInitialized
True if this instance is initialized.
Raster mixture model strategy base class.