LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::polygonApproximation Class Reference

Computes a polygon approximation for a given border point list. More...

#include <ltiPolygonApproximation.h>

Inheritance diagram for lti::polygonApproximation:
Inheritance graph
[legend]
Collaboration diagram for lti::polygonApproximation:
Collaboration graph
[legend]

List of all members.

Classes

class  parameters
 the parameters for the class polygonApproximation More...

Public Member Functions

 polygonApproximation ()
 polygonApproximation (const parameters &par)
 polygonApproximation (const polygonApproximation &other)
virtual ~polygonApproximation ()
virtual const char * getTypeName () const
bool apply (const borderPoints &src, polygonPoints &dest) const
bool apply (const borderPoints &src, const pointList &forcedVertices, polygonPoints &dest) const
polygonApproximationcopy (const polygonApproximation &other)
polygonApproximationoperator= (const polygonApproximation &other)
virtual functorclone () const
const parametersgetParameters () const

Detailed Description

Computes a polygon approximation for a given border point list.

This is just a wrapper functor for the method approximate of the lti::polygonPoints class.


Constructor & Destructor Documentation

lti::polygonApproximation::polygonApproximation (  ) 

default constructor

lti::polygonApproximation::polygonApproximation ( const parameters par  ) 

Construct a functor using the given parameters.

lti::polygonApproximation::polygonApproximation ( const polygonApproximation other  ) 

copy constructor

Parameters:
other the object to be copied
virtual lti::polygonApproximation::~polygonApproximation (  )  [virtual]

destructor


Member Function Documentation

bool lti::polygonApproximation::apply ( const borderPoints src,
const pointList forcedVertices,
polygonPoints dest 
) const

Approximate the given border points as a polygon, ensuring that the points in the given point list are inserted as vertices.

This point list must fulfill followint two conditions:

  1. It must have the same sequence than theBorderPoints.
  2. The points must be contained by the theBorderPoints

At the end of the approximation process the polygon-points-list contains the coordinates of the vertices.

Parameters:
src border points with the contour to be approximated
forcedVertices list of vertices that must be included in the polygon representation. This list must be a subset and respect the same ordering as in theBorderPoints
dest polygon approximation of the contour.
Returns:
true if apply successful or false otherwise.
bool lti::polygonApproximation::apply ( const borderPoints src,
polygonPoints dest 
) const

Approximate the given border points as a polygon.

At the end of the approximation process the polygon-points-list contains the coordinates of the vertices.

Parameters:
src border points with the contour that must be approximated
dest polygon approximation of the contour.
Returns:
true if apply successful or false otherwise.
virtual functor* lti::polygonApproximation::clone (  )  const [virtual]

returns a pointer to a clone of this functor.

Implements lti::functor.

polygonApproximation& lti::polygonApproximation::copy ( const polygonApproximation other  ) 

copy data of "other" functor.

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

Reimplemented from lti::functor.

const parameters& lti::polygonApproximation::getParameters (  )  const

returns used parameters

Reimplemented from lti::modifier.

virtual const char* lti::polygonApproximation::getTypeName (  )  const [virtual]

returns the name of this type ("polygonApproximation")

Reimplemented from lti::modifier.

polygonApproximation& lti::polygonApproximation::operator= ( const polygonApproximation other  ) 

alias for copy member

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

Reimplemented from lti::functor.


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

Generated on Sat Apr 10 15:27:41 2010 for LTI-Lib by Doxygen 1.6.1