Aim: a helper class to process sequences of points.
More...
#include <DGtal/geometry/helpers/ContourHelper.h>
|
template<typename TPoint > |
static DGtal::PointVector< TPoint::dimension, double > | getBarycenter (const std::vector< TPoint > &aSet) |
|
template<typename TPoint > |
static bool | isCounterClockWise (const std::vector< TPoint > &aCurve) |
|
template<typename TIterator , typename TOutputIterator > |
static void | pixels2pixels8C (const TIterator &itb, const TIterator &ite, TOutputIterator out) |
|
Aim: a helper class to process sequences of points.
Description of class 'ContourHelper'
- Todo:
- Improve class.
Definition at line 60 of file ContourHelper.h.
◆ ~ContourHelper()
DGtal::ContourHelper::~ContourHelper |
( |
| ) |
|
◆ ContourHelper() [1/2]
DGtal::ContourHelper::ContourHelper |
( |
| ) |
|
|
protected |
Constructor. Forbidden by default (protected to avoid g++ warnings).
◆ ContourHelper() [2/2]
DGtal::ContourHelper::ContourHelper |
( |
const ContourHelper & |
other | ) |
|
|
private |
Copy constructor.
- Parameters
-
other | the object to clone. Forbidden by default. |
◆ getBarycenter()
template<typename TPoint >
static DGtal::PointVector< TPoint::dimension, double > DGtal::ContourHelper::getBarycenter |
( |
const std::vector< TPoint > & |
aSet | ) |
|
|
static |
Compute the barycenter of a set of points.
- Parameters
-
[in] | aSet | the vector containing the set of points. |
- Returns
- the resulting mean point.
Referenced by testContourHelper().
◆ isCounterClockWise()
template<typename TPoint >
static bool DGtal::ContourHelper::isCounterClockWise |
( |
const std::vector< TPoint > & |
aCurve | ) |
|
|
static |
Checks if a polygonal curve given as a sequence of point is clockwise oriented or not.
- Parameters
-
[in] | aCurve | the vector containing the 2D polygonal curve. |
- Returns
- 'true' if the polygonal curve is counter clockwise oriented, 'false' otherwise.
Referenced by testContourHelper().
◆ isValid()
bool DGtal::ContourHelper::isValid |
( |
| ) |
const |
Checks the validity/consistency of the object.
- Returns
- 'true' if the object is valid, 'false' otherwise.
◆ operator=()
Assignment.
- Parameters
-
- Returns
- a reference on 'this'. Forbidden by default.
◆ pixels2pixels8C()
template<typename TIterator , typename TOutputIterator >
static void DGtal::ContourHelper::pixels2pixels8C |
( |
const TIterator & |
itb, |
|
|
const TIterator & |
ite, |
|
|
TOutputIterator |
out |
|
) |
| |
|
static |
Transforms an input contour into an 8 connected contour. The contour is given from two iterators on points. If the input sequence contains some points not 4-connected, they are are ignored but the transformation continues on the next parts of the contour.
- Parameters
-
[in] | itb | begin iterator associated to the input contour. |
[in] | ite | end iterator associated to the input contour. |
[out] | out | output iterator associated to the resulting contour. |
Referenced by testContourHelper().
◆ selfDisplay()
void DGtal::ContourHelper::selfDisplay |
( |
std::ostream & |
out | ) |
const |
Writes/Displays the object on an output stream.
- Parameters
-
[out] | out | the output stream where the object is written. |
The documentation for this class was generated from the following file: