DGtal  1.4.beta
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)
35 #define ContourHelper_RECURSES
36 
37 #if !defined ContourHelper_h
39 #define ContourHelper_h
40 
42 // Inclusions
43 #include <iostream>
44 #include "DGtal/base/Common.h"
45 #include "DGtal/kernel/PointVector.h"
46 
47 
49 
50 namespace DGtal
51 {
52 
54 // class ContourHelper
61 {
62  // ----------------------- Static services ------------------------------
63 public:
64 
71  template <typename TPoint>
72  static
74  getBarycenter(const std::vector<TPoint> & aSet);
75 
76 
83  template <typename TPoint>
84  static
85  bool
86  isCounterClockWise(const std::vector<TPoint> & aCurve);
87 
88 
89 
102  template <typename TIterator, typename TOutputIterator>
103  static
104  void
105  pixels2pixels8C(const TIterator &itb, const TIterator &ite, TOutputIterator out);
106 
107 
108 
109 
110  // ----------------------- Standard services ------------------------------
111 public:
112 
117 
118  // ----------------------- Interface --------------------------------------
119 public:
120 
125  void selfDisplay ( std::ostream & out ) const;
126 
131  bool isValid() const;
132 
133  // ------------------------- Protected Datas ------------------------------
134 private:
135  // ------------------------- Private Datas --------------------------------
136 private:
137 
138  // ------------------------- Hidden services ------------------------------
139 protected:
140 
146 
147 private:
148 
154  ContourHelper ( const ContourHelper & other );
155 
163 
164  // ------------------------- Internals ------------------------------------
165 private:
166 
167 }; // end of class ContourHelper
168 
169 
176 std::ostream&
177 operator<< ( std::ostream & out, const ContourHelper & object );
178 
179 
180 } // namespace DGtal
181 
182 
184 // Includes inline functions/methods.
185 #include "DGtal/geometry/helpers/ContourHelper.ih"
186 
187 // //
189 
190 #endif // !defined ContourHelper_h
191 
192 #undef ContourHelper_RECURSES
193 #endif // else defined(ContourHelper_RECURSES)
Aim: a helper class to process sequences of points.
Definition: ContourHelper.h:61
bool isValid() const
static DGtal::PointVector< TPoint::dimension, double > getBarycenter(const std::vector< TPoint > &aSet)
ContourHelper & operator=(const ContourHelper &other)
static void pixels2pixels8C(const TIterator &itb, const TIterator &ite, TOutputIterator out)
ContourHelper(const ContourHelper &other)
static bool isCounterClockWise(const std::vector< TPoint > &aCurve)
void selfDisplay(std::ostream &out) const
Aim: Implements basic operations that will be used in Point and Vector classes.
Definition: PointVector.h:593
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ATu0v1< TKSpace, TLinearAlgebra > &object)