| 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/TePDILevelRemap.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 TEPDILEVELREMAP_HPP
    00026   #define TEPDILEVELREMAP_HPP
    00027
    00028   #include "TePDIAlgorithm.hpp"
    00029   #include "TePDIHistogram.hpp"
    00030   #include "TePDIParameters.hpp"
    00031   #include "../kernel/TeSharedPtr.h"
    00032   #include "TePDITypes.hpp"
    00033
    00039   class PDI_DLL TePDILevelRemap : public TePDIAlgorithm {
    00040     public :
    00042       typedef TeSharedPtr< TePDILevelRemap > pointer;
    00044       typedef const TeSharedPtr< TePDILevelRemap > const_pointer;
    00045
    00049       virtual ~TePDILevelRemap();
    00050
    00051     protected :
    00060       typedef double (*remap_func_3_ptr_type)( double, double, double );
    00061
    00071       typedef double (*remap_func_4_ptr_type)( double, double, double,
    00072         double );
    00073
    00082       std::map< std::pair< TeRaster*, unsigned int  >,
    00083                 TePDIHistogram::pointer > histo_cache_;
    00084
    00089       TePDILevelRemap();
    00090
    00096       virtual void ResetState( const TePDIParameters& params );
    00097
    00112       bool RemapLevels(
    00113         TePDITypes::TePDIRasterPtrType& inRaster,
    00114         remap_func_3_ptr_type remapp_func,
    00115         int in_channel,
    00116         int out_channel,
    00117         double gain,
    00118         double offset,
    00119         bool normalize_output,
    00120         TePDITypes::TePDIRasterPtrType& outRaster );
    00121
    00138       bool RemapLevels(
    00139         TePDITypes::TePDIRasterPtrType& inRaster1,
    00140         TePDITypes::TePDIRasterPtrType& inRaster2,
    00141         remap_func_4_ptr_type remapp_func,
    00142         int in_channel1,
    00143         int in_channel2,
    00144         int out_channel,
    00145         double gain,
    00146         double offset,
    00147         bool normalize_output,
    00148         TePDITypes::TePDIRasterPtrType& outRaster );
    00149
    00161       void BuildHistograms(
    00162         TePDITypes::TePDIRasterPtrType& inRaster,
    00163         unsigned int histo_levels,
    00164         std::vector< int >& channels,
    00165         bool force = false );
    00166
    00177       TePDIHistogram::pointer GetHistRef(
    00178         TePDITypes::TePDIRasterPtrType& inRaster,
    00179         unsigned int band );
    00180
    00181   };
    00182
    00183 #endif //TEPDILEVELREMAP_HPP

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines