IMorph.hpp
1 #ifndef OPALS_IMORPH_HPP_INCLUDED
2 #define OPALS_IMORPH_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, "opalsMorph_d.lib")
9  #else
10  #pragma comment(lib, "opalsMorph.lib")
11  #endif
12 #endif
13 
14 #include <opals/Path.hpp>
15 #include <opals/KernelShape.hpp>
16 #include <opals/MorphOperation.hpp>
17 
18 namespace opals {
19 
20  namespace opts
21  {
22  namespace Morph
23  {
24  /// Options of \ref ModuleMorph
25  typedef IGroup< Names::_, false, Cons<
26  ILeaf< Names::inFile, false, opals::Path >, Cons<
27  ILeaf< Names::outFile, false, opals::Path >, Cons<
28  ILeaf< Names::oFormat, false, opals::String >, Cons<
29  ILeaf< Names::operation, false, opals::MorphOperation::Type >, Cons<
30  ILeaf< Names::kernelShape, false, opals::KernelShape::Type >, Cons<
31  ILeaf< Names::kernelSize, false, int >
32  > > > > > > > Options;
33  }
34  }
35 
36  /// Applies morphological operations (opening, closing, erosion, dilation) on raster datasets.
37  /** TODO:
38  More details on opalsMorph */
39  /// \see \ref ModuleMorph
40  class OPALS_API IMorph : virtual public IModuleBase
41  {
42 
43  public:
44  static IMorph* New();
45  static IMorph* New( IControlObject &controlObject );
46  static IMorph* New( const IModuleBase &parent );
47  static IMorph* New( const IModuleBase &parent, IControlObject &controlObject );
48 
49  virtual ~IMorph() {}
50 
51  /// \name Access to module-specific options.
52  ///@{
54  virtual Options& opts() = 0;
55  virtual const Options& opts() const = 0;
56  ///}@
57 
58  };
59 
60 };
61 
62 #endif