DGtal  1.2.0
DigitalSurfacePredicate.h
1 
17 #pragma once
18 
31 #if defined(DigitalSurfacePredicate_RECURSES)
32 #error Recursive header files inclusion detected in DigitalSurfacePredicate.h
33 #else // defined(DigitalSurfacePredicate_RECURSES)
35 #define DigitalSurfacePredicate_RECURSES
36 
37 #if !defined DigitalSurfacePredicate_h
39 #define DigitalSurfacePredicate_h
40 
42 // Inclusions
43 #include <iostream>
44 #include "DGtal/base/Common.h"
45 #include "DGtal/kernel/UnorderedSetByBlock.h"
47 
48 namespace DGtal
49 {
50 
52  // template class DigitalSurfacePredicate
64  template <typename TSurface>
66  {
67  // ----------------------- Public types ------------------------------
68  public:
69  using Surface = TSurface;
70  using Point = typename Surface::Point;
71  using Integer = typename Point::Coordinate;
72  using KSpace = typename Surface::KSpace;
73 
74  // ----------------------- Standard services ------------------------------
75  public:
76 
81 
88 
93 
99 
106 
107  //-------------------- model of concepts::CPointPredicate -----------------------------
108  public:
115  bool operator() (Point const& aPoint) const;
116 
117  // ----------------------- Interface --------------------------------------
118  public:
119 
124  void selfDisplay ( std::ostream & out ) const;
125 
130  bool isValid() const;
131 
132  // ------------------------- Protected Datas ------------------------------
133  protected:
134 
135  // ------------------------- Private Datas --------------------------------
136  private:
140  // ------------------------- Hidden services ------------------------------
141  protected:
142 
143  // ------------------------- Internals ------------------------------------
144  private:
148  KSpace const& space () const;
149 
154 
155  }; // end of class DigitalSurfacePredicate
156 
157 
164  template <typename TSurface>
165  std::ostream&
166  operator<< ( std::ostream & out, const DigitalSurfacePredicate<TSurface> & object );
167 
168 } // namespace DGtal
169 
170 
172 // Includes inline functions.
173 #include "DGtal/geometry/surfaces/DigitalSurfacePredicate.ih"
174 
175 // //
177 
178 #endif // !defined DigitalSurfacePredicate_h
179 
180 #undef DigitalSurfacePredicate_RECURSES
181 #endif // else defined(DigitalSurfacePredicate_RECURSES)
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Definition: ConstAlias.h:187
Aim: A point predicate which tells whether a point belongs to the set of pointels of a given digital ...
bool operator()(Point const &aPoint) const
UnorderedSetByBlock< Point > myPointSet
CountedConstPtrOrConstPtr< Surface > mySurface
DigitalSurfacePredicate(const DigitalSurfacePredicate &other)
KSpace const & space() const
DigitalSurfacePredicate & operator=(const DigitalSurfacePredicate &other)
DigitalSurfacePredicate(ConstAlias< Surface > aSurface)
typename Point::Coordinate Integer
void selfDisplay(std::ostream &out) const
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
MyPointD Point
Definition: testClone2.cpp:383
const Point aPoint(3, 4)