DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
FrontierPredicate.h
1 
17 #pragma once
18 
31 #if defined(FrontierPredicate_RECURSES)
32 #error Recursive header files inclusion detected in FrontierPredicate.h
33 #else // defined(FrontierPredicate_RECURSES)
34 
35 #define FrontierPredicate_RECURSES
36 
37 #if !defined FrontierPredicate_h
38 
39 #define FrontierPredicate_h
40 
42 // Inclusions
43 #include <iostream>
44 #include <boost/array.hpp>
45 
46 #include "DGtal/base/Common.h"
48 
49 namespace DGtal
50 {
51 
53  // class FrontierPredicate
64  template <typename TKSpace, typename TImage>
66  {
67  // ----------------------- public types ------------------------------
68  public:
69  typedef TKSpace KSpace;
70  typedef TImage Image;
71  typedef typename KSpace::Surfel Surfel;
72  typedef typename KSpace::Point Point;
73  typedef typename KSpace::SCell SCell;
74  typedef typename Image::Value Value;
75  // KSpace::Point same type as Image::Point
77  (( ConceptUtils::SameType< typename KSpace::Point,
78  typename Image::Point>::value ));
79 
80 
81  // ----------------------- Standard services ------------------------------
82  public:
83 
88 
98  FrontierPredicate( const KSpace & aSpace, const Image & anImage,
99  const Value & l1, const Value & l2 );
100 
105  FrontierPredicate ( const FrontierPredicate & other );
106 
113 
123  bool operator()( const Surfel & s ) const;
124 
125  // ----------------------- Interface --------------------------------------
126  public:
127 
132  void selfDisplay ( std::ostream & out ) const;
133 
138  bool isValid() const;
139 
140  // ------------------------- Private Datas --------------------------------
141  private:
142 
145  // the image of interest
151 
152  // ------------------------- Hidden services ------------------------------
153  protected:
154  // ------------------------- Internals ------------------------------------
155  private:
156 
157  }; // end of class FrontierPredicate
158 
159 
166  template <typename TKSpace, typename TImage>
167  std::ostream&
168  operator<< ( std::ostream & out,
169  const FrontierPredicate<TKSpace,TImage> & object );
170 
171 
172 } // namespace DGtal
173 
174 
176 // Includes inline functions.
177 #include "DGtal/topology/helpers/FrontierPredicate.ih"
178 
179 // //
181 
182 #endif // !defined FrontierPredicate_h
183 
184 #undef FrontierPredicate_RECURSES
185 #endif // else defined(FrontierPredicate_RECURSES)