latest version v1.9 - last update 10 Apr 2010 |
Computes a polygon approximation for a given border point list. More...
#include <ltiPolygonApproximation.h>
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 |
polygonApproximation & | copy (const polygonApproximation &other) |
polygonApproximation & | operator= (const polygonApproximation &other) |
virtual functor * | clone () const |
const parameters & | getParameters () const |
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.
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
other | the object to be copied |
virtual lti::polygonApproximation::~polygonApproximation | ( | ) | [virtual] |
destructor
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:
At the end of the approximation process the polygon-points-list contains the coordinates of the vertices.
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. |
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.
src | border points with the contour that must be approximated | |
dest | polygon approximation of the contour. |
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.
other | the functor to be copied |
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 | ) |