Aim: Computes and stores sets of cells and provides methods to compute intersections of lattice and rational polytopes with cells.
More...
#include <DGtal/geometry/volumes/CellGeometry.h>
|
|
| ~CellGeometry ()=default |
|
| CellGeometry () |
|
| CellGeometry (const Self &other)=default |
|
| CellGeometry (Self &&other)=default |
|
| CellGeometry (const KSpace &K, Dimension min_cell_dim=0, Dimension max_cell_dim=KSpace::dimension, bool verbose=false) |
|
Self & | operator= (const Self &other)=default |
|
void | init (const KSpace &K, Dimension min_cell_dim=0, Dimension max_cell_dim=KSpace::dimension, bool verbose=false) |
|
|
void | addCellsTouchingPoint (const Point &p) |
|
void | addCellsTouchingPointel (const Cell &pointel) |
|
void | addCellsTouchingCell (const Cell &c) |
|
void | addCellsTouchingSegment (const Point &a, const Point &b) |
|
template<typename PointIterator > |
void | addCellsTouchingPoints (PointIterator itB, PointIterator itE) |
|
template<typename PointelIterator > |
void | addCellsTouchingPointels (PointelIterator itB, PointelIterator itE) |
|
void | addCellsTouchingPolytopePoints (const LatticePolytope &polytope) |
|
void | addCellsTouchingPolytopePoints (const RationalPolytope &polytope) |
|
void | addCellsTouchingPolytope (const LatticePolytope &polytope) |
|
void | addCellsTouchingPolytope (const RationalPolytope &polytope) |
|
CellGeometry & | operator+= (const CellGeometry &other) |
|
|
Size | nbCells () const |
|
Size | computeNbCells (const Dimension k) const |
|
Integer | computeEuler () const |
|
Dimension | minCellDim () const |
|
Dimension | maxCellDim () const |
|
std::vector< Point > | getKPoints (const Dimension k) const |
|
|
bool | subset (const CellGeometry &other) const |
|
bool | subset (const CellGeometry &other, const Dimension k) const |
|
|
std::vector< Point > | getIntersectedKPoints (const LatticePolytope &polytope, const Dimension i) const |
|
std::vector< Point > | getIntersectedKPoints (const RationalPolytope &polytope, const Dimension i) const |
|
std::vector< Point > | getTouchedKPoints (const std::vector< Point > &points, const Dimension i) const |
|
std::vector< Cell > | getIntersectedCells (const LatticePolytope &polytope, const Dimension i) const |
|
std::vector< Cell > | getIntersectedCells (const RationalPolytope &polytope, const Dimension i) const |
|
std::vector< Cell > | getTouchedCells (const std::vector< Point > &points, const Dimension i) const |
|
|
void | selfDisplay (std::ostream &out) const |
|
bool | isValid () const |
|
std::string | className () const |
|
|
template<typename RandomIterator > |
static bool | includes (RandomIterator it2, RandomIterator itE2, RandomIterator it1, RandomIterator itE1) |
|
template<typename TKSpace>
class DGtal::CellGeometry< TKSpace >
Aim: Computes and stores sets of cells and provides methods to compute intersections of lattice and rational polytopes with cells.
Description of template class 'CellGeometry'
It is a model of boost::CopyConstructible, boost::DefaultConstructible, boost::Assignable.
- Template Parameters
-
TKSpace | an arbitrary model of CCellularGridSpaceND. |
Definition at line 74 of file CellGeometry.h.
◆ BigInteger
template<typename TKSpace >
◆ Cell
template<typename TKSpace >
◆ Integer
template<typename TKSpace >
◆ KSpace
template<typename TKSpace >
◆ LatticePolytope
template<typename TKSpace >
◆ Point
template<typename TKSpace >
◆ Polytope
template<typename TKSpace >
◆ RationalPolytope
template<typename TKSpace >
◆ Self
template<typename TKSpace >
◆ Size
template<typename TKSpace >
◆ Space
template<typename TKSpace >
◆ Vector
template<typename TKSpace >
◆ ~CellGeometry()
template<typename TKSpace >
◆ CellGeometry() [1/4]
template<typename TKSpace >
◆ CellGeometry() [2/4]
template<typename TKSpace >
Copy constructor.
- Parameters
-
other | the object to clone. |
◆ CellGeometry() [3/4]
template<typename TKSpace >
Move constructor.
- Parameters
-
◆ CellGeometry() [4/4]
template<typename TKSpace >
Constructor from cellular space.
- Parameters
-
K | any cellular grid space. |
min_cell_dim | the minimum cell dimension that is used for processing. |
max_cell_dim | the maximal cell dimension that is used for processing (K::dimension - 1 is sufficient to check convexity). |
verbose | tells if verbose mode. |
◆ addCellsTouchingCell()
template<typename TKSpace >
Updates the cell cover with the cells whose boundary covers cell c (so c itself and its up-incident cells).
- Parameters
-
◆ addCellsTouchingPoint()
template<typename TKSpace >
Updates the cell cover with the cells touching a point p.
- Parameters
-
◆ addCellsTouchingPointel()
template<typename TKSpace >
Updates the cell cover with the cells touching a pointel pointel.
- Parameters
-
◆ addCellsTouchingPointels()
template<typename TKSpace >
template<typename PointelIterator >
void DGtal::CellGeometry< TKSpace >::addCellsTouchingPointels |
( |
PointelIterator |
itB, |
|
|
PointelIterator |
itE |
|
) |
| |
Updates the cell cover with the cells touching a range of digital pointels [itB, itE).
◆ addCellsTouchingPoints()
template<typename TKSpace >
template<typename PointIterator >
void DGtal::CellGeometry< TKSpace >::addCellsTouchingPoints |
( |
PointIterator |
itB, |
|
|
PointIterator |
itE |
|
) |
| |
Updates the cell cover with the cells touching a range of digital points [itB, itE).
◆ addCellsTouchingPolytope() [1/2]
template<typename TKSpace >
Updates the cell cover with all the cells touching the lattice polytope (all cells whose closure have a non empty intersection with the polytope).
- Parameters
-
polytope | the lattice polytope |
◆ addCellsTouchingPolytope() [2/2]
template<typename TKSpace >
Updates the cell cover with all the cells touching the rational polytope (all cells whose closure have a non empty intersection with the polytope).
- Parameters
-
polytope | the rational polytope |
◆ addCellsTouchingPolytopePoints() [1/2]
template<typename TKSpace >
Updates the cell cover with the cells touching the lattice points of a polytope.
- Parameters
-
polytope | the lattice polytope |
◆ addCellsTouchingPolytopePoints() [2/2]
template<typename TKSpace >
Updates the cell cover with the cells touching the lattice points of a rational polytope.
- Parameters
-
polytope | the rational polytope |
◆ addCellsTouchingSegment()
template<typename TKSpace >
Given two points a and b, updates the cell cover with all the cells intersected by the Euclidean straight segment from a to b.
- Parameters
-
- Note
- Three times faster than building a (degenerated) lattice polytope and then calling addCellsTouchingPolytope.
◆ BOOST_CONCEPT_ASSERT()
template<typename TKSpace >
◆ className()
template<typename TKSpace >
- Returns
- the class name. It is notably used for drawing this object.
◆ computeEuler()
template<typename TKSpace >
- Returns
- computes and return the Euler chracteristic of this set of cells.
◆ computeNbCells()
template<typename TKSpace >
- Parameters
-
k | any non negative integer |
- Returns
- computes and returns the number of k-dimensional cells in this cell geometry.
◆ dim()
template<typename TKSpace >
- Parameters
-
kp | a Khalimsky point (i.e. an integer point whose coordinates parities correspond to cells). |
- Returns
- the dimension of the cell associated to this Khalimsky point.
◆ getIntersectedCells() [1/2]
template<typename TKSpace >
Given a lattice polytope, such that polytope.canBeSummed()==true
, return the i-cells that intersect it.
- Parameters
-
polytope | any lattice polytope such that polytope.canBeSummed() == true |
i | any integer between 0 and KSpace::dimension |
- Returns
- the i-cells that intersect this polytope.
◆ getIntersectedCells() [2/2]
template<typename TKSpace >
Given a rational polytope, such that polytope.canBeSummed()==true
, return the i-cells that intersect it.
- Parameters
-
polytope | any rational polytope such that polytope.canBeSummed() == true |
i | any integer between 0 and KSpace::dimension |
- Returns
- the i-cells that intersect this polytope.
◆ getIntersectedKPoints() [1/2]
template<typename TKSpace >
Given a lattice polytope, such that polytope.canBeSummed()==true
, return the i-kpoints that intersect it.
- Parameters
-
polytope | any lattice polytope such that polytope.canBeSummed() == true |
i | any integer between 0 and KSpace::dimension |
- Returns
- the i-kpoints that intersect this polytope.
◆ getIntersectedKPoints() [2/2]
template<typename TKSpace >
Given a rational polytope, such that polytope.canBeSummed()==true
, return the i-kpoints that intersect it.
- Parameters
-
polytope | any rational polytope such that polytope.canBeSummed() == true |
i | any integer between 0 and KSpace::dimension |
- Returns
- the i-kpoints that intersect this polytope.
◆ getKPoints()
template<typename TKSpace >
- Parameters
-
k | any non negative integer |
- Returns
- the vector of k-cells, represented as points with Khalimsky coordinates.
◆ getTouchedCells()
template<typename TKSpace >
Given a vector of points, return the i-cells that touch it.
- Parameters
-
points | any vector of points |
i | any integer between 0 and KSpace::dimension (and limited to 5-D at most). |
- Returns
- the i-cells that intersect this polytope.
◆ getTouchedKPoints()
template<typename TKSpace >
Given a vector of points, return the i-kpoints that touch it.
- Parameters
-
points | any vector of points |
i | any integer between 0 and KSpace::dimension (and limited to 5-D at most). |
- Returns
- the i-kpoints that intersect this polytope.
◆ includes()
template<typename TKSpace >
template<typename RandomIterator >
static bool DGtal::CellGeometry< TKSpace >::includes |
( |
RandomIterator |
it2, |
|
|
RandomIterator |
itE2, |
|
|
RandomIterator |
it1, |
|
|
RandomIterator |
itE1 |
|
) |
| |
|
staticprivate |
◆ init()
template<typename TKSpace >
Initialization from cellular space. If there was cells stored in this object, they are removed.
- Parameters
-
K | any cellular grid space. |
min_cell_dim | the minimum cell dimension that is used for processing. |
max_cell_dim | the maximal cell dimension that is used for processing (K::dimension - 1 is sufficient to check convexity) |
verbose | tells if verbose mode. |
◆ isValid()
template<typename TKSpace >
Checks the validity/consistency of the object.
- Returns
- 'true' if the object is valid, 'false' otherwise.
◆ maxCellDim()
template<typename TKSpace >
- Returns
- the highest dimension for which cells are stored in this object.
◆ minCellDim()
template<typename TKSpace >
- Returns
- the smallest dimension for which cells are stored in this object.
◆ nbCells()
template<typename TKSpace >
- Returns
- the total number of cells in this cell geometry.
◆ operator+=()
template<typename TKSpace >
Adds the cells of dimension k of object other, for minCellDim() <= k <= maxCellDim()
, to this cell geometry.
- Parameters
-
- Returns
- a reference to this object.
◆ operator=()
template<typename TKSpace >
Assignment.
- Parameters
-
- Returns
- a reference on 'this'.
◆ selfDisplay()
template<typename TKSpace >
Writes/Displays the object on an output stream.
- Parameters
-
out | the output stream where the object is written. |
◆ subset() [1/2]
template<typename TKSpace >
Tells if the cells of 'this' are subset of the cells of other, for all valid dimensions of 'this' (i.e. from myMinCellDim till myMaxCellDim).
- Parameters
-
other | any cell geometry object |
- Returns
- 'true' iff the cells of 'this' are subset of the cells of other.
- Note
- if
other.maxCellDim() < k
or k < other.minCellDim()
then it means that other contains no cell of dimension k.
◆ subset() [2/2]
template<typename TKSpace >
Tells if the k-cells of 'this' are subset of the k-cells of other.
- Parameters
-
other | any cell geometry object |
k | any valid dimension for cells (0 <= k <= KSpace::dimension ) |
- Returns
- 'true' iff the k-cells of 'this' are subset of the k-cells of other.
- Note
- if
other.maxCellDim() < k
or k < other.minCellDim()
then it means that other contains no cell of dimension k.
◆ dimension
template<typename TKSpace >
◆ myK
template<typename TKSpace >
◆ myKPoints
template<typename TKSpace >
◆ myMaxCellDim
template<typename TKSpace >
◆ myMinCellDim
template<typename TKSpace >
◆ myVerbose
template<typename TKSpace >
The documentation for this class was generated from the following file: