DGtal  0.9.3beta
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions
DGtal::ContourHelper Class Reference

#include <DGtal/geometry/helpers/ContourHelper.h>

Public Member Functions

 ~ContourHelper ()
 
void selfDisplay (std::ostream &out) const
 
bool isValid () const
 

Static Public Member Functions

template<typename TPoint >
static TPoint getMeanPoint (const std::vector< TPoint > &aContour)
 
template<typename TPoint >
static bool isCounterClockWise (const std::vector< TPoint > &aContour)
 

Protected Member Functions

 ContourHelper ()
 

Private Member Functions

 ContourHelper (const ContourHelper &other)
 
ContourHelperoperator= (const ContourHelper &other)
 

Detailed Description

Aim: a helper class to process sequences of points.

Description of class 'ContourHelper'

Todo:
Improve class.

Definition at line 59 of file ContourHelper.h.

Constructor & Destructor Documentation

DGtal::ContourHelper::~ContourHelper ( )

Destructor.

DGtal::ContourHelper::ContourHelper ( )
protected

Constructor. Forbidden by default (protected to avoid g++ warnings).

DGtal::ContourHelper::ContourHelper ( const ContourHelper other)
private

Copy constructor.

Parameters
otherthe object to clone. Forbidden by default.

Member Function Documentation

template<typename TPoint >
static TPoint DGtal::ContourHelper::getMeanPoint ( const std::vector< TPoint > &  aContour)
static

Compute the barycenter of the 2D contour.

Parameters
aContourthe vector containing the 2D contour coordinates.
Returns
the resulting mean point.
template<typename TPoint >
static bool DGtal::ContourHelper::isCounterClockWise ( const std::vector< TPoint > &  aContour)
static

Checks if a contour given as a sequence of point is clockwise oriented or not.

Parameters
aContourthe vector containing the 2D contour coordinates.
Returns
'true' if the contour is counter clockwise oriented, 'false' otherwise.
bool DGtal::ContourHelper::isValid ( ) const

Checks the validity/consistency of the object.

Returns
'true' if the object is valid, 'false' otherwise.
ContourHelper& DGtal::ContourHelper::operator= ( const ContourHelper other)
private

Assignment.

Parameters
otherthe object to copy.
Returns
a reference on 'this'. Forbidden by default.
void DGtal::ContourHelper::selfDisplay ( std::ostream &  out) const

Writes/Displays the object on an output stream.

Parameters
outthe output stream where the object is written.

The documentation for this class was generated from the following file: