IStatFilter.hpp
1 #ifndef OPALS_ISTATFILTER_HPP_INCLUDED
2 #define OPALS_ISTATFILTER_HPP_INCLUDED
3 
4 #include <opals/IModuleBase.hpp>
5 
6 #if !defined(OPALS_EXPORTS) && !defined(OPALS_MODULE_EXPORTS)
7  #if defined _DEBUG && !defined OPALS_NO_DEBUG
8  #pragma comment(lib, "opalsStatFilter_d.lib")
9  #else
10  #pragma comment(lib, "opalsStatFilter.lib")
11  #endif
12 #endif
13 
14 #include <opals/String.hpp>
15 #include <opals/Path.hpp>
16 #include <opals/KernelShape.hpp>
17 #include <opals/StatFeature.hpp>
18 #include <opals/GridLimit.hpp>
19 #include <opals/GridResolution.hpp>
20 
21 namespace opals {
22 
23  namespace opts
24  {
25  namespace StatFilter
26  {
27  /// Options of \ref ModuleStatFilter
28  typedef IGroup< Names::_, false, Cons<
29  ILeaf< Names::inFile, false, opals::Path >, Cons<
30  ILeaf< Names::outFile, false, opals::Path >, Cons<
31  ILeaf< Names::oFormat, false, opals::String >, Cons<
32  ILeaf< Names::feature, false, opals::StatFeature >, Cons<
33  ILeaf< Names::kernelShape, false, opals::KernelShape::Type >, Cons<
34  ILeaf< Names::kernelSize, false, int >, Cons<
35  ILeaf< Names::limit, false, opals::GridLimit >, Cons<
36  ILeaf< Names::noData, false, float >, Cons<
37  ILeaf< Names::gridSize, false, opals::GridResolution::Type >
38  > > > > > > > > > > Options;
39  }
40  }
41 
42  /// Performs statistical filtering of raster datasets with a sliding kernel of arbitrary shape and size.
43  /** The module opalsStatFilter reads a raster image in GDAL suppurted format and produces
44  a statistically filtered output raster. For each output raster pixel a statistical
45  feature (e.g. min, max, mean, etc.) is evaluated based on a kernel neighbourhood. */
46  /// \see \ref ModuleStatFilter
47  class OPALS_API IStatFilter : virtual public IModuleBase
48  {
49 
50  public:
51  static IStatFilter* New();
52  static IStatFilter* New( IControlObject &controlObject );
53  static IStatFilter* New( const IModuleBase &parent );
54  static IStatFilter* New( const IModuleBase &parent, IControlObject &controlObject );
55 
56  virtual ~IStatFilter() {}
57 
58  /// \name Access to module-specific options.
59  ///@{
61  virtual Options& opts() = 0;
62  virtual const Options& opts() const = 0;
63  ///}@
64 
65  };
66 
67 };
68 
69 #endif