DGtal 1.4.0
|
The aim of this class is to compute the measure in the Lebesgues sense of the set of straight lines associated to domains defined as polygons in the (a,b)-parameter space. This parameter space maps the line $ax-y+b=0$ to the point $(a,b)$. More...
#include <DGtal/math/MeasureOfStraightLines.h>
Public Member Functions | |
MeasureOfStraightLines () | |
~MeasureOfStraightLines () | |
void | selfDisplay (std::ostream &out) const |
bool | isValid () const |
double | computeMeasure (const std::vector< double > &a, const std::vector< double > &b) |
double | computeCentroidA (const std::vector< double > &a, const std::vector< double > &b) |
double | computeCentroidB (const std::vector< double > &a, const std::vector< double > &b) |
void | setEpsilon (const double aValue) |
Private Member Functions | |
MeasureOfStraightLines (const MeasureOfStraightLines &other) | |
MeasureOfStraightLines & | operator= (const MeasureOfStraightLines &other) |
double | computeMeasureEdge (double a0, double b0, double a1, double b1) |
double | computeCentroidEdge_a (double a0, double b0, double a1, double b1) |
double | computeCentroidEdge_b (double a0, double b0, double a1, double b1) |
double | __computeCentroidTriApprox_b (double a0, double b0, double a1, double b1) |
double | __computeCentroidEdgeApprox_b (double a0, double b0, double a1, double b1) |
double | __computeCentroidSquare_b (double x1, double y1, double x2, double y2) |
int | sign (const double a) |
Private Attributes | |
double | myEpsilon |
The aim of this class is to compute the measure in the Lebesgues sense of the set of straight lines associated to domains defined as polygons in the (a,b)-parameter space. This parameter space maps the line $ax-y+b=0$ to the point $(a,b)$.
Description of class 'MeasureOfStraightLines'
Aim:
* @inproceedings{COEURJOLLY:2009:HAL-00432711:1, * title = { {M}easure of {S}traight {L}ines and its {A}pplications in {D}igital {G}eometry}, * author = {{C}oeurjolly, {D}avid and {S}ivignon, {I}sabelle}, * booktitle = {13th {I}nternational {W}orkshop on {C}ombinatorial {I}mage {A}nalysis 13th {I}nternational {W}orkshop on {C}ombinatorial {I}mage {A}nalysis }, * publisher = {{R}esearch {P}ublishing {S}ervices }, * pages = {1-12 }, * address = {{C}ancun {M}exique }, * audience = {internationale }, * year = {2009}, * URL = {http://hal.archives-ouvertes.fr/hal-00432711/PDF/mesure.pdf}, * } *
Definition at line 79 of file MeasureOfStraightLines.h.
DGtal::MeasureOfStraightLines::MeasureOfStraightLines | ( | ) |
Constructor.
DGtal::MeasureOfStraightLines::~MeasureOfStraightLines | ( | ) |
Destructor.
|
private |
Copy constructor.
other | the object to clone. Forbidden by default. |
|
private |
Approximate the centroid on 'b' on the trapezioid (a0,0)-(a0,b0)-(a1,b1)-(a1,0) (internal function)
a0 | abscissa first point. |
b0 | ordinate of the first point. |
a1 | abscissa of the second point. |
b1 | ordinate of the second point. |
|
private |
Compute the centroid on 'b' on the rectangular domain with vertices (x1,,y1) - (x2,y2)
x1 | abscissa first point. |
y1 | ordinate of the first point. |
x2 | abscissa of the second point. |
y2 | ordinate of the second point. |
|
private |
Approximate the centroid on 'b' on the triangle (0,0)-(a0,b0)-(a1,b1) (internal function)
a0 | abscissa first point. |
b0 | ordinate of the first point. |
a1 | abscissa of the second point. |
b1 | ordinate of the second point. |
double DGtal::MeasureOfStraightLines::computeCentroidA | ( | const std::vector< double > & | a, |
const std::vector< double > & | b ) |
Compute the abscissa of the centroid of the polygon {(a_i,b_i)} in the (a,b)-parameter space with respect to the measure of lines.
REQUIREMENTS:
a | the a-value of polygon vertices |
b | the b-value of polygon vertices |
Referenced by testUnitSquareCentroid().
double DGtal::MeasureOfStraightLines::computeCentroidB | ( | const std::vector< double > & | a, |
const std::vector< double > & | b ) |
Compute the ordinate of the centroid of the polygon {(a_i,b_i)} in the (a,b)-parameter space with respect to the measure of lines. Note that there is a numerical approximation is performed.
REQUIREMENTS:
a | the a-value of polygon vertices |
b | the b-value of polygon vertices |
Referenced by testUnitSquareCentroid().
|
private |
Compute the abscissa of the centroid associated to an edge (a0,b0)-(a1,b1) It returns the measure of the triangle defined by the origin and the edge.
a0 | abscissa first point. |
b0 | ordinate of the first point. |
a1 | abscissa of the second point. |
b1 | ordinate of the second point. |
|
private |
Compute the ordinate of the centroid associated to an edge (a0,b0)-(a1,b1) It returns the measure of the triangle defined by the origin and the edge.
a0 | abscissa first point. |
b0 | ordinate of the first point. |
a1 | abscissa of the second point. |
b1 | ordinate of the second point. |
double DGtal::MeasureOfStraightLines::computeMeasure | ( | const std::vector< double > & | a, |
const std::vector< double > & | b ) |
Compute the measure of the polygon {(a_i,b_i)} in the (a,b)-parameter space
REQUIREMENTS:
a | the a-value of polygon vertices |
b | the b-value of polygon vertices |
Referenced by testUnitSquare().
|
private |
Compute the measure associated to an edge (a0,b0)-(a1,b1) It returns the measure of the triangle defined by the origin and the edge.
a0 | abscissa first point. |
b0 | ordinate of the first point. |
a1 | abscissa of the second point. |
b1 | ordinate of the second point. |
bool DGtal::MeasureOfStraightLines::isValid | ( | ) | const |
Checks the validity/consistency of the object.
|
private |
Assignment.
other | the object to copy. |
void DGtal::MeasureOfStraightLines::selfDisplay | ( | std::ostream & | out | ) | const |
Writes/Displays the object on an output stream.
out | the output stream where the object is written. |
void DGtal::MeasureOfStraightLines::setEpsilon | ( | const double | aValue | ) |
Set the internal Epsilon threshold for the numerical approximation.
aValue | the new epsilon value |
|
private |
a | a value |
|
private |
Definition at line 171 of file MeasureOfStraightLines.h.