| 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/TePDIAlgorithm.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 TEPDIALGORITHM_HPP
    00026   #define TEPDIALGORITHM_HPP
    00027
    00028   #include "TePDIParameters.hpp"
    00029   #include "TePDIPIManager.hpp"
    00030   #include "TePDIDefines.hpp"
    00031
    00032   #include "../kernel/TeSharedPtr.h"
    00033   #include "../kernel/TeProgress.h"
    00034
    00041   class PDI_DLL TePDIAlgorithm
    00042   {
    00043     public :
    00047       typedef TeSharedPtr< TePDIAlgorithm > pointer;
    00048
    00052       typedef const TeSharedPtr< TePDIAlgorithm > const_pointer;
    00053
    00057       virtual ~TePDIAlgorithm();
    00058
    00065       bool Apply();
    00066
    00073       bool Apply( const TePDIParameters& params );
    00074
    00081       bool Reset( const TePDIParameters& params );
    00082
    00092       virtual bool CheckParameters(
    00093         const TePDIParameters& parameters ) const = 0;
    00094
    00100       const TePDIParameters& GetParameters() const;
    00101
    00107       static TePDIAlgorithm* DefaultObject( const TePDIParameters& params );
    00108
    00113       void ToggleProgInt( bool enabled );
    00114
    00115     protected :
    00119       mutable TePDIParameters params_;
    00120
    00125       bool progress_enabled_;
    00126
    00134       TePDIPIManager pi_manager_;
    00135
    00139       TePDIAlgorithm();
    00140
    00146       virtual bool RunImplementation() = 0;
    00147
    00153       virtual void ResetState( const TePDIParameters& params ) = 0;
    00154
    00163       bool CheckInternalParameters() const;
    00164
    00175       void StartProgInt( const std::string& message,
    00176         unsigned int steps );
    00177
    00188       bool UpdateProgInt( unsigned int step );
    00189
    00198       bool IncProgInt();
    00199
    00208       void StopProgInt();
    00209
    00210     private :
    00211
    00217       TePDIAlgorithm( const TePDIAlgorithm& ) {};
    00218
    00227       const TePDIAlgorithm& operator=(
    00228         const TePDIAlgorithm& external );
    00229   };
    00230
    00231 #endif //TEPDIALGORITHM_HPP

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines