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. |
- Examples
- arithmetic/lower-integer-convex-hull.cpp, geometry/tools/exampleAlphaShape.cpp, geometry/tools/exampleConvexHull2D.cpp, graph/graphTraversal.cpp, io/boards/dgtalBoard2D-2-sets.cpp, io/boards/dgtalBoard2D-4-colormaps.cpp, io/boards/dgtalBoard3D-6-clipping.cpp, io/boards/dgtalBoard3DTo2D-2-sets.cpp, io/boards/dgtalBoard3DTo2D-2bis-sets.cpp, io/boards/dgtalBoard3DTo2D-3-objects.cpp, io/boards/dgtalBoard3DTo2D-6.cpp, io/viewers/viewer3D-2-sets.cpp, io/viewers/viewer3D-3-objects.cpp, io/viewers/viewer3D-6-clipping.cpp, shapes/exampleEuclideanShapesDecorator.cpp, topology/area-estimation-with-digital-surface.cpp, topology/area-estimation-with-indexed-digital-surface.cpp, and topology/digitalSetToCubicalComplexes2D.cpp.
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 >
◆ addNorm2Ball()
template<typename TDomain >
template<typename TDigitalSet >
◆ 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 getComplex(), main(), and testDigitization().
◆ 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. |
Referenced by alphaShape(), convexHull(), testDTFromSet(), testImplicitShape(), and testImplicitShape3D().
◆ 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 >
◆ 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. |
Referenced by testDigitalSetBoundary(), and testDigitalSurface().
◆ 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: