Aim: A utility class for constructing different shapes (balls, diamonds, and others).
More...
#include <DGtal/shapes/Shapes.h>
|
template<typename TDigitalSet , typename TShapeFunctor > |
static void | digitalShaper (TDigitalSet &aSet, const TShapeFunctor &aFunctor) |
|
template<typename TDigitalSet , typename TShapeFunctor > |
static void | euclideanShaper (TDigitalSet &aSet, const TShapeFunctor &aFunctor, const double h=1.0) |
|
template<typename DigitalSet , typename PointPredicate > |
static void | makeSetFromPointPredicate (DigitalSet &aSet, const PointPredicate &aPP) |
|
template<typename TDigitalSet > |
static void | addNorm1Ball (TDigitalSet &aSet, const Point &aCenter, UnsignedInteger aRadius) |
|
template<typename TDigitalSet > |
static void | addNorm2Ball (TDigitalSet &aSet, const Point &aCenter, UnsignedInteger aRadius) |
|
template<typename TDigitalSet > |
static void | removeNorm1Ball (TDigitalSet &aSet, const Point &aCenter, UnsignedInteger aRadius) |
|
template<typename TDigitalSet > |
static void | removeNorm2Ball (TDigitalSet &aSet, const Point &aCenter, UnsignedInteger aRadius) |
|
template<typename TDomain>
class DGtal::Shapes< TDomain >
Aim: A utility class for constructing different shapes (balls, diamonds, and others).
Description of template class 'Shapes'
- Template Parameters
-
TDomain | the type of the domain in which shapes are created. |
Definition at line 71 of file DGtal/shapes/Shapes.h.
◆ ConstIterator
template<typename TDomain >
◆ Domain
template<typename TDomain >
◆ Integer
template<typename TDomain >
◆ Point
template<typename TDomain >
◆ Predicate
template<typename TDomain >
◆ RealPoint
template<typename TDomain >
◆ Space
template<typename TDomain >
◆ UnsignedInteger
template<typename TDomain >
◆ Vector
template<typename TDomain >
◆ ~Shapes()
template<typename TDomain >
◆ Shapes() [1/2]
template<typename TDomain >
Constructor. Forbidden by default (protected to avoid g++ warnings).
◆ Shapes() [2/2]
template<typename TDomain >
Copy constructor.
- Parameters
-
other | the object to clone. Forbidden by default. |
◆ addNorm1Ball()
template<typename TDomain >
template<typename TDigitalSet >
Adds the discrete ball (norm-1) of center [aCenter] and radius [aRadius] to the (perhaps non empty) set [aSet].
- Warning
- deprecated Use implicitShaper instead.
- Template Parameters
-
TDigitalSet | the type chosen for the digital set. |
- Parameters
-
aSet | the set (modified) which will contain the discrete ball. |
aCenter | the center of the ball. |
aRadius | the radius of the ball. |
Referenced by testSurfelAdjacency().
◆ addNorm2Ball()
template<typename TDomain >
template<typename TDigitalSet >
Adds the discrete ball (norm-2) of center [aCenter] and radius [aRadius] to the (perhaps non empty) set [aSet].
- Warning
- deprecated Use implicitShaper instead.
- Template Parameters
-
TDigitalSet | the type chosen for the digital set. |
- Parameters
-
aSet | the set (modified) which will contain the discrete ball. |
aCenter | the center of the ball. |
aRadius | the radius of the ball. |
◆ BOOST_CONCEPT_ASSERT()
template<typename TDomain >
◆ digitalShaper()
template<typename TDomain >
template<typename TDigitalSet , typename TShapeFunctor >
static void DGtal::Shapes< TDomain >::digitalShaper |
( |
TDigitalSet & |
aSet, |
|
|
const TShapeFunctor & |
aFunctor |
|
) |
| |
|
static |
Adds to the (perhaps non empty) set [aSet] an shape defined by an instance of ShapeFunctor. Add Points where orientation is inside. The shape functor must be a model of CDigitalOrientedShape and CDigitalBoundedShape.
- Parameters
-
aSet | the set (modified) which will contain the shape. |
aFunctor | a functor defining the shape. |
- Template Parameters
-
TDigitalSet | a model of CDigitalSet. |
TShapeFunctor | a model of CDigitalBoundedShape and CDigitalOrientedShape. |
Referenced by main().
◆ euclideanShaper()
template<typename TDomain >
template<typename TDigitalSet , typename TShapeFunctor >
static void DGtal::Shapes< TDomain >::euclideanShaper |
( |
TDigitalSet & |
aSet, |
|
|
const TShapeFunctor & |
aFunctor, |
|
|
const double |
h = 1.0 |
|
) |
| |
|
static |
Adds to the (perhaps non empty) set [aSet] an shape defined by an instance of ShapeFunctor. Add Points where orientation is inside. The shape functor must be a model of CEuclideanOrientedShape and CEuclideanBoundedShape. The underlying digitization process is a Gauss Digitizer with grid step h.
- Parameters
-
aSet | the set (modified) which will contain the shape. |
aFunctor | a functor defining the shape. |
h | grid step for the Gauss digitization. |
- Template Parameters
-
TDigitalSet | a model of CDigitalSet. |
TShapeFunctor | a model of CEuclideanBoundedShape and CEuclideanOrientedShape. |
◆ isValid()
template<typename TDomain >
Checks the validity/consistency of the object.
- Returns
- 'true' if the object is valid, 'false' otherwise.
◆ makeSetFromPointPredicate()
template<typename TDomain >
template<typename DigitalSet , typename PointPredicate >
Add to the set aSet the points of the domain that satisfies the predicate aPP.
- Parameters
-
aSet | (modified) the digital set that will contain the points. |
aPP | a predicate on point. |
- Template Parameters
-
DigitalSet | a model of CDigitalSet such that DigitalSet::Domain is Domain. |
PointPredicate | a model of concepts::CPointPredicate such that PointPredicate::Point is Point. |
- Examples
- arithmetic/lower-integer-convex-hull.cpp.
Referenced by main().
◆ operator=()
template<typename TDomain >
Assignment.
- Parameters
-
- Returns
- a reference on 'this'. Forbidden by default.
◆ removeNorm1Ball()
template<typename TDomain >
template<typename TDigitalSet >
Removes the discrete ball (norm-1) of center [aCenter] and radius [aRadius] to the (perhaps non empty) set [aSet].
- Template Parameters
-
TDigitalSet | the type chosen for the digital set. |
- Parameters
-
aSet | the set (modified) which will contain the discrete ball. |
aCenter | the center of the ball. |
aRadius | the radius of the ball. |
◆ removeNorm2Ball()
template<typename TDomain >
template<typename TDigitalSet >
Removes the discrete ball (norm-2) of center [aCenter] and radius [aRadius] to the (perhaps non empty) set [aSet].
- Template Parameters
-
TDigitalSet | the type chosen for the digital set. |
- Parameters
-
aSet | the set (modified) which will contain the discrete ball. |
aCenter | the center of the ball. |
aRadius | the radius of the ball. |
◆ selfDisplay()
template<typename TDomain >
void DGtal::Shapes< TDomain >::selfDisplay |
( |
std::ostream & |
out | ) |
const |
Writes/Displays the object on an output stream.
- Parameters
-
out | the output stream where the object is written. |
The documentation for this class was generated from the following file: