| 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/TePDIMallatWavelets.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 TEPDIMALLATWAVELETS_HPP
    00026   #define TEPDIMALLATWAVELETS_HPP
    00027
    00028   #include "TePDIAlgorithm.hpp"
    00029   #include "TePDIMatrix.hpp"
    00030
    00106   class PDI_DLL TePDIMallatWavelets : public TePDIAlgorithm {
    00107     public :
    00108
    00113       TePDIMallatWavelets();
    00114
    00118       ~TePDIMallatWavelets();
    00119
    00129       bool CheckParameters( const TePDIParameters& parameters ) const;
    00130
    00131     protected :
    00132
    00137       bool shift_histogram_flag_;
    00138
    00143       double input_image_mean_;
    00144
    00150       mutable std::vector< TePDIMatrix< TePDIMatrix< double > > > pyramid_;
    00151
    00157       bool RunImplementation();
    00158
    00165       void ResetState( const TePDIParameters& params );
    00166
    00179       bool Decompose( const TePDIParameters& params );
    00180
    00194       bool Recompose( unsigned int ref_level, const TePDIParameters& params );
    00195
    00205       bool GetSubBand( unsigned int level,
    00206         unsigned int subband,
    00207         const TePDITypes::TePDIRasterPtrType& sb_raster ) const;
    00208
    00221       bool ChangeSubBand( unsigned int level, unsigned int subband_index,
    00222         const TePDITypes::TePDIRasterPtrType& newsband );
    00223
    00224
    00235       bool PushLevel( unsigned int level,
    00236         const TePDIMatrix< double >& sb0,
    00237         const TePDIMatrix< double >& sb1,
    00238         const TePDIMatrix< double >& sb2,
    00239         const TePDIMatrix< double >& sb3 );
    00240
    00251       bool GetAnalysisFilters( std::vector< double >& low_filter,
    00252         std::vector< double >& high_filter,
    00253         int& low_shift,
    00254         int& high_shift,
    00255         const TePDIParameters& params ) const;
    00256
    00267       bool GetSynthesisFilters( std::vector< double >& low_filter,
    00268         std::vector< double >& high_filter,
    00269         int& low_shift,
    00270         int& high_shift,
    00271         const TePDIParameters& params ) const;
    00272
    00281       bool GenerateLevel( unsigned int level, const TePDIParameters& params );
    00282
    00291       void ApplyVerticalFilter(
    00292         const TePDIMatrix< double >& inMatrix,
    00293         const std::vector< double >& filter,
    00294         int filter_shift,
    00295         TePDIMatrix< double >& outMatrix ) const;
    00296
    00305       void ApplyHorizontalFilter(
    00306         const TePDIMatrix< double >& inMatrix,
    00307         const std::vector< double >& filter,
    00308         int filter_shift,
    00309         TePDIMatrix< double >& outMatrix ) const;
    00310
    00326       bool BuildSuperimposedLevel( unsigned int level,
    00327         TePDIMatrix< double >& level_matrix, bool normalize = false,
    00328         double min_norm_level = 0, double max_norm_level = 0 ) const;
    00329
    00341       bool AgregateSubBands(
    00342         const TePDIMatrix< double >& upper_left,
    00343         const TePDIMatrix< double >& upper_right,
    00344         const TePDIMatrix< double >& lower_left,
    00345         const TePDIMatrix< double >& lower_right,
    00346         TePDIMatrix< double >& result ) const;
    00347
    00357       bool AllocateTopLevel( unsigned int level, unsigned int sblines = 0,
    00358         unsigned int sbcolumns = 0 );
    00359
    00369       bool GetAFiltersShift(
    00370         const std::vector< double >& a_lowfilter,
    00371         const std::vector< double >& a_highfilter,
    00372         int& lowshift, int& highshift ) const;
    00373
    00385       bool GetSFiltersShift(
    00386         const std::vector< double >& a_lowfilter,
    00387         const std::vector< double >& a_highfilter,
    00388         const std::vector< double >& s_lowfilter,
    00389         const std::vector< double >& s_highfilter,
    00390         int& lowshift, int& highshift ) const;
    00391
    00407       bool ReconstructLL(
    00408         const TePDIMatrix< double >& sb00_in,
    00409         const TePDIMatrix< double >& sb01_in,
    00410         const TePDIMatrix< double >& sb10_in,
    00411         const TePDIMatrix< double >& sb11_in,
    00412         const std::vector< double >& s_low_filter,
    00413         const std::vector< double >& s_high_filter,
    00414         int lowshift, int highshift,
    00415         TePDIMatrix< double >& sb00_out ) const;
    00416
    00424       bool UpSampleMatrix( const TePDIMatrix< double >& in,
    00425         TePDIMatrix< double >& out ) const;
    00426
    00435       bool AddMatrixes( const TePDIMatrix< double >& in1,
    00436         const TePDIMatrix< double >& in2, TePDIMatrix< double >& res ) const;
    00437
    00447       bool ApplyVerticalRFilter(
    00448         const TePDIMatrix< double >& inMatrix,
    00449         const std::vector< double >& filter,
    00450         int filter_shift,
    00451         TePDIMatrix< double >& outMatrix ) const;
    00452
    00462       bool ApplyHorizontalRFilter(
    00463         const TePDIMatrix< double >& inMatrix,
    00464         const std::vector< double >& filter,
    00465         int filter_shift,
    00466         TePDIMatrix< double >& outMatrix ) const;
    00467
    00476       bool NormalizeMatrix( const TePDIMatrix< double >& input,
    00477         TePDIMatrix< double >& output, double min,
    00478         double max ) const;
    00479   };
    00480
    00485 #endif

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines