DGtal 1.3.0
|
Aim: This class is a model of CCellularGridSpaceND. It represents the cubical grid as a cell complex, whose cells are defined as an array of integers. The topology of the cells is defined by the parity of the coordinates (even: closed, odd: open). More...
#include <DGtal/topology/KhalimskySpaceND.h>
Data Structures | |
struct | CellMap |
struct | SCellMap |
struct | SurfelMap |
Public Types | |
enum | Closure { CLOSED , OPEN , PERIODIC } |
Boundaries closure type. More... | |
typedef TInteger | Integer |
Arithmetic ring induced by (+,-,*) and Integer numbers. More... | |
typedef NumberTraits< Integer >::UnsignedVersion | Size |
Type used to represent sizes in the digital space. More... | |
typedef SpaceND< dim, Integer > | Space |
typedef KhalimskySpaceND< dim, Integer > | CellularGridSpace |
typedef KhalimskyPreSpaceND< dim, Integer > | PreCellularGridSpace |
typedef KhalimskyCell< dim, Integer > | Cell |
typedef KhalimskyPreCell< dim, Integer > | PreCell |
typedef SignedKhalimskyCell< dim, Integer > | SCell |
typedef SignedKhalimskyPreCell< dim, Integer > | SPreCell |
typedef SCell | Surfel |
typedef bool | Sign |
using | DirIterator = typename PreCellularGridSpace::DirIterator |
typedef PointVector< dim, Integer > | Point |
typedef PointVector< dim, Integer > | Vector |
template<typename CellType > | |
using | AnyCellCollection = typename PreCellularGridSpace::template AnyCellCollection< CellType > |
typedef AnyCellCollection< Cell > | Cells |
typedef AnyCellCollection< SCell > | SCells |
typedef std::set< Cell > | CellSet |
Preferred type for defining a set of Cell(s). More... | |
typedef std::set< SCell > | SCellSet |
Preferred type for defining a set of SCell(s). More... | |
typedef std::set< SCell > | SurfelSet |
Preferred type for defining a set of surfels (always signed cells). More... | |
Public Member Functions | |
Standard services | |
~KhalimskySpaceND () | |
Destructor. More... | |
KhalimskySpaceND () | |
Default constructor. More... | |
KhalimskySpaceND (const KhalimskySpaceND &other)=default | |
Copy constructor. More... | |
KhalimskySpaceND & | operator= (const KhalimskySpaceND &other)=default |
Copy operator. More... | |
KhalimskySpaceND (KhalimskySpaceND &&other)=default | |
Move constructor. More... | |
KhalimskySpaceND & | operator= (KhalimskySpaceND &&other)=default |
Move operator. More... | |
bool | init (const Point &lower, const Point &upper, bool isClosed) |
Specifies the upper and lower bounds for the maximal cells in this space. More... | |
bool | init (const Point &lower, const Point &upper, Closure closure) |
Specifies the upper and lower bounds for the maximal cells in this space. More... | |
bool | init (const Point &lower, const Point &upper, const std::array< Closure, dim > &closure) |
Specifies the upper and lower bounds for the maximal cells in this space. More... | |
Basic services | |
Size | size (Dimension k) const |
Return the width of the space in the k-dimension. More... | |
Integer | min (Dimension k) const |
Return the minimal digital coordinate in the k-dimension. More... | |
Integer | max (Dimension k) const |
Return the maximal digital coordinate in the k-dimension. More... | |
const Point & | lowerBound () const |
Return the lower bound for digital points in this space. More... | |
const Point & | upperBound () const |
Return the upper bound for digital points in this space. More... | |
const Cell & | lowerCell () const |
Return the lower bound for cells in this space. More... | |
const Cell & | upperCell () const |
Return the upper bound for cells in this space. More... | |
bool | uIsValid (const PreCell &c, Dimension k) const |
Returns true if the given unsigned cell has his k-th Khalimsky coordinate between those of the cells returned by lowerCell and upperCell. More... | |
bool | uIsValid (const PreCell &c) const |
Returns true if the given unsigned cell has Khalimsky coordinates between those of the cells returned by lowerCell and upperCell. More... | |
bool | sIsValid (const SPreCell &c, Dimension k) const |
Returns true if the given signed cell his k-th Khalimsky coordinate between those of the cells returned by lowerCell and upperCell. More... | |
bool | sIsValid (const SPreCell &c) const |
Returns true if the given signed cell has Khalimsky coordinates between those of the cells returned by lowerCell and upperCell. More... | |
bool | cIsValid (const Point &p, Dimension k) const |
Returns true if the given cell has his k-th Khalimsky coordinate between those of the cells returned by lowerCell and upperCell. More... | |
bool | cIsValid (const Point &p) const |
Returns true if the given cell has Khalimsky coordinates between those of the cells returned by lowerCell and upperCell. More... | |
Closure type query | |
bool | isSpaceClosed () const |
Return 'true' iff the space is closed or periodic along every dimension. More... | |
bool | isSpaceClosed (Dimension k) const |
Return 'true' iff the space is closed or periodic along the specified dimension. More... | |
bool | isSpacePeriodic () const |
Return 'true' iff the space is periodic along every dimension. More... | |
bool | isSpacePeriodic (Dimension k) const |
Return 'true' iff the space is periodic along the specified dimension. More... | |
bool | isAnyDimensionPeriodic () const |
Return 'true' iff the space is periodic along at least one dimension. More... | |
Closure | getClosure (Dimension k) const |
Gets closure type. More... | |
Cell creation services | |
Cell | uCell (const PreCell &c) const |
From an unsigned cell, returns an unsigned cell lying into this Khalismky space. More... | |
Cell | uCell (const Point &kp) const |
From the Khalimsky coordinates of a cell, builds the corresponding unsigned cell lying into this Khalismky space. More... | |
Cell | uCell (Point p, const PreCell &c) const |
From the digital coordinates of a point in Zn and a cell type, builds the corresponding unsigned cell lying into this Khalismky space. More... | |
SCell | sCell (const SPreCell &c) const |
From a signed cell, returns a signed cell lying into this Khalismky space. More... | |
SCell | sCell (const Point &kp, Sign sign=POS) const |
From the Khalimsky coordinates of a cell and a sign, builds the corresponding signed cell lying into this Khalismky space. More... | |
SCell | sCell (Point p, const SPreCell &c) const |
From the digital coordinates of a point in Zn and a signed cell type, builds the corresponding signed cell lying into this Khalismky space. More... | |
Cell | uSpel (Point p) const |
From the digital coordinates of a point in Zn, builds the corresponding spel (cell of maximal dimension) lying into this Khalismky space. More... | |
SCell | sSpel (Point p, Sign sign=POS) const |
From the digital coordinates of a point in Zn, builds the corresponding spel (cell of maximal dimension) lying into this Khalismky space. More... | |
Cell | uPointel (Point p) const |
From the digital coordinates of a point in Zn, builds the corresponding pointel (cell of dimension 0) lying into this Khalismky space. More... | |
SCell | sPointel (Point p, Sign sign=POS) const |
From the digital coordinates of a point in Zn, builds the corresponding pointel (cell of dimension 0) lying into this Khalismky space. More... | |
Read accessors to cells | |
Integer | uKCoord (const Cell &c, Dimension k) const |
Return its Khalimsky coordinate along [k]. More... | |
Integer | uCoord (const Cell &c, Dimension k) const |
Return its digital coordinate along [k]. More... | |
const Point & | uKCoords (const Cell &c) const |
Return its Khalimsky coordinates. More... | |
Point | uCoords (const Cell &c) const |
Return its digital coordinates. More... | |
Integer | sKCoord (const SCell &c, Dimension k) const |
Return its Khalimsky coordinate along [k]. More... | |
Integer | sCoord (const SCell &c, Dimension k) const |
Return its digital coordinate along [k]. More... | |
const Point & | sKCoords (const SCell &c) const |
Return its Khalimsky coordinates. More... | |
Point | sCoords (const SCell &c) const |
Return its digital coordinates. More... | |
Sign | sSign (const SCell &c) const |
Return its sign. More... | |
Write accessors to cells | |
void | uSetKCoord (Cell &c, Dimension k, Integer i) const |
Sets the [k]-th Khalimsky coordinate of [c] to [i]. More... | |
void | sSetKCoord (SCell &c, Dimension k, Integer i) const |
Sets the [k]-th Khalimsky coordinate of [c] to [i]. More... | |
void | uSetCoord (Cell &c, Dimension k, Integer i) const |
Sets the [k]-th digital coordinate of [c] to [i]. More... | |
void | sSetCoord (SCell &c, Dimension k, Integer i) const |
Sets the [k]-th digital coordinate of [c] to [i]. More... | |
void | uSetKCoords (Cell &c, const Point &kp) const |
Sets the Khalimsky coordinates of [c] to [kp]. More... | |
void | sSetKCoords (SCell &c, const Point &kp) const |
Sets the Khalimsky coordinates of [c] to [kp]. More... | |
void | uSetCoords (Cell &c, const Point &kp) const |
Sets the digital coordinates of [c] to [kp]. More... | |
void | sSetCoords (SCell &c, const Point &kp) const |
Sets the digital coordinates of [c] to [kp]. More... | |
void | sSetSign (SCell &c, Sign s) const |
Sets the sign of the cell. More... | |
Conversion signed/unsigned | |
SCell | signs (const Cell &p, Sign s) const |
Creates a signed cell from an unsigned one and a given sign. More... | |
Cell | unsigns (const SCell &p) const |
Creates an unsigned cell from a signed one. More... | |
SCell | sOpp (const SCell &p) const |
Creates the signed cell with the inverse sign of [p]. More... | |
Cell topology services | |
Integer | uTopology (const Cell &p) const |
Return the topology word of [p]. More... | |
Integer | sTopology (const SCell &p) const |
Return the topology word of [p]. More... | |
Dimension | uDim (const Cell &p) const |
Return the dimension of the cell [p]. More... | |
Dimension | sDim (const SCell &p) const |
Return the dimension of the cell [p]. More... | |
bool | uIsSurfel (const Cell &b) const |
Return 'true' if [b] is a surfel (spans all but one coordinate). More... | |
bool | sIsSurfel (const SCell &b) const |
Return 'true' if [b] is a surfel (spans all but one coordinate). More... | |
bool | uIsOpen (const Cell &p, Dimension k) const |
Return 'true' if [p] is open along the direction [k]. More... | |
bool | sIsOpen (const SCell &p, Dimension k) const |
Return 'true' if [p] is open along the direction [k]. More... | |
Iterator services for cells | |
DirIterator | uDirs (const Cell &p) const |
Given an unsigned cell [p], returns an iterator to iterate over each coordinate the cell spans. More... | |
DirIterator | sDirs (const SCell &p) const |
Given a signed cell [p], returns an iterator to iterate over each coordinate the cell spans. More... | |
DirIterator | uOrthDirs (const Cell &p) const |
Given an unsigned cell [p], returns an iterator to iterate over each coordinate the cell does not span. More... | |
DirIterator | sOrthDirs (const SCell &p) const |
Given a signed cell [p], returns an iterator to iterate over each coordinate the cell does not span. More... | |
Dimension | uOrthDir (const Cell &s) const |
Given an unsigned surfel [s], returns its orthogonal direction (ie, the coordinate where the surfel is closed). More... | |
Dimension | sOrthDir (const SCell &s) const |
Given a signed surfel [s], returns its orthogonal direction (ie, the coordinate where the surfel is closed). More... | |
Unsigned cell geometry services | |
Integer | uFirst (const PreCell &p, Dimension k) const |
Return the k-th Khalimsky coordinate of the first cell of the space with the same type as [p]. More... | |
Cell | uFirst (const PreCell &p) const |
Return the first cell of the space with the same type as [p]. More... | |
Integer | uLast (const PreCell &p, Dimension k) const |
Return the k-th Khalimsky coordinate of the last cell of the space with the same type as [p]. More... | |
Cell | uLast (const PreCell &p) const |
Return the last cell of the space with the same type as [p]. More... | |
Cell | uGetIncr (const Cell &p, Dimension k) const |
Return the same element as [p] except for the incremented coordinate [k]. More... | |
bool | uIsMax (const Cell &p, Dimension k) const |
Useful to check if you are going out of the space. More... | |
bool | uIsInside (const PreCell &p, Dimension k) const |
Useful to check if you are going out of the space. More... | |
bool | uIsInside (const PreCell &p) const |
Useful to check if you are going out of the space. More... | |
bool | cIsInside (const Point &p, Dimension k) const |
Useful to check if you are going out of the space. More... | |
bool | cIsInside (const Point &p) const |
Useful to check if you are going out of the space. More... | |
Cell | uGetMax (Cell p, Dimension k) const |
Useful to check if you are going out of the space. More... | |
Cell | uGetDecr (const Cell &p, Dimension k) const |
Return the same element as [p] except for an decremented coordinate [k]. More... | |
bool | uIsMin (const Cell &p, Dimension k) const |
Useful to check if you are going out of the space. More... | |
Cell | uGetMin (Cell p, Dimension k) const |
Useful to check if you are going out of the space. More... | |
Cell | uGetAdd (const Cell &p, Dimension k, Integer x) const |
Return the same element as [p] except for a coordinate [k] incremented with x. More... | |
Cell | uGetSub (const Cell &p, Dimension k, Integer x) const |
Return the same element as [p] except for a coordinate [k] decremented with x. More... | |
Integer | uDistanceToMax (const Cell &p, Dimension k) const |
Useful to check if you are going out of the space (for non-periodic dimensions). More... | |
Integer | uDistanceToMin (const Cell &p, Dimension k) const |
Useful to check if you are going out of the space (for non-periodic dimensions). More... | |
Cell | uTranslation (const Cell &p, const Vector &vec) const |
Add the vector [vec] to [p]. More... | |
Cell | uProjection (const Cell &p, const Cell &bound, Dimension k) const |
Return the projection of [p] along the [k]th direction toward [bound]. More... | |
void | uProject (Cell &p, const Cell &bound, Dimension k) const |
Projects [p] along the [k]th direction toward [bound]. More... | |
bool | uNext (Cell &p, const Cell &lower, const Cell &upper) const |
Increment the cell [p] to its next position (as classically done in a scanning). More... | |
Signed cell geometry services | |
Integer | sFirst (const SPreCell &p, Dimension k) const |
Return the k-th coordinate of the first cell of the space with the same type as [p]. More... | |
SCell | sFirst (const SPreCell &p) const |
Return the first cell of the space with the same type as [p]. More... | |
Integer | sLast (const SPreCell &p, Dimension k) const |
Return the k-th Khalimsky coordinate of the last cell of the space with the same type as [p]. More... | |
SCell | sLast (const SPreCell &p) const |
Return the last cell of the space with the same type as [p]. More... | |
SCell | sGetIncr (const SCell &p, Dimension k) const |
Return the same element as [p] except for the incremented coordinate [k]. More... | |
bool | sIsMax (const SCell &p, Dimension k) const |
Useful to check if you are going out of the space. More... | |
bool | sIsInside (const SPreCell &p, Dimension k) const |
Useful to check if you are going out of the space. More... | |
bool | sIsInside (const SPreCell &p) const |
Useful to check if you are going out of the space. More... | |
SCell | sGetMax (SCell p, Dimension k) const |
Useful to check if you are going out of the space. More... | |
SCell | sGetDecr (const SCell &p, Dimension k) const |
Return the same element as [p] except for an decremented coordinate [k]. More... | |
bool | sIsMin (const SCell &p, Dimension k) const |
Useful to check if you are going out of the space. More... | |
SCell | sGetMin (SCell p, Dimension k) const |
Useful to check if you are going out of the space. More... | |
SCell | sGetAdd (const SCell &p, Dimension k, Integer x) const |
Return the same element as [p] except for a coordinate [k] incremented with x. More... | |
SCell | sGetSub (const SCell &p, Dimension k, Integer x) const |
Return the same element as [p] except for a coordinate [k] decremented with x. More... | |
Integer | sDistanceToMax (const SCell &p, Dimension k) const |
Useful to check if you are going out of the space (for non-periodic dimensions). More... | |
Integer | sDistanceToMin (const SCell &p, Dimension k) const |
Useful to check if you are going out of the space (for non-periodic dimensions). More... | |
SCell | sTranslation (const SCell &p, const Vector &vec) const |
Add the vector [vec] to [p]. More... | |
SCell | sProjection (const SCell &p, const SCell &bound, Dimension k) const |
Return the projection of [p] along the [k]th direction toward [bound]. More... | |
void | sProject (SCell &p, const SCell &bound, Dimension k) const |
Projects [p] along the [k]th direction toward [bound]. More... | |
bool | sNext (SCell &p, const SCell &lower, const SCell &upper) const |
Increment the cell [p] to its next position (as classically done in a scanning). More... | |
Neighborhood services | |
Cells | uNeighborhood (const Cell &cell) const |
Computes the 1-neighborhood of the cell [c] and returns it. More... | |
SCells | sNeighborhood (const SCell &cell) const |
Computes the 1-neighborhood of the cell [c] and returns it. More... | |
Cells | uProperNeighborhood (const Cell &cell) const |
Computes the proper 1-neighborhood of the cell [c] and returns it. More... | |
SCells | sProperNeighborhood (const SCell &cell) const |
Computes the proper 1-neighborhood of the cell [c] and returns it. More... | |
Cell | uAdjacent (const Cell &p, Dimension k, bool up) const |
Return the adjacent element to [p] along axis [k] in the given direction and orientation. More... | |
SCell | sAdjacent (const SCell &p, Dimension k, bool up) const |
Return the adjacent element to [p] along axis [k] in the given direction and orientation. More... | |
Incidence services | |
Cell | uIncident (const Cell &c, Dimension k, bool up) const |
Return the forward or backward unsigned cell incident to [c] along axis [k], depending on [up]. More... | |
SCell | sIncident (const SCell &c, Dimension k, bool up) const |
Return the forward or backward signed cell incident to [c] along axis [k], depending on [up]. More... | |
Cells | uLowerIncident (const Cell &c) const |
Return the cells directly low incident to c in this space. More... | |
Cells | uUpperIncident (const Cell &c) const |
Return the cells directly up incident to c in this space. More... | |
SCells | sLowerIncident (const SCell &c) const |
Return the signed cells directly low incident to c in this space. More... | |
SCells | sUpperIncident (const SCell &c) const |
Return the signed cells directly up incident to c in this space. More... | |
Cells | uFaces (const Cell &c) const |
Return the proper faces of [c] (chain of lower incidence) that belong to the space. More... | |
Cells | uCoFaces (const Cell &c) const |
Return the proper cofaces of [c] (chain of upper incidence) that belong to the space. More... | |
bool | sDirect (const SCell &p, Dimension k) const |
Return 'true' if the direct orientation of [p] along [k] is in the positive coordinate direction. More... | |
SCell | sDirectIncident (const SCell &p, Dimension k) const |
Return the direct incident cell of [p] along [k] (the incident cell along [k]) More... | |
SCell | sIndirectIncident (const SCell &p, Dimension k) const |
Return the indirect incident cell of [p] along [k] (the incident cell along [k] whose sign is negative). More... | |
Point | interiorVoxel (const SCell &c) const |
For a given surfel ((n-1)-signed cell), returns its interior voxel (point in Z^d given by the direct incident n-cell to the given cell). More... | |
Point | exteriorVoxel (const SCell &c) const |
For a given surfel ((n-1)-signed cell), returns its exterior voxel (point in Z^d given by the indirect incident n-cell to the given cell). More... | |
DGtal interface | |
void | selfDisplay (std::ostream &out) const |
Writes/Displays the object on an output stream. More... | |
bool | isValid () const |
Checks the validity/consistency of the object. More... | |
Static Public Attributes | |
static const constexpr Dimension | dimension = dim |
static const constexpr Dimension | DIM = dim |
static const constexpr Sign | POS = true |
static const constexpr Sign | NEG = false |
Private Types | |
typedef KhalimskySpaceNDHelper< KhalimskySpaceND< dim, TInteger > > | Helper |
Features basic operations on coordinates, especially for periodic dimensions. More... | |
Private Member Functions | |
BOOST_CONCEPT_ASSERT ((concepts::CInteger< TInteger >)) | |
Integer must be signed to characterize a ring. More... | |
Internals | |
void | uAddFaces (Cells &faces, const Cell &c, Dimension axis) const |
Used by uFaces for computing incident faces. More... | |
void | uAddCoFaces (Cells &cofaces, const Cell &c, Dimension axis) const |
Used by uCoFaces for computing incident cofaces. More... | |
Private Attributes | |
Point | myLower |
Point | myUpper |
Cell | myCellLower |
Cell | myCellUpper |
std::array< Closure, dimension > | myClosure |
Friends | |
class | KhalimskySpaceNDHelper< KhalimskySpaceND< dim, TInteger > > |
Aim: This class is a model of CCellularGridSpaceND. It represents the cubical grid as a cell complex, whose cells are defined as an array of integers. The topology of the cells is defined by the parity of the coordinates (even: closed, odd: open).
Description of template class 'KhalimskySpaceND'
When initializing the space using init(), the user should choose, for each dimension spanned by the space, between a closed and non-periodic (default) cell dimension, an open cell dimension or a periodic cell dimension. The space is generally finite, except for arbitrary size integers and when the space has a periodic dimension.
Supposing that the space has been initialized with digital bounds lower
and upper
, the methods lowerBound() and upperBound() will always return, respectively, lower
and upper
. It as also true for periodic dimension, in order to span over the unique digital points of the space.
In the same way, lowerCell() and upperCell() respect the following rules:
2*lower[k]
if the k-th dimension is closed or periodic,2*lower[k]+1
if the k-th dimension is open;2*upper[k]+2
if the k-th dimension is closed,2*upper[k]+1
if the k-th dimension is open or periodic.The special behavior for periodic dimensions guarantees that each cell has unique Khalimsky coordinates in this range. It is useful to span the space and also for cell-based containers (see e.g. CubicalComplex). Uniqueness also gives meaning to equality tests between cells.
Following this concept, the related methods size(), min(), max(), uFirst(), uLast(), uGetMin(), uGetMax(), uDistanceToMin(), uDistanceToMax(), sFirst(), sLast(), sGetMin(), sGetMax(), sDistanceToMin() and sDistanceToMax() behave for periodic dimensions like for finite dimensions, using the bounds described above.
Thus, if a cell needs to be compared to the bounds, prefer using dedicated tests like uIsMin(), uIsMax(), sIsMin() and sIsMax() that return always false
for a periodic dimension, and uIsInside() and sIsInside() that return always true
for a periodic dimension.
To be consistent with those choices, each cell returned or modified by a KhalimskySpaceND method will have his Khalimsky coordinates along periodic dimensions between the corresponding coordinates of lowerCell() and upperCell(). But, in order to keep low computational cost, each cell passed by parameter to a KhalimskySpaceND method must follow the same conditions. This validity can be tested with the dedicated methods uIsValid() and sIsValid().
Exceptions exist for uCell(const PreCell &) const and sCell(const SPreCell &) const that are specially featured to correct Khalimsky coordinates of a given cell. In addition, when a method accepts a coordinate as parameter, it is always corrected along periodic dimensions.
dim | the dimension of the digital space. |
TInteger | the Integer class used to specify the arithmetic computations (default type = int32). |
Definition at line 392 of file KhalimskySpaceND.h.
using DGtal::KhalimskySpaceND< dim, TInteger >::AnyCellCollection = typename PreCellularGridSpace::template AnyCellCollection< CellType > |
Definition at line 436 of file KhalimskySpaceND.h.
typedef KhalimskyCell< dim, Integer > DGtal::KhalimskySpaceND< dim, TInteger >::Cell |
Definition at line 415 of file KhalimskySpaceND.h.
typedef AnyCellCollection<Cell> DGtal::KhalimskySpaceND< dim, TInteger >::Cells |
Definition at line 439 of file KhalimskySpaceND.h.
typedef std::set<Cell> DGtal::KhalimskySpaceND< dim, TInteger >::CellSet |
Preferred type for defining a set of Cell(s).
Definition at line 444 of file KhalimskySpaceND.h.
typedef KhalimskySpaceND<dim, Integer> DGtal::KhalimskySpaceND< dim, TInteger >::CellularGridSpace |
Definition at line 411 of file KhalimskySpaceND.h.
using DGtal::KhalimskySpaceND< dim, TInteger >::DirIterator = typename PreCellularGridSpace::DirIterator |
Definition at line 422 of file KhalimskySpaceND.h.
|
private |
Features basic operations on coordinates, especially for periodic dimensions.
Definition at line 396 of file KhalimskySpaceND.h.
typedef TInteger DGtal::KhalimskySpaceND< dim, TInteger >::Integer |
Arithmetic ring induced by (+,-,*) and Integer numbers.
Definition at line 404 of file KhalimskySpaceND.h.
typedef PointVector< dim, Integer > DGtal::KhalimskySpaceND< dim, TInteger >::Point |
Definition at line 425 of file KhalimskySpaceND.h.
typedef KhalimskyPreCell< dim, Integer > DGtal::KhalimskySpaceND< dim, TInteger >::PreCell |
Definition at line 416 of file KhalimskySpaceND.h.
typedef KhalimskyPreSpaceND<dim, Integer> DGtal::KhalimskySpaceND< dim, TInteger >::PreCellularGridSpace |
Definition at line 412 of file KhalimskySpaceND.h.
typedef SignedKhalimskyCell< dim, Integer > DGtal::KhalimskySpaceND< dim, TInteger >::SCell |
Definition at line 417 of file KhalimskySpaceND.h.
typedef AnyCellCollection<SCell> DGtal::KhalimskySpaceND< dim, TInteger >::SCells |
Definition at line 440 of file KhalimskySpaceND.h.
typedef std::set<SCell> DGtal::KhalimskySpaceND< dim, TInteger >::SCellSet |
Preferred type for defining a set of SCell(s).
Definition at line 447 of file KhalimskySpaceND.h.
typedef bool DGtal::KhalimskySpaceND< dim, TInteger >::Sign |
Definition at line 421 of file KhalimskySpaceND.h.
typedef NumberTraits<Integer>::UnsignedVersion DGtal::KhalimskySpaceND< dim, TInteger >::Size |
Type used to represent sizes in the digital space.
Definition at line 407 of file KhalimskySpaceND.h.
typedef SpaceND<dim, Integer> DGtal::KhalimskySpaceND< dim, TInteger >::Space |
Definition at line 410 of file KhalimskySpaceND.h.
typedef SignedKhalimskyPreCell< dim, Integer > DGtal::KhalimskySpaceND< dim, TInteger >::SPreCell |
Definition at line 418 of file KhalimskySpaceND.h.
typedef SCell DGtal::KhalimskySpaceND< dim, TInteger >::Surfel |
Definition at line 420 of file KhalimskySpaceND.h.
typedef std::set<SCell> DGtal::KhalimskySpaceND< dim, TInteger >::SurfelSet |
Preferred type for defining a set of surfels (always signed cells).
Definition at line 450 of file KhalimskySpaceND.h.
typedef PointVector< dim, Integer > DGtal::KhalimskySpaceND< dim, TInteger >::Vector |
Definition at line 426 of file KhalimskySpaceND.h.
enum DGtal::KhalimskySpaceND::Closure |
Boundaries closure type.
Enumerator | |
---|---|
CLOSED | The dimension is closed and non-periodic. |
OPEN | The dimension is open. |
PERIODIC | The dimension is periodic. |
Definition at line 471 of file KhalimskySpaceND.h.
DGtal::KhalimskySpaceND< dim, TInteger >::~KhalimskySpaceND | ( | ) |
Destructor.
DGtal::KhalimskySpaceND< dim, TInteger >::KhalimskySpaceND | ( | ) |
Default constructor.
|
default |
Copy constructor.
other | the object to clone. |
|
default |
Move constructor.
other | the object to clone. |
|
private |
Integer must be signed to characterize a ring.
bool DGtal::KhalimskySpaceND< dim, TInteger >::cIsInside | ( | const Point & | p | ) | const |
Useful to check if you are going out of the space.
p | any integer point (Khalimsky coordinates). |
bool DGtal::KhalimskySpaceND< dim, TInteger >::cIsInside | ( | const Point & | p, |
Dimension | k | ||
) | const |
Useful to check if you are going out of the space.
p | any integer point (Khalimsky coordinates). |
k | the tested coordinate. |
bool DGtal::KhalimskySpaceND< dim, TInteger >::cIsValid | ( | const Point & | p | ) | const |
Returns true
if the given cell has Khalimsky coordinates between those of the cells returned by lowerCell and upperCell.
p | an integer point (Khalimsky coordinates of cell). |
true
if the given cell has Khalimsky coordinates between those of the cells returned by lowerCell and upperCell. bool DGtal::KhalimskySpaceND< dim, TInteger >::cIsValid | ( | const Point & | p, |
Dimension | k | ||
) | const |
Returns true
if the given cell has his k-th Khalimsky coordinate between those of the cells returned by lowerCell and upperCell.
p | an integer point (Khalimsky coordinates of cell). |
k | a dimension. |
true
if the given cell has his k-th Khalimsky coordinate between those of the cells returned by lowerCell and upperCell. Point DGtal::KhalimskySpaceND< dim, TInteger >::exteriorVoxel | ( | const SCell & | c | ) | const |
For a given surfel ((n-1)-signed cell), returns its exterior voxel (point in Z^d given by the indirect incident n-cell to the given cell).
c | any signed pre-cell. |
Referenced by TEST_CASE().
Closure DGtal::KhalimskySpaceND< dim, TInteger >::getClosure | ( | Dimension | k | ) | const |
Gets closure type.
k | the dimension. |
bool DGtal::KhalimskySpaceND< dim, TInteger >::init | ( | const Point & | lower, |
const Point & | upper, | ||
bool | isClosed | ||
) |
Specifies the upper and lower bounds for the maximal cells in this space.
lower | the lowest point in this space (digital coords) |
upper | the upper point in this space (digital coords) |
isClosed | 'true' if this space is closed and non-periodic in every dimension, 'false' if open. |
Referenced by accuracyTest(), alphaShape(), ballGenerator(), digitize(), estimatorOnShapeDigitization(), DGtal::functions::generateVoxelComplexTable(), getComplex(), laplace_sphere(), laplacian(), main(), Object3D(), SCENARIO(), test3dSurfaceHelper(), TEST_CASE(), testBallQuad(), testCombinatorialSurface(), testCompareEstimator(), testComputeInterior(), testCube(), testCurvature2d(), testDigitalSetBoundary(), testDigitalSurface(), testDigitalSurfaceBoostGraphInterface(), testDigitization(), testEmbedder(), testEstimatorCache(), testExplicitDigitalSurface(), testFindABel(), testFitting(), testGaussianCurvature3d(), testImplicitDigitalSurface(), testLightExplicitDigitalSurface(), testLightImplicitDigitalSurface(), testLocalConvolutionNormalVectorEstimator(), testLocalEstimatorFromFunctorAdapter(), testMeanCurvature3d(), testNormaliation(), testObjectGraph(), testOrderingDigitalSurfaceFacesAroundVertex(), testPrincipalCurvatures3d(), testQuadNorm(), testRaySurface(), testRaySurfelIntersection(), testTrueLocalEstimatorOnShapeDigitization(), and testUmbrellaComputer().
bool DGtal::KhalimskySpaceND< dim, TInteger >::init | ( | const Point & | lower, |
const Point & | upper, | ||
Closure | closure | ||
) |
Specifies the upper and lower bounds for the maximal cells in this space.
lower | the lowest point in this space (digital coords) |
upper | the upper point in this space (digital coords) |
closure | CLOSED, OPEN or PERIODIC if this space is resp. closed (and non-periodic), open or periodic in every dimension. |
bool DGtal::KhalimskySpaceND< dim, TInteger >::init | ( | const Point & | lower, |
const Point & | upper, | ||
const std::array< Closure, dim > & | closure | ||
) |
Specifies the upper and lower bounds for the maximal cells in this space.
lower | the lowest point in this space (digital coords) |
upper | the upper point in this space (digital coords) |
closure | an array of CLOSED, OPEN or PERIODIC if this space is resp. closed (and non-periodic), open or periodic in the corresponding dimension. |
Point DGtal::KhalimskySpaceND< dim, TInteger >::interiorVoxel | ( | const SCell & | c | ) | const |
For a given surfel ((n-1)-signed cell), returns its interior voxel (point in Z^d given by the direct incident n-cell to the given cell).
c | any signed pre-cell. |
Referenced by TEST_CASE().
bool DGtal::KhalimskySpaceND< dim, TInteger >::isAnyDimensionPeriodic | ( | ) | const |
Return 'true' iff the space is periodic along at least one dimension.
bool DGtal::KhalimskySpaceND< dim, TInteger >::isSpaceClosed | ( | ) | const |
Return 'true' iff the space is closed or periodic along every dimension.
bool DGtal::KhalimskySpaceND< dim, TInteger >::isSpaceClosed | ( | Dimension | k | ) | const |
Return 'true' iff the space is closed or periodic along the specified dimension.
k | the dimension. |
bool DGtal::KhalimskySpaceND< dim, TInteger >::isSpacePeriodic | ( | ) | const |
Return 'true' iff the space is periodic along every dimension.
bool DGtal::KhalimskySpaceND< dim, TInteger >::isSpacePeriodic | ( | Dimension | k | ) | const |
Return 'true' iff the space is periodic along the specified dimension.
k | the dimension. |
bool DGtal::KhalimskySpaceND< dim, TInteger >::isValid | ( | ) | const |
Checks the validity/consistency of the object.
const Point & DGtal::KhalimskySpaceND< dim, TInteger >::lowerBound | ( | ) | const |
Return the lower bound for digital points in this space.
Referenced by main(), SCENARIO(), and TEST_CASE_METHOD().
const Cell & DGtal::KhalimskySpaceND< dim, TInteger >::lowerCell | ( | ) | const |
Return the lower bound for cells in this space.
Referenced by main().
Integer DGtal::KhalimskySpaceND< dim, TInteger >::max | ( | Dimension | k | ) | const |
Return the maximal digital coordinate in the k-dimension.
k | a coordinate. |
Integer DGtal::KhalimskySpaceND< dim, TInteger >::min | ( | Dimension | k | ) | const |
Return the minimal digital coordinate in the k-dimension.
k | a dimension. |
|
default |
Copy operator.
other | the object to copy. |
|
default |
Move operator.
other | the object to copy. |
SCell DGtal::KhalimskySpaceND< dim, TInteger >::sAdjacent | ( | const SCell & | p, |
Dimension | k, | ||
bool | up | ||
) | const |
Return the adjacent element to [p] along axis [k] in the given direction and orientation.
p | any cell. |
k | the coordinate that is changed. |
up | if 'true' the orientation is forward along axis [k], otherwise backward. |
sIsValid(p)
and not sIs(Min|Max)(p, k)
depending on up value. SCell DGtal::KhalimskySpaceND< dim, TInteger >::sCell | ( | const Point & | kp, |
Sign | sign = POS |
||
) | const |
From the Khalimsky coordinates of a cell and a sign, builds the corresponding signed cell lying into this Khalismky space.
Along a non-periodic dimension, if the given Khalimsky coordinate lies outside the space, it is replaced by the nearest valid coordinate.
Along a periodic dimension, the Khalimsky coordinate is corrected (by periodicity) to lie between the coordinates of lowerCell() and upperCell().
kp | an integer point (Khalimsky coordinates of cell). |
sign | the sign of the cell (either POS or NEG). |
sIsValid(sCell(kp, sign))
is true. SCell DGtal::KhalimskySpaceND< dim, TInteger >::sCell | ( | const SPreCell & | c | ) | const |
From a signed cell, returns a signed cell lying into this Khalismky space.
Along a non-periodic dimension, if the given Khalimsky coordinate lies outside the space, it replaces it by the nearest valid coordinate.
Along a periodic dimension, the Khalimsky coordinate is corrected (by periodicity) to lie between the coordinates of lowerCell() and upperCell().
c | a signed cell. |
sIsValid(sCell(c))
is true. sCell(c) == c
if sIsValid(c)
. Referenced by cmpSCellsIfInside(), digitize(), main(), testCellDrawOnBoard(), testFaces(), testFindABel(), testNeighborhood(), testRaySurfelIntersection(), testScan(), and testSurfelAdjacency().
SCell DGtal::KhalimskySpaceND< dim, TInteger >::sCell | ( | Point | p, |
const SPreCell & | c | ||
) | const |
From the digital coordinates of a point in Zn and a signed cell type, builds the corresponding signed cell lying into this Khalismky space.
Along a non-periodic dimension, if the given digital coordinate lies outside the space, it is replaced by the nearest valid coordinate.
Along a periodic dimension, the digital coordinate is corrected (by periodicity) to lie between the coordinates of lowerCell() and upperCell().
p | an integer point (digital coordinates of cell). |
c | another cell defining the topology and sign. |
sIsValid(sCell(p, c))
is true. Integer DGtal::KhalimskySpaceND< dim, TInteger >::sCoord | ( | const SCell & | c, |
Dimension | k | ||
) | const |
Return its digital coordinate along [k].
c | any signed cell. |
k | any valid dimension. |
uIsValid(c)
is true. Point DGtal::KhalimskySpaceND< dim, TInteger >::sCoords | ( | const SCell & | c | ) | const |
Return its digital coordinates.
c | any signed cell. |
uIsValid(c)
is true. Referenced by main(), DGtal::functors::SCellToPoint< KSpace >::operator()(), DGtal::functors::SCellToArrow< KSpace >::operator()(), DGtal::functors::SCellToInnerPoint< KSpace >::operator()(), DGtal::functors::SCellToOuterPoint< KSpace >::operator()(), DGtal::functors::SCellToIncidentPoints< KSpace >::operator()(), DGtal::functors::SCellToCode< KSpace >::operator()(), TEST_CASE(), testFindABel(), testLocalConvolutionNormalVectorEstimator(), and testOrderingDigitalSurfaceFacesAroundVertex().
Dimension DGtal::KhalimskySpaceND< dim, TInteger >::sDim | ( | const SCell & | p | ) | const |
Return the dimension of the cell [p].
p | any signed cell. |
Referenced by DGtal::functors::SCellToPoint< KSpace >::operator()(), SCENARIO(), and testFindABel().
bool DGtal::KhalimskySpaceND< dim, TInteger >::sDirect | ( | const SCell & | p, |
Dimension | k | ||
) | const |
Return 'true' if the direct orientation of [p] along [k] is in the positive coordinate direction.
The direct orientation in a direction allows to go from positive incident cells to positive incident cells. This means that
is always true.
p | any signed cell. |
k | any coordinate. |
Referenced by main(), testCellDrawOnBoard(), testDirectIncidence(), and testSurfelAdjacency().
SCell DGtal::KhalimskySpaceND< dim, TInteger >::sDirectIncident | ( | const SCell & | p, |
Dimension | k | ||
) | const |
Return the direct incident cell of [p] along [k] (the incident cell along [k])
p | any signed cell. |
k | any coordinate. |
sIsValid(p)
and the cell should have a direct incident cell in this direction. sIsValid(c)
is true for every returned cell c. ose sign is positive). Referenced by main(), DGtal::functors::SCellToInnerPoint< KSpace >::operator()(), DGtal::functors::SCellToIncidentPoints< KSpace >::operator()(), testDirectIncidence(), testFindABel(), and testSurfelAdjacency().
DirIterator DGtal::KhalimskySpaceND< dim, TInteger >::sDirs | ( | const SCell & | p | ) | const |
Given a signed cell [p], returns an iterator to iterate over each coordinate the cell spans.
(A spel spans all coordinates; a surfel all but one, etc).
Example:
p | any signed cell. |
Referenced by main(), DGtal::functors::SCellToPoint< KSpace >::operator()(), DGtal::functors::SCellToArrow< KSpace >::operator()(), DGtal::functors::SCellToCode< KSpace >::operator()(), testDigitalSetBoundary(), testDirectIncidence(), testImplicitDigitalSurface(), testIncidence(), testLightImplicitDigitalSurface(), and testUmbrellaComputer().
Integer DGtal::KhalimskySpaceND< dim, TInteger >::sDistanceToMax | ( | const SCell & | p, |
Dimension | k | ||
) | const |
Useful to check if you are going out of the space (for non-periodic dimensions).
p | any cell. |
k | the coordinate that is tested. |
sIsValid(p)
is true. Integer DGtal::KhalimskySpaceND< dim, TInteger >::sDistanceToMin | ( | const SCell & | p, |
Dimension | k | ||
) | const |
Useful to check if you are going out of the space (for non-periodic dimensions).
p | any cell. |
k | the coordinate that is tested. |
sIsValid(p)
is true. void DGtal::KhalimskySpaceND< dim, TInteger >::selfDisplay | ( | std::ostream & | out | ) | const |
Writes/Displays the object on an output stream.
out | the output stream where the object is written. |
SCell DGtal::KhalimskySpaceND< dim, TInteger >::sFirst | ( | const SPreCell & | p | ) | const |
Return the first cell of the space with the same type as [p].
sIsValid(sFirst(p))
is true. Integer DGtal::KhalimskySpaceND< dim, TInteger >::sFirst | ( | const SPreCell & | p, |
Dimension | k | ||
) | const |
Return the k-th coordinate of the first cell of the space with the same type as [p].
lowerCell()[k]
and upperCell()[k]
. SCell DGtal::KhalimskySpaceND< dim, TInteger >::sGetAdd | ( | const SCell & | p, |
Dimension | k, | ||
Integer | x | ||
) | const |
Return the same element as [p] except for a coordinate [k] incremented with x.
p | any cell. |
k | the coordinate that is changed. |
x | the increment. |
sIsValid(p)
and ( x <= sDistanceToMax(p, k)
or isSpacePeriodic(k)
). sIsValid(sGetAdd(p, k, x))
is true. SCell DGtal::KhalimskySpaceND< dim, TInteger >::sGetDecr | ( | const SCell & | p, |
Dimension | k | ||
) | const |
Return the same element as [p] except for an decremented coordinate [k].
p | any cell. |
k | the coordinate that is changed. |
sIsValid(p)
and not sIsMin(p)
. sIsValid(sGetDecr(p, k))
is true. SCell DGtal::KhalimskySpaceND< dim, TInteger >::sGetIncr | ( | const SCell & | p, |
Dimension | k | ||
) | const |
Return the same element as [p] except for the incremented coordinate [k].
p | any cell. |
k | the coordinate that is changed. |
sIsValid(p)
and not sIsMax(p)
. sIsValid(sGetIncr(p, k))
is true. SCell DGtal::KhalimskySpaceND< dim, TInteger >::sGetMax | ( | SCell | p, |
Dimension | k | ||
) | const |
Useful to check if you are going out of the space.
p | any cell. |
k | the concerned coordinate. |
sIsValid(p, d)
is true for each dimension d different than k. sIsValid(sGetMax(p, k))
is true. SCell DGtal::KhalimskySpaceND< dim, TInteger >::sGetMin | ( | SCell | p, |
Dimension | k | ||
) | const |
Useful to check if you are going out of the space.
p | any cell. |
k | the concerned coordinate. |
sIsValid(p, d)
is true for each dimension d different than k. sIsValid(sGetMin(p, k))
is true. SCell DGtal::KhalimskySpaceND< dim, TInteger >::sGetSub | ( | const SCell & | p, |
Dimension | k, | ||
Integer | x | ||
) | const |
Return the same element as [p] except for a coordinate [k] decremented with x.
p | any cell. |
k | the coordinate that is changed. |
x | the decrement. |
and (
x <= sDistanceToMin(p, k)or
isSpacePeriodic(k)). @post
sIsValid(sGetSub(p, k, x))` is true. SCell DGtal::KhalimskySpaceND< dim, TInteger >::signs | ( | const Cell & | p, |
Sign | s | ||
) | const |
Creates a signed cell from an unsigned one and a given sign.
p | any unsigned cell. |
s | a sign. |
uIsValid(p)
is true. sIsValid(signs(p, s))
is true. SCell DGtal::KhalimskySpaceND< dim, TInteger >::sIncident | ( | const SCell & | c, |
Dimension | k, | ||
bool | up | ||
) | const |
Return the forward or backward signed cell incident to [c] along axis [k], depending on [up].
c | any signed cell. |
k | any coordinate. |
up | if 'true' the orientation is forward along axis [k], otherwise backward. |
sIsValid(c)
and the cell should have an incident cell in this direction/orientation. sIsValid(sIncident(c, k, up))
is true. Referenced by main(), testCellDrawOnBoard(), testDirectIncidence(), testExplicitDigitalSurface(), testIncidence(), testLightExplicitDigitalSurface(), and testSurfelAdjacency().
SCell DGtal::KhalimskySpaceND< dim, TInteger >::sIndirectIncident | ( | const SCell & | p, |
Dimension | k | ||
) | const |
Return the indirect incident cell of [p] along [k] (the incident cell along [k] whose sign is negative).
p | any signed cell. |
k | any coordinate. |
sIsValid(p)
and the cell should have an indirect incident cell in this direction. sIsValid(c)
is true for every returned cell c. ose sign is positive). Referenced by main(), DGtal::functors::SCellToPoint< KSpace >::operator()(), DGtal::functors::SCellToArrow< KSpace >::operator()(), DGtal::functors::SCellToOuterPoint< KSpace >::operator()(), DGtal::functors::SCellToIncidentPoints< KSpace >::operator()(), DGtal::functors::SCellToCode< KSpace >::operator()(), and testFindABel().
bool DGtal::KhalimskySpaceND< dim, TInteger >::sIsInside | ( | const SPreCell & | p | ) | const |
Useful to check if you are going out of the space.
p | any cell. |
bool DGtal::KhalimskySpaceND< dim, TInteger >::sIsInside | ( | const SPreCell & | p, |
Dimension | k | ||
) | const |
Useful to check if you are going out of the space.
p | any cell. |
k | the tested coordinate. |
Referenced by cmpSCellsIfInside().
bool DGtal::KhalimskySpaceND< dim, TInteger >::sIsMax | ( | const SCell & | p, |
Dimension | k | ||
) | const |
Useful to check if you are going out of the space.
p | any cell. |
k | the tested coordinate. |
sIsInside(p)
is true. bool DGtal::KhalimskySpaceND< dim, TInteger >::sIsMin | ( | const SCell & | p, |
Dimension | k | ||
) | const |
Useful to check if you are going out of the space.
p | any cell. |
k | the tested coordinate. |
sIsInside(p)
is true. bool DGtal::KhalimskySpaceND< dim, TInteger >::sIsOpen | ( | const SCell & | p, |
Dimension | k | ||
) | const |
Return 'true' if [p] is open along the direction [k].
p | any signed cell. |
k | any direction. |
bool DGtal::KhalimskySpaceND< dim, TInteger >::sIsSurfel | ( | const SCell & | b | ) | const |
Return 'true' if [b] is a surfel (spans all but one coordinate).
b | any signed cell. |
bool DGtal::KhalimskySpaceND< dim, TInteger >::sIsValid | ( | const SPreCell & | c | ) | const |
Returns true
if the given signed cell has Khalimsky coordinates between those of the cells returned by lowerCell and upperCell.
c | a signed cell. |
true
if the given signed cell has Khalimsky coordinates between those of the cells returned by lowerCell and upperCell. bool DGtal::KhalimskySpaceND< dim, TInteger >::sIsValid | ( | const SPreCell & | c, |
Dimension | k | ||
) | const |
Returns true
if the given signed cell his k-th Khalimsky coordinate between those of the cells returned by lowerCell and upperCell.
c | a signed cell. |
k | a dimension. |
true
if the given signed cell his k-th Khalimsky coordinate between those of the cells returned by lowerCell and upperCell. Size DGtal::KhalimskySpaceND< dim, TInteger >::size | ( | Dimension | k | ) | const |
Return the width of the space in the k-dimension.
k | a dimension. |
Integer DGtal::KhalimskySpaceND< dim, TInteger >::sKCoord | ( | const SCell & | c, |
Dimension | k | ||
) | const |
Return its Khalimsky coordinate along [k].
c | any signed cell. |
k | any valid dimension. |
uIsValid(c)
is true. Referenced by testDigitalSurfaceBoostGraphInterface().
const Point & DGtal::KhalimskySpaceND< dim, TInteger >::sKCoords | ( | const SCell & | c | ) | const |
Return its Khalimsky coordinates.
c | any signed cell. |
uIsValid(c)
is true. Referenced by main(), DGtal::functors::deprecated::SCellToMidPoint< KSpace >::operator()(), DGtal::functors::SCellToArrow< KSpace >::operator()(), DGtal::functors::SCellToCode< KSpace >::operator()(), testCombinatorialSurface(), testCube(), and testUmbrellaComputer().
SCell DGtal::KhalimskySpaceND< dim, TInteger >::sLast | ( | const SPreCell & | p | ) | const |
Return the last cell of the space with the same type as [p].
sIsValid(sLast(p))
is true. Integer DGtal::KhalimskySpaceND< dim, TInteger >::sLast | ( | const SPreCell & | p, |
Dimension | k | ||
) | const |
Return the k-th Khalimsky coordinate of the last cell of the space with the same type as [p].
lowerCell()[k]
and upperCell()[k]
. SCells DGtal::KhalimskySpaceND< dim, TInteger >::sLowerIncident | ( | const SCell & | c | ) | const |
Return the signed cells directly low incident to c in this space.
c | any signed cell. |
sIsValid(c)
is true. sIsValid(b)
is true for every returned cell b. SCells DGtal::KhalimskySpaceND< dim, TInteger >::sNeighborhood | ( | const SCell & | cell | ) | const |
Computes the 1-neighborhood of the cell [c] and returns it.
It is the set of cells with same topology that are adjacent to [c] and which are within the bounds of this space.
cell | the signed cell of interest. |
sIsValid(cell)
is true. sIsValid(c)
is true for every returned cell c. Referenced by testNeighborhood().
bool DGtal::KhalimskySpaceND< dim, TInteger >::sNext | ( | SCell & | p, |
const SCell & | lower, | ||
const SCell & | upper | ||
) | const |
Increment the cell [p] to its next position (as classically done in a scanning).
Example:
p | any cell. |
lower | the lower bound. |
upper | the upper bound. |
sIsValid(p)
and sIsValid(lower)
and sIsValid(upper)
and sTopology(p) == sTopology(lower) == sTopology(upper)
. sIsValid(p)
is true. Referenced by testScan().
SCell DGtal::KhalimskySpaceND< dim, TInteger >::sOpp | ( | const SCell & | p | ) | const |
Creates the signed cell with the inverse sign of [p].
p | any signed cell. |
sIsValid(p)
is true. sIsValid(sOpp(p))
is true. Referenced by SCENARIO(), and testIncidence().
Dimension DGtal::KhalimskySpaceND< dim, TInteger >::sOrthDir | ( | const SCell & | s | ) | const |
Given a signed surfel [s], returns its orthogonal direction (ie, the coordinate where the surfel is closed).
s | a signed surfel |
Referenced by main(), testFindABel(), and testSurfelAdjacency().
DirIterator DGtal::KhalimskySpaceND< dim, TInteger >::sOrthDirs | ( | const SCell & | p | ) | const |
Given a signed cell [p], returns an iterator to iterate over each coordinate the cell does not span.
(A spel spans all coordinates; a surfel all but one, etc).
Example:
p | any signed cell. |
Referenced by main(), DGtal::functors::SCellToInnerPoint< KSpace >::operator()(), DGtal::functors::SCellToOuterPoint< KSpace >::operator()(), and DGtal::functors::SCellToIncidentPoints< KSpace >::operator()().
SCell DGtal::KhalimskySpaceND< dim, TInteger >::sPointel | ( | Point | p, |
Sign | sign = POS |
||
) | const |
From the digital coordinates of a point in Zn, builds the corresponding pointel (cell of dimension 0) lying into this Khalismky space.
Along a non-periodic dimension, if the given digital coordinate lies outside the space, it is replaced by the nearest valid coordinate.
Along a periodic dimension, the digital coordinate is corrected (by periodicity) to lie between the coordinates of lowerCell() and upperCell().
p | an integer point (digital coordinates of cell). |
sign | the sign of the cell (either POS or NEG). |
uIsValid(uSpel(p))
is true. Referenced by main().
void DGtal::KhalimskySpaceND< dim, TInteger >::sProject | ( | SCell & | p, |
const SCell & | bound, | ||
Dimension | k | ||
) | const |
Projects [p] along the [k]th direction toward [bound].
Otherwise said, p[ k ] == bound[ k ] afterwards.
p | any cell. |
bound | the element acting as bound (same topology as p). |
k | the concerned coordinate. |
sIsValid(p)
and sIsValid(bound)
and sIsOpen(p, k) == sIsOpen(bound, k)
sIsValid(p)
. SCell DGtal::KhalimskySpaceND< dim, TInteger >::sProjection | ( | const SCell & | p, |
const SCell & | bound, | ||
Dimension | k | ||
) | const |
Return the projection of [p] along the [k]th direction toward [bound].
Otherwise said, p[ k ] == bound[ k ] afterwards.
p | any cell. |
bound | the element acting as bound (same topology as p). |
k | the concerned coordinate. |
sIsValid(p)
and sIsValid(bound)
and sIsOpen(p, k) == sIsOpen(bound, k)
sIsValid(sProjection(p, bound, k))
and sTopology(p) == sTopology(sProjection(p, bound, k))
. SCells DGtal::KhalimskySpaceND< dim, TInteger >::sProperNeighborhood | ( | const SCell & | cell | ) | const |
Computes the proper 1-neighborhood of the cell [c] and returns it.
It is the set of cells with same topology that are adjacent to [c], different from [c] and which are within the bounds of this space.
cell | the signed cell of interest. |
sIsValid(cell)
is true. sIsValid(c)
is true for every returned cell c. Referenced by testNeighborhood().
void DGtal::KhalimskySpaceND< dim, TInteger >::sSetCoord | ( | SCell & | c, |
Dimension | k, | ||
Integer | i | ||
) | const |
Sets the [k]-th digital coordinate of [c] to [i].
c | any signed cell. |
k | any valid dimension. |
i | an integer coordinate within the space. |
sIsValid(c)
is true and i is within the space bounds if k is a non-periodic dimension. sIsValid(c)
is true. void DGtal::KhalimskySpaceND< dim, TInteger >::sSetCoords | ( | SCell & | c, |
const Point & | kp | ||
) | const |
Sets the digital coordinates of [c] to [kp].
c | any signed cell. |
kp | the new Khalimsky coordinates for [c]. |
sIsValid(c)
is true. void DGtal::KhalimskySpaceND< dim, TInteger >::sSetKCoord | ( | SCell & | c, |
Dimension | k, | ||
Integer | i | ||
) | const |
Sets the [k]-th Khalimsky coordinate of [c] to [i].
c | any signed cell. |
k | any valid dimension. |
i | an integer coordinate within the space. |
sIsValid(c)
is true and i is within the space bounds if k is a non-periodic dimension. sIsValid(c)
is true. void DGtal::KhalimskySpaceND< dim, TInteger >::sSetKCoords | ( | SCell & | c, |
const Point & | kp | ||
) | const |
Sets the Khalimsky coordinates of [c] to [kp].
c | any signed cell. |
kp | the new Khalimsky coordinates for [c]. |
sIsValid(c)
is true. void DGtal::KhalimskySpaceND< dim, TInteger >::sSetSign | ( | SCell & | c, |
Sign | s | ||
) | const |
Sets the sign of the cell.
c | (modified) any signed cell. |
s | any sign. |
Sign DGtal::KhalimskySpaceND< dim, TInteger >::sSign | ( | const SCell & | c | ) | const |
Return its sign.
c | any signed cell. |
uIsValid(c)
is true. Referenced by testDirectIncidence().
SCell DGtal::KhalimskySpaceND< dim, TInteger >::sSpel | ( | Point | p, |
Sign | sign = POS |
||
) | const |
From the digital coordinates of a point in Zn, builds the corresponding spel (cell of maximal dimension) lying into this Khalismky space.
Along a non-periodic dimension, if the given digital coordinate lies outside the space, it is replaced by the nearest valid coordinate.
Along a periodic dimension, the digital coordinate is corrected (by periodicity) to lie between the coordinates of lowerCell() and upperCell().
p | an integer point (digital coordinates of cell). |
sign | the sign of the cell (either POS or NEG). |
sIsValid(sSpel(p, sign))
is true. Referenced by main(), testDirectIncidence(), testExplicitDigitalSurface(), testIncidence(), and testLightExplicitDigitalSurface().
Integer DGtal::KhalimskySpaceND< dim, TInteger >::sTopology | ( | const SCell & | p | ) | const |
Return the topology word of [p].
p | any signed cell. |
Referenced by testFaces(), testNeighborhood(), and testScan().
SCell DGtal::KhalimskySpaceND< dim, TInteger >::sTranslation | ( | const SCell & | p, |
const Vector & | vec | ||
) | const |
Add the vector [vec] to [p].
p | any cell. |
vec | any pointel. |
sIsValid(p, k)
and ( sDistanceToMin(p, k) <= vec[k] <= sDistanceToMax(p, k) or isPeriodicSpace(k) )
for each dimension k. sIsValid(sTranslation(p, vec))
is true. Referenced by main().
SCells DGtal::KhalimskySpaceND< dim, TInteger >::sUpperIncident | ( | const SCell & | c | ) | const |
Return the signed cells directly up incident to c in this space.
c | any signed cell. |
sIsValid(c)
is true. sIsValid(b)
is true for every returned cell b.
|
private |
Used by uCoFaces for computing incident cofaces.
|
private |
Used by uFaces for computing incident faces.
Cell DGtal::KhalimskySpaceND< dim, TInteger >::uAdjacent | ( | const Cell & | p, |
Dimension | k, | ||
bool | up | ||
) | const |
Return the adjacent element to [p] along axis [k] in the given direction and orientation.
p | any cell. |
k | the coordinate that is changed. |
up | if 'true' the orientation is forward along axis [k], otherwise backward. |
uIsValid(p)
and not uIs(Min|Max)(p, k)
depending on up value. Cell DGtal::KhalimskySpaceND< dim, TInteger >::uCell | ( | const Point & | kp | ) | const |
From the Khalimsky coordinates of a cell, builds the corresponding unsigned cell lying into this Khalismky space.
Along a non-periodic dimension, if the given Khalimsky coordinate lies outside the space, it is replaced by the nearest valid coordinate.
Along a periodic dimension, the Khalimsky coordinate is corrected (by periodicity) to lie between the coordinates of lowerCell() and upperCell().
kp | an integer point (Khalimsky coordinates of cell). |
uIsValid(uCell(kp))
is true. Cell DGtal::KhalimskySpaceND< dim, TInteger >::uCell | ( | const PreCell & | c | ) | const |
From an unsigned cell, returns an unsigned cell lying into this Khalismky space.
Along a non-periodic dimension, if the given Khalimsky coordinate lies outside the space, it replaces it by the nearest valid coordinate.
Along a periodic dimension, the Khalimsky coordinate is corrected (by periodicity) to lie between the coordinates of lowerCell() and upperCell().
c | a cell. |
uIsValid(uCell(c))
is true. uCell(c) == c
if uIsValid(c)
. Referenced by DGtal::dec_helper::averageOperator20(), cmpUCellsIfInside(), GIVEN(), main(), SCENARIO(), testCellDrawOnBoard(), testFaces(), testNeighborhood(), testQuadNorm(), and testScan().
Cell DGtal::KhalimskySpaceND< dim, TInteger >::uCell | ( | Point | p, |
const PreCell & | c | ||
) | const |
From the digital coordinates of a point in Zn and a cell type, builds the corresponding unsigned cell lying into this Khalismky space.
Along a non-periodic dimension, if the given digital coordinate lies outside the space, it is replaced by the nearest valid coordinate.
Along a periodic dimension, the digital coordinate is corrected (by periodicity) to lie between the coordinates of lowerCell() and upperCell().
p | an integer point (digital coordinates of cell). |
c | another cell defining the topology. |
uIsValid(uCell(p, c))
is true. Cells DGtal::KhalimskySpaceND< dim, TInteger >::uCoFaces | ( | const Cell & | c | ) | const |
Return the proper cofaces of [c] (chain of upper incidence) that belong to the space.
c | any unsigned cell. |
uIsValid(c)
is true. uIsValid(b)
is true for every returned cell b. Referenced by testCellularGridSpaceNDCoFaces(), and testFaces().
Integer DGtal::KhalimskySpaceND< dim, TInteger >::uCoord | ( | const Cell & | c, |
Dimension | k | ||
) | const |
Return its digital coordinate along [k].
c | any unsigned cell. |
k | any valid dimension. |
uIsValid(c)
is true. Point DGtal::KhalimskySpaceND< dim, TInteger >::uCoords | ( | const Cell & | c | ) | const |
Return its digital coordinates.
c | any unsigned cell. |
uIsValid(c)
is true. Referenced by centerSurfel(), main(), and SCENARIO().
Dimension DGtal::KhalimskySpaceND< dim, TInteger >::uDim | ( | const Cell & | p | ) | const |
Return the dimension of the cell [p].
p | any unsigned cell. |
Referenced by DGtal::dec_helper::averageOperator20(), testCellularGridSpaceNDCoFaces(), testCellularGridSpaceNDFaces(), and testFaces().
DirIterator DGtal::KhalimskySpaceND< dim, TInteger >::uDirs | ( | const Cell & | p | ) | const |
Given an unsigned cell [p], returns an iterator to iterate over each coordinate the cell spans.
(A spel spans all coordinates; a surfel all but one, etc).
Example:
p | any unsigned cell. |
Referenced by main().
Integer DGtal::KhalimskySpaceND< dim, TInteger >::uDistanceToMax | ( | const Cell & | p, |
Dimension | k | ||
) | const |
Useful to check if you are going out of the space (for non-periodic dimensions).
p | any cell. |
k | the coordinate that is tested. |
uIsValid(p)
is true. Integer DGtal::KhalimskySpaceND< dim, TInteger >::uDistanceToMin | ( | const Cell & | p, |
Dimension | k | ||
) | const |
Useful to check if you are going out of the space (for non-periodic dimensions).
p | any cell. |
k | the coordinate that is tested. |
uIsValid(p)
is true. Cells DGtal::KhalimskySpaceND< dim, TInteger >::uFaces | ( | const Cell & | c | ) | const |
Return the proper faces of [c] (chain of lower incidence) that belong to the space.
c | any unsigned cell. |
uIsValid(c)
is true. uIsValid(b)
is true for every returned cell b. Referenced by testCellularGridSpaceNDFaces(), and testFaces().
Cell DGtal::KhalimskySpaceND< dim, TInteger >::uFirst | ( | const PreCell & | p | ) | const |
Return the first cell of the space with the same type as [p].
uIsValid(uFirst(p))
is true. Integer DGtal::KhalimskySpaceND< dim, TInteger >::uFirst | ( | const PreCell & | p, |
Dimension | k | ||
) | const |
Return the k-th Khalimsky coordinate of the first cell of the space with the same type as [p].
lowerCell()[k]
and upperCell()[k]
. Referenced by main().
Cell DGtal::KhalimskySpaceND< dim, TInteger >::uGetAdd | ( | const Cell & | p, |
Dimension | k, | ||
Integer | x | ||
) | const |
Return the same element as [p] except for a coordinate [k] incremented with x.
p | any cell. |
k | the coordinate that is changed. |
x | the increment. |
uIsValid(p)
and ( x <= uDistanceToMax(p, k)
or isSpacePeriodic(k)
). uIsValid(uGetAdd(p, k, x))
is true. Cell DGtal::KhalimskySpaceND< dim, TInteger >::uGetDecr | ( | const Cell & | p, |
Dimension | k | ||
) | const |
Return the same element as [p] except for an decremented coordinate [k].
p | any cell. |
k | the coordinate that is changed. |
uIsValid(p)
and not uIsMin(p)
. uIsValid(uGetDecr(p, k))
is true. Cell DGtal::KhalimskySpaceND< dim, TInteger >::uGetIncr | ( | const Cell & | p, |
Dimension | k | ||
) | const |
Return the same element as [p] except for the incremented coordinate [k].
p | any cell. |
k | the coordinate that is changed. |
uIsValid(p)
and not uIsMax(p)
. uIsValid(uGetIncr(p, k))
is true. Cell DGtal::KhalimskySpaceND< dim, TInteger >::uGetMax | ( | Cell | p, |
Dimension | k | ||
) | const |
Useful to check if you are going out of the space.
p | any cell. |
k | the concerned coordinate. |
uIsValid(p, d)
is true for each dimension d different than k. uIsValid(uGetMax(p, k))
is true. Referenced by main().
Cell DGtal::KhalimskySpaceND< dim, TInteger >::uGetMin | ( | Cell | p, |
Dimension | k | ||
) | const |
Useful to check if you are going out of the space.
p | any cell. |
k | the concerned coordinate. |
uIsValid(p, d)
is true for each dimension d different than k. uIsValid(uGetMin(p, k))
is true. Cell DGtal::KhalimskySpaceND< dim, TInteger >::uGetSub | ( | const Cell & | p, |
Dimension | k, | ||
Integer | x | ||
) | const |
Return the same element as [p] except for a coordinate [k] decremented with x.
p | any cell. |
k | the coordinate that is changed. |
x | the decrement. |
uIsValid(p)
and ( x <= uDistanceToMin(p, k)
or isSpacePeriodic(k)
). uIsValid(uGetSub(p, k, x))
is true. Cell DGtal::KhalimskySpaceND< dim, TInteger >::uIncident | ( | const Cell & | c, |
Dimension | k, | ||
bool | up | ||
) | const |
Return the forward or backward unsigned cell incident to [c] along axis [k], depending on [up].
c | any unsigned cell. |
k | any coordinate. |
up | if 'true' the orientation is forward along axis [k], otherwise backward. |
uIsValid(c)
and the cell should have an incident cell in this direction/orientation. uIsValid(uIncident(c, k, up))
is true. Referenced by main(), and testCellDrawOnBoard().
bool DGtal::KhalimskySpaceND< dim, TInteger >::uIsInside | ( | const PreCell & | p | ) | const |
Useful to check if you are going out of the space.
p | any cell. |
bool DGtal::KhalimskySpaceND< dim, TInteger >::uIsInside | ( | const PreCell & | p, |
Dimension | k | ||
) | const |
Useful to check if you are going out of the space.
p | any cell. |
k | the tested coordinate. |
Referenced by cmpUCellsIfInside(), main(), testCellularGridSpaceNDCoFaces(), testCellularGridSpaceNDFaces(), testFaces(), testFindABel(), testNeighborhood(), and testSurfelAdjacency().
bool DGtal::KhalimskySpaceND< dim, TInteger >::uIsMax | ( | const Cell & | p, |
Dimension | k | ||
) | const |
Useful to check if you are going out of the space.
p | any cell. |
k | the tested coordinate. |
uIsInside(p)
is true. bool DGtal::KhalimskySpaceND< dim, TInteger >::uIsMin | ( | const Cell & | p, |
Dimension | k | ||
) | const |
Useful to check if you are going out of the space.
p | any cell. |
k | the tested coordinate. |
uIsInside(p)
is true. bool DGtal::KhalimskySpaceND< dim, TInteger >::uIsOpen | ( | const Cell & | p, |
Dimension | k | ||
) | const |
Return 'true' if [p] is open along the direction [k].
p | any cell. |
k | any direction. |
bool DGtal::KhalimskySpaceND< dim, TInteger >::uIsSurfel | ( | const Cell & | b | ) | const |
Return 'true' if [b] is a surfel (spans all but one coordinate).
b | any unsigned cell. |
bool DGtal::KhalimskySpaceND< dim, TInteger >::uIsValid | ( | const PreCell & | c | ) | const |
Returns true
if the given unsigned cell has Khalimsky coordinates between those of the cells returned by lowerCell and upperCell.
c | a unsigned cell. |
true
if the given unsigned cell has Khalimsky coordinates between those of the cells returned by lowerCell and upperCell. bool DGtal::KhalimskySpaceND< dim, TInteger >::uIsValid | ( | const PreCell & | c, |
Dimension | k | ||
) | const |
Returns true
if the given unsigned cell has his k-th Khalimsky coordinate between those of the cells returned by lowerCell and upperCell.
c | an unsigned cell. |
k | a dimension. |
true
if the given unsigned cell has his k-th Khalimsky coordinate between those of the cells returned by lowerCell and upperCell. Integer DGtal::KhalimskySpaceND< dim, TInteger >::uKCoord | ( | const Cell & | c, |
Dimension | k | ||
) | const |
Return its Khalimsky coordinate along [k].
c | any unsigned cell. |
k | any valid dimension. |
uIsValid(c)
is true. const Point & DGtal::KhalimskySpaceND< dim, TInteger >::uKCoords | ( | const Cell & | c | ) | const |
Return its Khalimsky coordinates.
c | any unsigned cell. |
uIsValid(c)
is true. Referenced by DGtal::dec_helper::averageOperator20().
Cell DGtal::KhalimskySpaceND< dim, TInteger >::uLast | ( | const PreCell & | p | ) | const |
Return the last cell of the space with the same type as [p].
uIsValid(uLast(p))
is true. Integer DGtal::KhalimskySpaceND< dim, TInteger >::uLast | ( | const PreCell & | p, |
Dimension | k | ||
) | const |
Return the k-th Khalimsky coordinate of the last cell of the space with the same type as [p].
lowerCell()[k]
and upperCell()[k]
. Referenced by main().
Cells DGtal::KhalimskySpaceND< dim, TInteger >::uLowerIncident | ( | const Cell & | c | ) | const |
Return the cells directly low incident to c in this space.
c | any unsigned cell. |
uIsValid(c)
is true. uIsValid(b)
is true for every returned cell b. Cells DGtal::KhalimskySpaceND< dim, TInteger >::uNeighborhood | ( | const Cell & | cell | ) | const |
Computes the 1-neighborhood of the cell [c] and returns it.
It is the set of cells with same topology that are adjacent to [c] and which are within the bounds of this space.
cell | the unsigned cell of interest. |
uIsValid(cell)
is true. uIsValid(c)
is true for every returned cell c. Referenced by testNeighborhood().
bool DGtal::KhalimskySpaceND< dim, TInteger >::uNext | ( | Cell & | p, |
const Cell & | lower, | ||
const Cell & | upper | ||
) | const |
Increment the cell [p] to its next position (as classically done in a scanning).
Example:
p | any cell. |
lower | the lower bound. |
upper | the upper bound. |
uIsValid(p)
and uIsValid(lower)
and uIsValid(upper)
and uTopology(p) == uTopology(lower) == uTopology(upper)
. uIsValid(p)
is true. Referenced by main(), and testScan().
Cell DGtal::KhalimskySpaceND< dim, TInteger >::unsigns | ( | const SCell & | p | ) | const |
Creates an unsigned cell from a signed one.
p | any signed cell. |
sIsValid(p)
is true. uIsValid(unsigns(p))
is true. Referenced by DGtal::dec_helper::averageOperator20(), main(), TEST_CASE(), and testLocalConvolutionNormalVectorEstimator().
Dimension DGtal::KhalimskySpaceND< dim, TInteger >::uOrthDir | ( | const Cell & | s | ) | const |
Given an unsigned surfel [s], returns its orthogonal direction (ie, the coordinate where the surfel is closed).
s | an unsigned surfel |
DirIterator DGtal::KhalimskySpaceND< dim, TInteger >::uOrthDirs | ( | const Cell & | p | ) | const |
Given an unsigned cell [p], returns an iterator to iterate over each coordinate the cell does not span.
(A spel spans all coordinates; a surfel all but one, etc).
Example:
p | any unsigned cell. |
Cell DGtal::KhalimskySpaceND< dim, TInteger >::uPointel | ( | Point | p | ) | const |
From the digital coordinates of a point in Zn, builds the corresponding pointel (cell of dimension 0) lying into this Khalismky space.
Along a non-periodic dimension, if the given digital coordinate lies outside the space, it is replaced by the nearest valid coordinate.
Along a periodic dimension, the digital coordinate is corrected (by periodicity) to lie between the coordinates of lowerCell() and upperCell().
p | an integer point (digital coordinates of cell). |
uIsValid(uSpel(p))
is true. Referenced by main(), SCENARIO(), and testCellularGridSpaceNDCoFaces().
const Point & DGtal::KhalimskySpaceND< dim, TInteger >::upperBound | ( | ) | const |
Return the upper bound for digital points in this space.
Referenced by main(), SCENARIO(), and TEST_CASE_METHOD().
const Cell & DGtal::KhalimskySpaceND< dim, TInteger >::upperCell | ( | ) | const |
Return the upper bound for cells in this space.
void DGtal::KhalimskySpaceND< dim, TInteger >::uProject | ( | Cell & | p, |
const Cell & | bound, | ||
Dimension | k | ||
) | const |
Projects [p] along the [k]th direction toward [bound].
Otherwise said, p[ k ] == bound[ k ] afterwards
[in,out] | p | any cell. |
[in] | bound | the element acting as bound (same topology as p). |
[in] | k | the concerned coordinate. |
uIsValid(p)
and uIsValid(bound)
and uIsOpen(p, k) == uIsOpen(bound, k)
uIsValid(p)
. Cell DGtal::KhalimskySpaceND< dim, TInteger >::uProjection | ( | const Cell & | p, |
const Cell & | bound, | ||
Dimension | k | ||
) | const |
Return the projection of [p] along the [k]th direction toward [bound].
Otherwise said, p[ k ] == bound[ k ] afterwards.
p | any cell. |
bound | the element acting as bound (same topology as p). |
k | the concerned coordinate. |
uIsValid(p)
and uIsValid(bound)
and uIsOpen(p, k) == uIsOpen(bound, k)
uIsValid(uProjection(p, bound, k))
and uTopology(p) == uTopology(uProjection(p, bound, k))
. Cells DGtal::KhalimskySpaceND< dim, TInteger >::uProperNeighborhood | ( | const Cell & | cell | ) | const |
Computes the proper 1-neighborhood of the cell [c] and returns it.
It is the set of cells with same topology that are adjacent to [c], different from [c] and which are within the bounds of this space.
cell | the unsigned cell of interest. |
uIsValid(cell)
is true. uIsValid(c)
is true for every returned cell c. Referenced by testNeighborhood().
void DGtal::KhalimskySpaceND< dim, TInteger >::uSetCoord | ( | Cell & | c, |
Dimension | k, | ||
Integer | i | ||
) | const |
Sets the [k]-th digital coordinate of [c] to [i].
c | any unsigned cell. |
k | any valid dimension. |
i | an integer coordinate within the space. |
uIsValid(c)
is true and i is within the space bounds if k is a non-periodic dimension. uIsValid(c)
is true. void DGtal::KhalimskySpaceND< dim, TInteger >::uSetCoords | ( | Cell & | c, |
const Point & | kp | ||
) | const |
Sets the digital coordinates of [c] to [kp].
c | any unsigned cell. |
kp | the new Khalimsky coordinates for [c]. |
uIsValid(c)
is true. void DGtal::KhalimskySpaceND< dim, TInteger >::uSetKCoord | ( | Cell & | c, |
Dimension | k, | ||
Integer | i | ||
) | const |
Sets the [k]-th Khalimsky coordinate of [c] to [i].
c | any unsigned cell. |
k | any valid dimension. |
i | an integer coordinate within the space. |
uIsValid(c)
is true and i is within the space bounds if k is a non-periodic dimension. uIsValid(c)
is true. void DGtal::KhalimskySpaceND< dim, TInteger >::uSetKCoords | ( | Cell & | c, |
const Point & | kp | ||
) | const |
Sets the Khalimsky coordinates of [c] to [kp].
c | any unsigned cell. |
kp | the new Khalimsky coordinates for [c]. |
uIsValid(c)
is true. Cell DGtal::KhalimskySpaceND< dim, TInteger >::uSpel | ( | Point | p | ) | const |
From the digital coordinates of a point in Zn, builds the corresponding spel (cell of maximal dimension) lying into this Khalismky space.
Along a non-periodic dimension, if the given digital coordinate lies outside the space, it is replaced by the nearest valid coordinate.
Along a periodic dimension, the digital coordinate is corrected (by periodicity) to lie between the coordinates of lowerCell() and upperCell().
p | an integer point (digital coordinates of cell). |
uIsValid(uSpel(p))
is true. Referenced by main(), SCENARIO(), testCellularGridSpaceNDCoFaces(), testCellularGridSpaceNDFaces(), testFindABel(), and testSurfelAdjacency().
Integer DGtal::KhalimskySpaceND< dim, TInteger >::uTopology | ( | const Cell & | p | ) | const |
Return the topology word of [p].
p | any unsigned cell. |
Referenced by testFaces(), testNeighborhood(), and testScan().
Cell DGtal::KhalimskySpaceND< dim, TInteger >::uTranslation | ( | const Cell & | p, |
const Vector & | vec | ||
) | const |
Add the vector [vec] to [p].
p | any cell. |
vec | any pointel. |
uIsValid(p, k)
and ( uDistanceToMin(p, k) <= vec[k] <= uDistanceToMax(p, k) or isPeriodicSpace(k) )
for each dimension k. uIsValid(uTranslation(p, vec))
is true. Referenced by main().
Cells DGtal::KhalimskySpaceND< dim, TInteger >::uUpperIncident | ( | const Cell & | c | ) | const |
Return the cells directly up incident to c in this space.
c | any unsigned cell. |
uIsValid(c)
is true. uIsValid(b)
is true for every returned cell b.
|
friend |
Definition at line 396 of file KhalimskySpaceND.h.
|
staticconstexpr |
Definition at line 431 of file KhalimskySpaceND.h.
|
staticconstexpr |
Definition at line 430 of file KhalimskySpaceND.h.
Referenced by DGtal::Shortcuts< TKSpace >::getPointelRange(), DGtal::Shortcuts< TKSpace >::getPrimalVertices(), main(), DGtal::Shortcuts< TKSpace >::makeDualPolygonalSurface(), DGtal::Shortcuts< TKSpace >::makePrimalPolygonalSurface(), DGtal::Shortcuts< TKSpace >::makePrimalSurfaceMesh(), DGtal::Shortcuts< TKSpace >::CellReader::operator()(), DGtal::Shortcuts< TKSpace >::SCellReader::operator()(), DGtal::Shortcuts< TKSpace >::CellWriter::operator()(), DGtal::Shortcuts< TKSpace >::outputDualDigitalSurfaceAsObj(), DGtal::Shortcuts< TKSpace >::outputSurfelsAsObj(), DGtal::Shortcuts< TKSpace >::saveOBJ(), DGtal::Shortcuts< TKSpace >::saveOFF(), DGtal::Shortcuts< TKSpace >::saveVectorFieldOBJ(), testCellDrawOnBoard(), testCellularGridSpaceNDCoFaces(), testCellularGridSpaceNDFaces(), testDigitalSurface(), testFaces(), testFindABel(), testNeighborhood(), testScan(), testSurfelAdjacency(), DGtal::functors::VCMAbsoluteCurvatureFunctor< TVCMOnDigitalSurface >::VCMAbsoluteCurvatureFunctor(), DGtal::functors::VCMFirstPrincipalAbsoluteCurvatureFunctor< TVCMOnDigitalSurface >::VCMFirstPrincipalAbsoluteCurvatureFunctor(), DGtal::functors::VCMMeanAbsoluteCurvatures3DFunctor< TVCMOnDigitalSurface >::VCMMeanAbsoluteCurvatures3DFunctor(), and DGtal::functors::VCMSecondPrincipalAbsoluteCurvatureFunctor< TVCMOnDigitalSurface >::VCMSecondPrincipalAbsoluteCurvatureFunctor().
|
private |
Definition at line 2067 of file KhalimskySpaceND.h.
|
private |
Definition at line 2068 of file KhalimskySpaceND.h.
|
private |
Definition at line 2069 of file KhalimskySpaceND.h.
|
private |
Definition at line 2065 of file KhalimskySpaceND.h.
|
private |
Definition at line 2066 of file KhalimskySpaceND.h.
|
staticconstexpr |
Definition at line 433 of file KhalimskySpaceND.h.
Referenced by main().
|
staticconstexpr |
Definition at line 432 of file KhalimskySpaceND.h.
Referenced by main(), testCellDrawOnBoard(), testDirectIncidence(), testExplicitDigitalSurface(), testIncidence(), testLightExplicitDigitalSurface(), and testSurfelAdjacency().