| 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/TePDIJointHistogram.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 TEPDIJOINTHISTOGRAM_HPP
    00026   #define TEPDIJOINTHISTOGRAM_HPP
    00027
    00028   #include "TePDIHistogram.hpp"
    00029   #include "TePDITypes.hpp"
    00030
    00031   #include <map>
    00032
    00033   class TePDIHistogram;
    00034
    00041   class PDI_DLL TePDIJointHistogram
    00042   {
    00043     public :
    00044
    00046       typedef std::map< std::pair< double, double >, unsigned int > ConteinerT;
    00047
    00049       typedef ConteinerT::iterator iterator;
    00050
    00052       typedef ConteinerT::const_iterator const_iterator;
    00053
    00054       TePDIJointHistogram();
    00055
    00056       TePDIJointHistogram( const TePDIJointHistogram& external );
    00057
    00058        ~TePDIJointHistogram();
    00059
    00060       const TePDIJointHistogram& operator=( const TePDIJointHistogram& external );
    00061
    00067       void toggleProgress( bool enabled );
    00068
    00089       bool update( TeRaster& inputRaster1,
    00090         unsigned int inputRasterChn1, TeRaster& inputRaster2,
    00091         unsigned int inputRasterChn2, TeStrategicIterator iterStrat,
    00092         unsigned int levels,
    00093         const TePolygonSet& restricPolSet = TePolygonSet() );
    00094
    00098       void clear();
    00099
    00101
    00104       const TePDIHistogram& getRaster1Hist() const;
    00105
    00107
    00110       const TePDIHistogram& getRaster2Hist() const;
    00111
    00113       const_iterator begin() const;
    00114
    00116       const_iterator end() const;
    00117
    00119       unsigned int size() const;
    00120
    00122
    00127       void getInverseJHist( TePDIJointHistogram& external );
    00128
    00130
    00131       unsigned long int getFreqSum() const;
    00132
    00136       std::string toString() const;
    00137
    00138     protected :
    00139
    00141       bool progressEnabled_;
    00142
    00144       ConteinerT jHistContainer_;
    00145
    00147       TePDIHistogram r1Histogram_;
    00148
    00150       TePDIHistogram r2Histogram_;
    00151
    00152       // Internal used variables to store temporary histogram buffers.
    00153                unsigned int** init_jhist_;
    00154       unsigned int init_jhist_lines_;
    00155       unsigned int init_jhist_cols_;
    00156                unsigned int* init_r1hist_;
    00157                unsigned int* init_r2hist_;
    00158
    00159       // Just like the Update method, but for floating point rasters.
    00160       bool updateFloat( TeRaster& inputRaster1,
    00161           unsigned int inputRasterChn1, TeRaster& inputRaster2,
    00162           unsigned int inputRasterChn2, TeStrategicIterator iterStrat,
    00163           unsigned int levels, const TePolygonSet& restricPolSet );
    00164
    00165       // Just like the Update method, but for integer rasters.
    00166       bool updateInteger( TeRaster& inputRaster1,
    00167           unsigned int inputRasterChn1, TeRaster& inputRaster2,
    00168           unsigned int inputRasterChn2, TeStrategicIterator iterStrat,
    00169           const TePolygonSet& restricPolSet );
    00170
    00171       // Just like the Update method, but for 8 bits rasters.
    00172       bool update8Bits( TeRaster& inputRaster1,
    00173           unsigned int inputRasterChn1, TeRaster& inputRaster2,
    00174           unsigned int inputRasterChn2, TeStrategicIterator iterStrat,
    00175           const TePolygonSet& restricPolSet );
    00176
    00185       unsigned long int getProgressSteps(
    00186         const TePolygonSet& polset, double resy );
    00187
    00189       void clearTempHistBuffers();
    00190
    00191   };
    00192
    00197 #endif

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines