DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
BoundaryPredicate.h
1 
17 #pragma once
18 
31 #if defined(BoundaryPredicate_RECURSES)
32 #error Recursive header files inclusion detected in BoundaryPredicate.h
33 #else // defined(BoundaryPredicate_RECURSES)
34 
35 #define BoundaryPredicate_RECURSES
36 
37 #if !defined BoundaryPredicate_h
38 
39 #define BoundaryPredicate_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 BoundaryPredicate
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 
97  BoundaryPredicate( const KSpace & aSpace, const Image & anImage,
98  const Value & l1 );
99 
104  BoundaryPredicate ( const BoundaryPredicate & other );
105 
112 
122  bool operator()( const Surfel & s ) const;
123 
124  // ----------------------- Interface --------------------------------------
125  public:
126 
131  void selfDisplay ( std::ostream & out ) const;
132 
137  bool isValid() const;
138 
139  // ------------------------- Private Datas --------------------------------
140  private:
141 
144  // the image of interest
148 
149  // ------------------------- Hidden services ------------------------------
150  protected:
151  // ------------------------- Internals ------------------------------------
152  private:
153 
154  }; // end of class BoundaryPredicate
155 
156 
163  template <typename TKSpace, typename TImage>
164  std::ostream&
165  operator<< ( std::ostream & out,
166  const BoundaryPredicate<TKSpace,TImage> & object );
167 
168 
169 } // namespace DGtal
170 
171 
173 // Includes inline functions.
174 #include "DGtal/topology/helpers/BoundaryPredicate.ih"
175 
176 // //
178 
179 #endif // !defined BoundaryPredicate_h
180 
181 #undef BoundaryPredicate_RECURSES
182 #endif // else defined(BoundaryPredicate_RECURSES)