SegmenterDummyStrategy.h
Go to the documentation of this file.
1 /* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of the TerraLib - a Framework for building GIS enabled applications.
4 
5  TerraLib is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  TerraLib is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with TerraLib. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@terralib.org>.
18  */
19 
20 /*!
21  \file terralib/rp/SegmenterDummyStrategy.h
22  \brief Dummy strategy (just for testing purposes).
23  */
24 
25 #ifndef __TERRALIB_RP_INTERNAL_SEGMENTERDUMMYSTRATEGY_H
26 #define __TERRALIB_RP_INTERNAL_SEGMENTERDUMMYSTRATEGY_H
27 
29 #include "SegmenterStrategy.h"
30 #include "Config.h"
31 
32 
33 namespace te
34 {
35  namespace rp
36  {
37  /*!
38  \class SegmenterDummyStrategy
39  \brief Dummy strategy (just for testing purposes).
40  */
42  {
43  public:
44 
46 
48 
49  //overload
50  bool initialize(
51  SegmenterStrategyParameters const* const strategyParams )
52  throw( te::rp::Exception );
53 
54  //overload
55  void reset();
56 
57  //overload
58  bool execute(
59  SegmenterIdsManager& segmenterIdsManager,
60  const te::rp::SegmenterSegmentsBlock& block2ProcessInfo,
61  const te::rst::Raster& inputRaster,
62  const std::vector< unsigned int >& inputRasterBands,
63  const std::vector< std::complex< double > >& inputRasterNoDataValues,
64  const std::vector< std::complex< double > >& inputRasterBandMinValues,
65  const std::vector< std::complex< double > >& inputRasterBandMaxValues,
66  te::rst::Raster& outputRaster,
67  const unsigned int outputRasterBand,
68  const bool enableProgressInterface ) throw( te::rp::Exception );
69 
70  //overload
71  double getMemUsageEstimation( const unsigned int bandsToProcess,
72  const unsigned int pixelsNumber ) const;
73 
74  //overload
75  unsigned int getOptimalBlocksOverlapSize() const;
76 
77  //overload
79 
80  //overload
82  };
83 
84  /*!
85  \class SegmenterDummyStrategyFactory
86  \brief Raster dummy segmenter strategy factory.
87  \note Factory key: RegionGrowing
88  */
91  {
92  public:
93 
95 
97 
98  //overload
100 
101  };
102 
103  } // end namespace rp
104 } // end namespace te
105 
106 #endif
107 
te::rp::SegmenterStrategy
Raster segmenter strategy base class.
Definition: SegmenterStrategy.h:47
te
TerraLib.
Definition: AddressGeocodingOp.h:52
te::rp::SegmenterDummyStrategy
Dummy strategy (just for testing purposes).
Definition: SegmenterDummyStrategy.h:42
te::rst::Raster
An abstract class for raster data strucutures.
Definition: Raster.h:72
te::rp::SegmenterDummyStrategy::getMemUsageEstimation
double getMemUsageEstimation(const unsigned int bandsToProcess, const unsigned int pixelsNumber) const
Returns a memory estimation (bytes).
te::rp::SegmenterDummyStrategyFactory::SegmenterDummyStrategyFactory
SegmenterDummyStrategyFactory()
te::rp::SegmenterStrategyParameters
Segmenter Strategy Parameters.
Definition: SegmenterStrategyParameters.h:40
te::rp::SegmenterDummyStrategyFactory
Raster dummy segmenter strategy factory.
Definition: SegmenterDummyStrategy.h:91
te::rp::SegmenterStrategyFactory
Raster segmenter strategy factory base class.
Definition: SegmenterStrategyFactory.h:46
te::rp::SegmenterDummyStrategy::getBlocksMergingMethod
BlocksMergingMethod getBlocksMergingMethod() const
Return the strategy blocks merging method.
TERPEXPORT
#define TERPEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:139
te::rp::SegmenterDummyStrategy::reset
void reset()
Clear all internal allocated resources and go back to the initial not-initialized state.
te::rp::SegmenterDummyStrategy::SegmenterDummyStrategy
SegmenterDummyStrategy()
te::rp::SegmenterDummyStrategy::~SegmenterDummyStrategy
~SegmenterDummyStrategy()
Config.h
Proxy configuration file for TerraView (see terraview_config.h).
SegmenterStrategyFactory.h
Raster segmenter strategy factory base class.
SegmenterStrategy.h
Raster segmenter strategy base class.
te::rp::SegmenterDummyStrategy::getOptimalBlocksOverlapSize
unsigned int getOptimalBlocksOverlapSize() const
Returns a optimal blocks overlap size (number of border pixels overlapped between blocks,...
te::rp::SegmenterStrategy::BlocksMergingMethod
BlocksMergingMethod
Blocks merging method.
Definition: SegmenterStrategy.h:53
te::rp::SegmenterDummyStrategy::shouldComputeMinMaxValues
bool shouldComputeMinMaxValues() const
Returns if the min and max pixel values should be computed.
te::rp::SegmenterDummyStrategy::initialize
bool initialize(SegmenterStrategyParameters const *const strategyParams)
Initialize the segmentation strategy.
te::rp::SegmenterIdsManager
Segmenter segments IDs manager.
Definition: SegmenterIdsManager.h:45
te::rp::SegmenterSegmentsBlock
Segmenter segments block description class.
Definition: SegmenterSegmentsBlock.h:42
te::rp::SegmenterDummyStrategy::execute
bool execute(SegmenterIdsManager &segmenterIdsManager, const te::rp::SegmenterSegmentsBlock &block2ProcessInfo, const te::rst::Raster &inputRaster, const std::vector< unsigned int > &inputRasterBands, const std::vector< std::complex< double > > &inputRasterNoDataValues, const std::vector< std::complex< double > > &inputRasterBandMinValues, const std::vector< std::complex< double > > &inputRasterBandMaxValues, te::rst::Raster &outputRaster, const unsigned int outputRasterBand, const bool enableProgressInterface)
Executes the segmentation strategy over region delimited by the given block.
te::rp::SegmenterDummyStrategyFactory::~SegmenterDummyStrategyFactory
~SegmenterDummyStrategyFactory()
te::rp::SegmenterDummyStrategyFactory::build
te::rp::SegmenterStrategy * build()
Concrete factories (derived from this one) must implement this method in order to create objects.