DGtal  0.9.2
ContourHelper.h
1 
17 #pragma once
18 
31 #if defined(ContourHelper_RECURSES)
32 #error Recursive header files inclusion detected in ContourHelper.h
33 #else // defined(ContourHelper_RECURSES)
34 
35 #define ContourHelper_RECURSES
36 
37 #if !defined ContourHelper_h
38 
39 #define ContourHelper_h
40 
42 // Inclusions
43 #include <iostream>
44 #include "DGtal/base/Common.h"
45 #include "DGtal/helpers/StdDefs.h"
46 
48 
49 namespace DGtal
50 {
51 
53 // class ContourHelper
60 {
61  // ----------------------- Static services ------------------------------
62 public:
63 
70  template <typename TPoint>
71  static
72  TPoint getMeanPoint(const std::vector<TPoint> & aContour);
73 
74 
82  template <typename TPoint>
83  static
84  bool
85  isCounterClockWise(const std::vector<TPoint> & aContour);
86 
87 
88 
89 
90  // ----------------------- Standard services ------------------------------
91 public:
92 
97 
98  // ----------------------- Interface --------------------------------------
99 public:
100 
105  void selfDisplay ( std::ostream & out ) const;
106 
111  bool isValid() const;
112 
113  // ------------------------- Protected Datas ------------------------------
114 private:
115  // ------------------------- Private Datas --------------------------------
116 private:
117 
118  // ------------------------- Hidden services ------------------------------
119 protected:
120 
125  ContourHelper();
126 
127 private:
128 
134  ContourHelper ( const ContourHelper & other );
135 
142  ContourHelper & operator= ( const ContourHelper & other );
143 
144  // ------------------------- Internals ------------------------------------
145 private:
146 
147 }; // end of class ContourHelper
148 
149 
156 std::ostream&
157 operator<< ( std::ostream & out, const ContourHelper & object );
158 
159 
160 } // namespace DGtal
161 
162 
164 // Includes inline functions/methods.
165 #include "DGtal/geometry/helpers/ContourHelper.ih"
166 
167 // //
169 
170 #endif // !defined ContourHelper_h
171 
172 #undef ContourHelper_RECURSES
173 #endif // else defined(ContourHelper_RECURSES)
static TPoint getMeanPoint(const std::vector< TPoint > &aContour)
Aim: a helper class to process sequences of points.
Definition: ContourHelper.h:59
static bool isCounterClockWise(const std::vector< TPoint > &aContour)
bool isValid() const
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
void selfDisplay(std::ostream &out) const
DGtal is the top-level namespace which contains all DGtal functions and types.
ContourHelper & operator=(const ContourHelper &other)