| TerraLib 4.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Examples

- File List
- File Members

E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/image_processing/TePDIStatistic.hpp
Go to the documentation of this file.

    00001 /*
    00002 TerraLib - a library for developing GIS applications.
    00003 Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
    00004
    00005 This code is part of the TerraLib library.
    00006 This library is free software; you can redistribute it and/or
    00007 modify it under the terms of the GNU Lesser General Public
    00008 License as published by the Free Software Foundation; either
    00009 version 2.1 of the License, or (at your option) any later version.
    00010
    00011 You should have received a copy of the GNU Lesser General Public
    00012 License along with this library.
    00013
    00014 The authors reassure the license terms regarding the warranties.
    00015 They specifically disclaim any warranties, including, but not limited to,
    00016 the implied warranties of merchantability and fitness for a particular
    00017 purpose. The library provided hereunder is on an "as is" basis, and the
    00018 authors have no obligation to provide maintenance, support, updates,
    00019 enhancements, or modifications.
    00020 In no event shall INPE be held liable to any party
    00021 for direct, indirect, special, incidental, or consequential damages arising
    00022 out of the use of this library and its documentation.
    00023 */
    00024
    00025 #ifndef TEPDISTATISTIC_HPP
    00026   #define TEPDISTATISTIC_HPP
    00027
    00028   #include "TePDIAlgorithm.hpp"
    00029   #include "TePDIParameters.hpp"
    00030   #include "TePDIJointHistogram.hpp"
    00031   #include "TePDIHistogram.hpp"
    00032   #include "../kernel/TeSharedPtr.h"
    00033   #include "TePDITypes.hpp"
    00034
    00035   #include "../kernel/TeMatrix.h"
    00036   #include "../kernel/TeGeometry.h"
    00037
    00038   #include <map>
    00039
    00072   class PDI_DLL TePDIStatistic : public TePDIAlgorithm {
    00073     public :
    00074
    00077       typedef TeSharedPtr< TePDIStatistic > pointer;
    00078
    00081       typedef const TeSharedPtr< TePDIStatistic > const_pointer;
    00082
    00087       TePDIStatistic();
    00088
    00092       ~TePDIStatistic();
    00093
    00103       bool CheckParameters( const TePDIParameters& parameters ) const;
    00104
    00117       const TePDIHistogram& getHistogram( unsigned int raster_index,
    00118         unsigned int pol_index = 0 );
    00119
    00129       const TePDIJointHistogram& getJointHistogram(
    00130         unsigned int raster1_index, unsigned int raster2_index,
    00131         unsigned int pol_index = 0 );
    00132
    00142       double getSum( unsigned int raster_index, unsigned int pol_index = 0 );
    00143
    00153       double getSum3( unsigned int raster_index, unsigned int pol_index = 0 );
    00154
    00164       double getSum4( unsigned int raster_index, unsigned int pol_index = 0 );
    00165
    00175       double getMean( unsigned int raster_index, unsigned int pol_index = 0 );
    00176
    00188       double getCovariance( unsigned int raster1_index,
    00189         unsigned int raster2_index, unsigned int pol_index = 0 );
    00190
    00200       double getVariance( unsigned int raster_index,
    00201         unsigned int pol_index = 0 );
    00202
    00213       double getStdDev( unsigned int raster_index,
    00214         unsigned int pol_index = 0 );
    00215
    00226       double getEntropy( unsigned int raster_index,
    00227         unsigned int pol_index = 0 );
    00228
    00239       double getMin( unsigned int raster_index, unsigned int pol_index = 0 );
    00240
    00251       double getMax( unsigned int raster_index, unsigned int pol_index = 0 );
    00252
    00263       double getMode( unsigned int raster_index, unsigned int pol_index = 0 );
    00264
    00276       double getCorrelation( unsigned int raster1_index,
    00277         unsigned int raster2_index, unsigned int pol_index = 0 );
    00278
    00290       double getPercentile( double sample_index, unsigned int raster_index,
    00291         unsigned int pol_index = 0 );
    00292
    00306       TeMatrix getMeanMatrix( unsigned int pol_index = 0 );
    00307
    00321       TeMatrix getCMMatrix( unsigned int pol_index = 0 );
    00322
    00334       TeMatrix getAssimetryMatrix( unsigned int pol_index = 0 );
    00335
    00347       TeMatrix getKurtosisMatrix( unsigned int pol_index = 0 );
    00348
    00359       TeMatrix getVarCoefMatrix( unsigned int pol_index = 0 );
    00360
    00373       TeMatrix getCovMatrix( unsigned int pol_index = 0 );
    00374
    00387       TeMatrix getCorMatrix( unsigned int pol_index = 0 );
    00388
    00401       TeMatrix getVarMatrix( unsigned int pol_index = 0 );
    00402
    00415       TeMatrix getStdDevMatrix( unsigned int pol_index = 0 );
    00416
    00417     protected :
    00418
    00425       typedef std::pair< unsigned int, unsigned int  > SingleRasterCachesKeyT;
    00426
    00433       typedef std::pair< unsigned int, SingleRasterCachesKeyT  >
    00434         CoupleRasterCachesKeyT;
    00435
    00437       typedef std::map< SingleRasterCachesKeyT, TePDIHistogram* >
    00438         HistoCacheT;
    00439
    00441       typedef std::map< CoupleRasterCachesKeyT, TePDIJointHistogram* >
    00442         JHistoCacheT;
    00443
    00447       TePDITypes::TePDIPolygonSetPtrType polygonset_;
    00448
    00452       TePDITypes::TePDIRasterVectorType rasters_;
    00453
    00457       std::vector< int > bands_;
    00458
    00462       JHistoCacheT jHistoCache_;
    00463
    00468       HistoCacheT histo_cache_;
    00469
    00473       TeStrategicIterator iterator_strat_;
    00474
    00480       bool RunImplementation();
    00481
    00487       void ResetState( const TePDIParameters& params );
    00488
    00501       double getSumPB1B2( unsigned int raster1_index,
    00502         unsigned int raster2_index, unsigned int pol_index );
    00503
    00505       void clear();
    00506
    00507   };
    00508
    00513 #endif //TEPDISTATISTIC_HPP

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines