| 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/TePDIHistogram.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 TEPDIHISTOGRAM_HPP
    00026   #define TEPDIHISTOGRAM_HPP
    00027
    00028   #include "TePDITypes.hpp"
    00029
    00030   #include "../kernel/TeSharedPtr.h"
    00031   #include "../kernel/TeGeometry.h"
    00032
    00033   #include <map>
    00034
    00039   class PDI_DLL TePDIHMapSpec : public std::map< double, unsigned int > {};
    00040
    00047   class PDI_DLL TePDIHistogram : public TePDIHMapSpec {
    00048     protected :
    00049
    00054       class PDI_DLL TePolygonSetPointer : public TeSharedPtr< TePolygonSet> {};
    00055
    00056     public :
    00059       typedef TeSharedPtr< TePDIHistogram > pointer;
    00062       typedef const TeSharedPtr< TePDIHistogram > const_pointer;
    00063
    00065       typedef TePDIHMapSpec::const_iterator const_iterator;
    00066
    00068       typedef TePDIHMapSpec::iterator iterator;
    00069
    00074       TePDIHistogram();
    00075
    00082       TePDIHistogram( const TePDIHistogram& external );
    00083
    00090       TePDIHistogram( const std::map< double, unsigned int >& external );
    00091
    00095       ~TePDIHistogram();
    00096
    00113       bool reset(
    00114         const TePDITypes::TePDIRasterPtrType& in_raster,
    00115         unsigned int band, unsigned int levels,
    00116         TeStrategicIterator iterstrat,
    00117         const TeSharedPtr< TePolygonSet>& polsetptr = TePolygonSetPointer() );
    00118
    00124       bool IsDiscrete() const;
    00125
    00131       bool hasFixedStep() const;
    00132
    00139       bool Discretize();
    00140
    00146       double GetMinLevel() const;
    00147
    00153       double GetMaxLevel() const;
    00154
    00160       unsigned int GetMinCount() const;
    00161
    00167       unsigned int GetMaxCount() const;
    00168
    00174       unsigned int getTotalCount() const;
    00175
    00180       void clear();
    00181
    00186       const TePDIHistogram& operator=( const TePDIHistogram& external );
    00187
    00192       const TePDIHistogram& operator=(
    00193         const std::map< double, unsigned int >& external );
    00194
    00200       void ToggleProgressInt( bool enabled );
    00201
    00202        // operator== overload.
    00203       bool operator==( const TePDIHistogram& external ) const;
    00204
    00209       unsigned int size() const;
    00210
    00214       std::string toString() const;
    00215
    00216     protected :
    00217
    00221       bool progress_int_enabled_;
    00222
    00226       void init();
    00227
    00241       bool SetH(
    00242         const TePDITypes::TePDIRasterPtrType& in_raster,
    00243         unsigned int band,
    00244         TeStrategicIterator iterstrat,
    00245         const TeSharedPtr< TePolygonSet>& polsetptr );
    00246
    00260       bool SetPaletteBasedH(
    00261         const TePDITypes::TePDIRasterPtrType& in_raster,
    00262         unsigned int band,
    00263         TeStrategicIterator iterstrat,
    00264         const TeSharedPtr< TePolygonSet>& polsetptr );
    00265
    00279       bool Set8BitH(
    00280         const TePDITypes::TePDIRasterPtrType& in_raster,
    00281         unsigned int band,
    00282         TeStrategicIterator iterstrat,
    00283         const TeSharedPtr< TePolygonSet>& polsetptr );
    00284
    00298       bool Set16BitH(
    00299         const TePDITypes::TePDIRasterPtrType& in_raster,
    00300         unsigned int band,
    00301         TeStrategicIterator iterstrat,
    00302         const TeSharedPtr< TePolygonSet>& polsetptr );
    00303
    00312       unsigned long int getProgressSteps(
    00313         const TeSharedPtr< TePolygonSet>& polsetptr, double resy );
    00314
    00315   };
    00316
    00321 #endif //TEPDIHISTOGRAM_HPP

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines