DGtal 1.4.0
Loading...
Searching...
No Matches
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
50namespace DGtal
51{
52
54// class ContourHelper
61{
62 // ----------------------- Static services ------------------------------
63public:
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 ------------------------------
111public:
112
117
118 // ----------------------- Interface --------------------------------------
119public:
120
125 void selfDisplay ( std::ostream & out ) const;
126
131 bool isValid() const;
132
133 // ------------------------- Protected Datas ------------------------------
134private:
135 // ------------------------- Private Datas --------------------------------
136private:
137
138 // ------------------------- Hidden services ------------------------------
139protected:
140
146
147private:
148
154 ContourHelper ( const ContourHelper & other );
155
163
164 // ------------------------- Internals ------------------------------------
165private:
166
167}; // end of class ContourHelper
168
169
176std::ostream&
177operator<< ( 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.
ContourHelper & operator=(const ContourHelper &other)
bool isValid() const
static DGtal::PointVector< TPoint::dimension, double > getBarycenter(const std::vector< TPoint > &aSet)
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.
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)