IAlgebra.hpp
1 #ifndef OPALS_IALGEBRA_HPP_INCLUDED
2 #define OPALS_IALGEBRA_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, "opalsAlgebra_d.lib")
9  #else
10  #pragma comment(lib, "opalsAlgebra.lib")
11  #endif
12 #endif
13 
14 #include <opals/ResamplingMethod.hpp>
15 #include <opals/MultiGridLimit.hpp>
16 #include <opals/String.hpp>
17 #include <opals/Path.hpp>
18 #include <opals/Vector.hpp>
19 
22 
23 namespace opals {
24 
25  namespace opts
26  {
27  namespace Algebra
28  {
29  /// Options of \ref ModuleAlgebra
30  typedef IGroup< Names::_, false, Cons<
31  ILeaf< Names::inFile, false, opals::Vector<opals::Path> >, Cons<
32  ILeaf< Names::outFile, false, opals::Path >, Cons<
33  ILeaf< Names::oFormat, false, opals::String >, Cons<
34  ILeaf< Names::formula, false, opals::String >, Cons<
35  ILeaf< Names::gridSize, false, opals::Vector<double> >, Cons<
36  ILeaf< Names::noData, false, double >, Cons<
37  ILeaf< Names::limit, false, opals::MultiGridLimit >, Cons<
38  ILeaf< Names::resampling, false, opals::ResamplingMethod::Type >, Cons<
39  ILeaf< Names::maxMemory, false, unsigned >, Cons<
40  ILeaf< Names::skipVoidAreas, false, bool >
41  > > > > > > > > > > > Options;
42  }
43  }
44 
45  /// Provides a generic raster algebra calculator featuring mathematical, statistical and conditional operators.
46  /** Multiple input rasters are combined by means of a generic, user defined formula
47  If necessary, automatical resampling (nearest, bilinear, bicubic) is performed on the fly */
48  /// \see \ref ModuleAlgebra
49  class OPALS_API IAlgebra : virtual public IModuleBase
50  {
51 
52  public:
53  static IAlgebra* New();
54  static IAlgebra* New( IControlObject &controlObject );
55  static IAlgebra* New( const IModuleBase &parent );
56  static IAlgebra* New( const IModuleBase &parent, IControlObject &controlObject );
57 
58  virtual ~IAlgebra() {}
59 
60  /// \name Access to module-specific options.
61  ///@{
63  virtual Options& opts() = 0;
64  virtual const Options& opts() const = 0;
65  ///}@
66 
67  };
68 
69 };
70 
71 #endif