IEdgeDetect.hpp
1 #ifndef OPALS_IEDGEDETECT_HPP_INCLUDED
2 #define OPALS_IEDGEDETECT_HPP_INCLUDED
3 
4 #if !defined(OPALS_EXPORTS) && !defined(OPALS_MODULE_EXPORTS)
5  #if defined _DEBUG && !defined OPALS_NO_DEBUG
6  #pragma comment(lib, "opalsEdgeDetect_d.lib")
7  #else
8  #pragma comment(lib, "opalsEdgeDetect.lib")
9  #endif
10 #endif
11 
12 #include <opals/IModuleBase.hpp>
13 #include <opals/Path.hpp>
14 #include <opals/Vector.hpp>
15 #include <opals/EdgeDetector.hpp>
16 #include <opals/GridLimit.hpp>
17 #include <opals/Array.hpp>
19 
20 namespace opals {
21 
22  namespace opts
23  {
24  namespace EdgeDetect
25  {
26  /// Options of \ref ModuleEdgeDetect
27  typedef IGroup< Names::_, false, Cons<
28  ILeaf< Names::inFile, false, opals::Path >, Cons<
29  ILeaf< Names::outFile, false, opals::Path >, Cons<
30  ILeaf< Names::oFormat, false, opals::String >, Cons<
31  ILeaf< Names::detector, false, opals::EdgeDetector::Type >, Cons<
32  ILeaf< Names::sigmaSmooth, false, float >, Cons<
33  ILeaf< Names::threshold, false, ArrayD2 >, Cons<
34  ILeaf< Names::tempDirectory, false, opals::Path >, Cons<
35  ILeaf< Names::debugOutFile, false, bool >, Cons<
36  ILeaf< Names::limit, false, opals::GridLimit >
37  > > > > > > > > > > Options;
38  }
39  }
40 
41  /// Provides different raster based edge detection algorithms (e.g. Canny).
42  /** The aim of opalsEdgeDetect is to provide an interface for different edge detectors.
43  Based on an input raster file and an appropriate set of parameters for the respective
44  edge detection algorithm, a binary output raster is derived containing the detected
45  edge pixels. */
46  /// \see \ref ModuleEdgeDetect
47  class OPALS_API IEdgeDetect : virtual public IModuleBase
48  {
49 
50  public:
51  static IEdgeDetect* New();
52  static IEdgeDetect* New( IControlObject &controlObject );
53  static IEdgeDetect* New( const IModuleBase &parent );
54  static IEdgeDetect* New( const IModuleBase &parent, IControlObject &controlObject );
55 
56  virtual ~IEdgeDetect() {}
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