TerraLib 4.1
E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/image_processing/TePDIParaSegStrategy.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 TEPDIPARASEGSTRATEGY_HPP
00026   #define TEPDIPARASEGSTRATEGY_HPP
00027 
00028   #include "TePDIParaSegStrategyParams.hpp"
00029   #include "TePDIParaSegSegmentsBlock.hpp"
00030   #include "TePDIParaSegStrategyFactoryParams.hpp"
00031   #include "TePDIMatrix.hpp"
00032   #include "TePDIDefines.hpp"
00033   #include "TePDIParameters.hpp"
00034   
00035   #include <vector>
00036 
00043   class PDI_DLL TePDIParaSegStrategy
00044   {
00045     public :
00046         
00047 
00049       typedef TePDIMatrix< double > RasterBandDataT;          
00050          
00053       typedef std::vector< RasterBandDataT > RasterDataVecT;           
00054     
00055       virtual ~TePDIParaSegStrategy();
00056 
00072       virtual bool execute( const RasterDataVecT& rasterDataVector, 
00073         TePDIParaSegSegmentsBlock::SegmentsPointersMatrixT& outSegsMatrix ) = 0 ;
00074         
00082       virtual bool setParameters( const TePDIParameters& params ) = 0;        
00083         
00109       virtual bool mergeSegments( 
00110         TePDIParaSegSegmentsBlock::SegmentsPointersMatrixT& centerMatrix,
00111         TePDIParaSegSegmentsBlock::SegmentsPointersMatrixT* topMatrixPtr,
00112         TePDIParaSegSegmentsBlock::SegmentsPointersMatrixT* leftMatrixPtr ) = 0;
00113         
00120       virtual double getMemUsageFactor() const = 0;
00121         
00131       TePDIParaSegSegment::SegIdDataType acquireNewSegID();
00132       
00139       inline bool isBlockMergingEnabled() const
00140       {
00141         return params_.blockMergingEnabled_;
00142       };      
00143       
00144       // Overloaded
00145       static TePDIParaSegStrategy* DefaultObject( 
00146         const TePDIParaSegStrategyFactoryParams& params );
00147         
00148     protected :
00149     
00154       TePDIParaSegStrategy( const TePDIParaSegStrategyParams& params );    
00155              
00156     private :
00157     
00159       volatile TePDIParaSegSegment::SegIdDataType lastGenSegID_;    
00160       
00162       TePDIParaSegStrategyParams params_;
00163       
00164   };
00165 
00166 
00167 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines