DGtal 1.4.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. | |
typedef NumberTraits< Integer >::UnsignedVersion | Size |
Type used to represent sizes in the digital space. | |
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). | |
typedef std::set< SCell > | SCellSet |
Preferred type for defining a set of SCell(s). | |
typedef std::set< SCell > | SurfelSet |
Preferred type for defining a set of surfels (always signed cells). | |
Public Member Functions | |
Standard services | |
~KhalimskySpaceND () | |
Destructor. | |
KhalimskySpaceND () | |
Default constructor. | |
KhalimskySpaceND (const Point &lower, const Point &upper, bool isClosed) | |
Constructor from upper and lower bounds for the maximal cells in this space. | |
KhalimskySpaceND (const KhalimskySpaceND &other)=default | |
Copy constructor. | |
KhalimskySpaceND & | operator= (const KhalimskySpaceND &other)=default |
Copy operator. | |
KhalimskySpaceND (KhalimskySpaceND &&other)=default | |
Move constructor. | |
KhalimskySpaceND & | operator= (KhalimskySpaceND &&other)=default |
Move operator. | |
bool | init (const Point &lower, const Point &upper, bool isClosed) |
Specifies the upper and lower bounds for the maximal cells in this space. | |
bool | init (const Point &lower, const Point &upper, Closure closure) |
Specifies the upper and lower bounds for the maximal cells in this space. | |
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. | |
Basic services | |
Size | size (Dimension k) const |
Return the width of the space in the k-dimension. | |
Integer | min (Dimension k) const |
Return the minimal digital coordinate in the k-dimension. | |
Integer | max (Dimension k) const |
Return the maximal digital coordinate in the k-dimension. | |
const Point & | lowerBound () const |
Return the lower bound for digital points in this space. | |
const Point & | upperBound () const |
Return the upper bound for digital points in this space. | |
const Cell & | lowerCell () const |
Return the lower bound for cells in this space. | |
const Cell & | upperCell () const |
Return the upper bound for cells in this space. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
Closure type query | |
bool | isSpaceClosed () const |
Return 'true' iff the space is closed or periodic along every dimension. | |
bool | isSpaceClosed (Dimension k) const |
Return 'true' iff the space is closed or periodic along the specified dimension. | |
bool | isSpacePeriodic () const |
Return 'true' iff the space is periodic along every dimension. | |
bool | isSpacePeriodic (Dimension k) const |
Return 'true' iff the space is periodic along the specified dimension. | |
bool | isAnyDimensionPeriodic () const |
Return 'true' iff the space is periodic along at least one dimension. | |
Closure | getClosure (Dimension k) const |
Gets closure type. | |
Cell creation services | |
Cell | uCell (const PreCell &c) const |
From an unsigned cell, returns an unsigned cell lying into this Khalismky space. | |
Cell | uCell (const Point &kp) const |
From the Khalimsky coordinates of a cell, builds the corresponding unsigned cell lying into this Khalismky space. | |
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. | |
SCell | sCell (const SPreCell &c) const |
From a signed cell, returns a signed cell lying into this Khalismky space. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
Read accessors to cells | |
Integer | uKCoord (const Cell &c, Dimension k) const |
Return its Khalimsky coordinate along [k]. | |
Integer | uCoord (const Cell &c, Dimension k) const |
Return its digital coordinate along [k]. | |
const Point & | uKCoords (const Cell &c) const |
Return its Khalimsky coordinates. | |
Point | uCoords (const Cell &c) const |
Return its digital coordinates. | |
Integer | sKCoord (const SCell &c, Dimension k) const |
Return its Khalimsky coordinate along [k]. | |
Integer | sCoord (const SCell &c, Dimension k) const |
Return its digital coordinate along [k]. | |
const Point & | sKCoords (const SCell &c) const |
Return its Khalimsky coordinates. | |
Point | sCoords (const SCell &c) const |
Return its digital coordinates. | |
Sign | sSign (const SCell &c) const |
Return its sign. | |
Write accessors to cells | |
void | uSetKCoord (Cell &c, Dimension k, Integer i) const |
Sets the [k]-th Khalimsky coordinate of [c] to [i]. | |
void | sSetKCoord (SCell &c, Dimension k, Integer i) const |
Sets the [k]-th Khalimsky coordinate of [c] to [i]. | |
void | uSetCoord (Cell &c, Dimension k, Integer i) const |
Sets the [k]-th digital coordinate of [c] to [i]. | |
void | sSetCoord (SCell &c, Dimension k, Integer i) const |
Sets the [k]-th digital coordinate of [c] to [i]. | |
void | uSetKCoords (Cell &c, const Point &kp) const |
Sets the Khalimsky coordinates of [c] to [kp]. | |
void | sSetKCoords (SCell &c, const Point &kp) const |
Sets the Khalimsky coordinates of [c] to [kp]. | |
void | uSetCoords (Cell &c, const Point &kp) const |
Sets the digital coordinates of [c] to [kp]. | |
void | sSetCoords (SCell &c, const Point &kp) const |
Sets the digital coordinates of [c] to [kp]. | |
void | sSetSign (SCell &c, Sign s) const |
Sets the sign of the cell. | |
Conversion signed/unsigned | |
SCell | signs (const Cell &p, Sign s) const |
Creates a signed cell from an unsigned one and a given sign. | |
Cell | unsigns (const SCell &p) const |
Creates an unsigned cell from a signed one. | |
SCell | sOpp (const SCell &p) const |
Creates the signed cell with the inverse sign of [p]. | |
Cell topology services | |
Integer | uTopology (const Cell &p) const |
Return the topology word of [p]. | |
Integer | sTopology (const SCell &p) const |
Return the topology word of [p]. | |
Dimension | uDim (const Cell &p) const |
Return the dimension of the cell [p]. | |
Dimension | sDim (const SCell &p) const |
Return the dimension of the cell [p]. | |
bool | uIsSurfel (const Cell &b) const |
Return 'true' if [b] is a surfel (spans all but one coordinate). | |
bool | sIsSurfel (const SCell &b) const |
Return 'true' if [b] is a surfel (spans all but one coordinate). | |
bool | uIsOpen (const Cell &p, Dimension k) const |
Return 'true' if [p] is open along the direction [k]. | |
bool | sIsOpen (const SCell &p, Dimension k) const |
Return 'true' if [p] is open along the direction [k]. | |
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. | |
DirIterator | sDirs (const SCell &p) const |
Given a signed cell [p], returns an iterator to iterate over each coordinate the cell spans. | |
DirIterator | uOrthDirs (const Cell &p) const |
Given an unsigned cell [p], returns an iterator to iterate over each coordinate the cell does not span. | |
DirIterator | sOrthDirs (const SCell &p) const |
Given a signed cell [p], returns an iterator to iterate over each coordinate the cell does not span. | |
Dimension | uOrthDir (const Cell &s) const |
Given an unsigned surfel [s], returns its orthogonal direction (ie, the coordinate where the surfel is closed). | |
Dimension | sOrthDir (const SCell &s) const |
Given a signed surfel [s], returns its orthogonal direction (ie, the coordinate where the surfel is closed). | |
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]. | |
Cell | uFirst (const PreCell &p) const |
Return the first cell of the space with the same type as [p]. | |
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]. | |
Cell | uLast (const PreCell &p) const |
Return the last cell of the space with the same type as [p]. | |
Cell | uGetIncr (const Cell &p, Dimension k) const |
Return the same element as [p] except for the incremented coordinate [k]. | |
bool | uIsMax (const Cell &p, Dimension k) const |
Useful to check if you are going out of the space. | |
bool | uIsInside (const PreCell &p, Dimension k) const |
Useful to check if you are going out of the space. | |
bool | uIsInside (const PreCell &p) const |
Useful to check if you are going out of the space. | |
bool | cIsInside (const Point &p, Dimension k) const |
Useful to check if you are going out of the space. | |
bool | cIsInside (const Point &p) const |
Useful to check if you are going out of the space. | |
Cell | uGetMax (Cell p, Dimension k) const |
Useful to check if you are going out of the space. | |
Cell | uGetDecr (const Cell &p, Dimension k) const |
Return the same element as [p] except for an decremented coordinate [k]. | |
bool | uIsMin (const Cell &p, Dimension k) const |
Useful to check if you are going out of the space. | |
Cell | uGetMin (Cell p, Dimension k) const |
Useful to check if you are going out of the space. | |
Cell | uGetAdd (const Cell &p, Dimension k, Integer x) const |
Return the same element as [p] except for a coordinate [k] incremented with x. | |
Cell | uGetSub (const Cell &p, Dimension k, Integer x) const |
Return the same element as [p] except for a coordinate [k] decremented with x. | |
Integer | uDistanceToMax (const Cell &p, Dimension k) const |
Useful to check if you are going out of the space (for non-periodic dimensions). | |
Integer | uDistanceToMin (const Cell &p, Dimension k) const |
Useful to check if you are going out of the space (for non-periodic dimensions). | |
Cell | uTranslation (const Cell &p, const Vector &vec) const |
Add the vector [vec] to [p]. | |
Cell | uProjection (const Cell &p, const Cell &bound, Dimension k) const |
Return the projection of [p] along the [k]th direction toward [bound]. | |
void | uProject (Cell &p, const Cell &bound, Dimension k) const |
Projects [p] along the [k]th direction toward [bound]. | |
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). | |
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]. | |
SCell | sFirst (const SPreCell &p) const |
Return the first cell of the space with the same type as [p]. | |
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]. | |
SCell | sLast (const SPreCell &p) const |
Return the last cell of the space with the same type as [p]. | |
SCell | sGetIncr (const SCell &p, Dimension k) const |
Return the same element as [p] except for the incremented coordinate [k]. | |
bool | sIsMax (const SCell &p, Dimension k) const |
Useful to check if you are going out of the space. | |
bool | sIsInside (const SPreCell &p, Dimension k) const |
Useful to check if you are going out of the space. | |
bool | sIsInside (const SPreCell &p) const |
Useful to check if you are going out of the space. | |
SCell | sGetMax (SCell p, Dimension k) const |
Useful to check if you are going out of the space. | |
SCell | sGetDecr (const SCell &p, Dimension k) const |
Return the same element as [p] except for an decremented coordinate [k]. | |
bool | sIsMin (const SCell &p, Dimension k) const |
Useful to check if you are going out of the space. | |
SCell | sGetMin (SCell p, Dimension k) const |
Useful to check if you are going out of the space. | |
SCell | sGetAdd (const SCell &p, Dimension k, Integer x) const |
Return the same element as [p] except for a coordinate [k] incremented with x. | |
SCell | sGetSub (const SCell &p, Dimension k, Integer x) const |
Return the same element as [p] except for a coordinate [k] decremented with x. | |
Integer | sDistanceToMax (const SCell &p, Dimension k) const |
Useful to check if you are going out of the space (for non-periodic dimensions). | |
Integer | sDistanceToMin (const SCell &p, Dimension k) const |
Useful to check if you are going out of the space (for non-periodic dimensions). | |
SCell | sTranslation (const SCell &p, const Vector &vec) const |
Add the vector [vec] to [p]. | |
SCell | sProjection (const SCell &p, const SCell &bound, Dimension k) const |
Return the projection of [p] along the [k]th direction toward [bound]. | |
void | sProject (SCell &p, const SCell &bound, Dimension k) const |
Projects [p] along the [k]th direction toward [bound]. | |
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). | |
Neighborhood services | |
Cells | uNeighborhood (const Cell &cell) const |
Computes the 1-neighborhood of the cell [c] and returns it. | |
SCells | sNeighborhood (const SCell &cell) const |
Computes the 1-neighborhood of the cell [c] and returns it. | |
Cells | uProperNeighborhood (const Cell &cell) const |
Computes the proper 1-neighborhood of the cell [c] and returns it. | |
SCells | sProperNeighborhood (const SCell &cell) const |
Computes the proper 1-neighborhood of the cell [c] and returns it. | |
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. | |
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. | |
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]. | |
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]. | |
Cells | uLowerIncident (const Cell &c) const |
Return the cells directly low incident to c in this space. | |
Cells | uUpperIncident (const Cell &c) const |
Return the cells directly up incident to c in this space. | |
SCells | sLowerIncident (const SCell &c) const |
Return the signed cells directly low incident to c in this space. | |
SCells | sUpperIncident (const SCell &c) const |
Return the signed cells directly up incident to c in this space. | |
Cells | uFaces (const Cell &c) const |
Return the proper faces of [c] (chain of lower incidence) that belong to the space. | |
Cells | uCoFaces (const Cell &c) const |
Return the proper cofaces of [c] (chain of upper incidence) that belong to the space. | |
bool | sDirect (const SCell &p, Dimension k) const |
Return 'true' if the direct orientation of [p] along [k] is in the positive coordinate direction. | |
SCell | sDirectIncident (const SCell &p, Dimension k) const |
Return the direct incident cell of [p] along [k] (the incident cell along [k]) | |
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). | |
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). | |
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). | |
DGtal interface | |
void | selfDisplay (std::ostream &out) const |
Writes/Displays the object on an output stream. | |
bool | isValid () const |
Checks the validity/consistency of the object. | |
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. | |
Private Member Functions | |
BOOST_CONCEPT_ASSERT ((concepts::CInteger< TInteger >)) | |
Integer must be signed to characterize a ring. | |
Internals | |
void | uAddFaces (Cells &faces, const Cell &c, Dimension axis) const |
Used by uFaces for computing incident faces. | |
void | uAddCoFaces (Cells &cofaces, const Cell &c, Dimension axis) const |
Used by uCoFaces for computing incident cofaces. | |
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.
DGtal::KhalimskySpaceND< dim, TInteger >::KhalimskySpaceND | ( | const Point & | lower, |
const Point & | upper, | ||
bool | isClosed ) |
Constructor from 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. |
|
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(), main(), main(), Object3D(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), test3dSurfaceHelper(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), testBallQuad(), testCombinatorialSurface(), testCompareEstimator(), testComputeInterior(), testCube(), testCurvature2d(), testDigitalSetBoundary(), testDigitalSurface(), testDigitalSurfaceBoostGraphInterface(), testDigitization(), testEmbedder(), testEstimatorCache(), testExplicitDigitalSurface(), testFindABel(), testFitting(), testGaussianCurvature3d(), testImplicitDigitalSurface(), testLightExplicitDigitalSurface(), testLightImplicitDigitalSurface(), testLocalConvolutionNormalVectorEstimator(), 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(), 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::SCellToArrow< KSpace >::operator()(), DGtal::functors::SCellToCode< KSpace >::operator()(), DGtal::functors::SCellToIncidentPoints< KSpace >::operator()(), DGtal::functors::SCellToInnerPoint< KSpace >::operator()(), DGtal::functors::SCellToOuterPoint< KSpace >::operator()(), DGtal::functors::SCellToPoint< 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::SCellToIncidentPoints< KSpace >::operator()(), DGtal::functors::SCellToInnerPoint< 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::SCellToArrow< KSpace >::operator()(), DGtal::functors::SCellToCode< KSpace >::operator()(), DGtal::functors::SCellToPoint< 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(), 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::SCellToArrow< KSpace >::operator()(), DGtal::functors::SCellToCode< KSpace >::operator()(), DGtal::functors::SCellToIncidentPoints< KSpace >::operator()(), DGtal::functors::SCellToOuterPoint< KSpace >::operator()(), DGtal::functors::SCellToPoint< 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::SCellToIncidentPoints< KSpace >::operator()(), DGtal::functors::SCellToInnerPoint< KSpace >::operator()(), and DGtal::functors::SCellToOuterPoint< 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(), 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(), main(), main(), SCENARIO(), 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. |
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(), 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(), main(), SCENARIO(), SCENARIO(), and testCellularGridSpaceNDCoFaces().
const Point & DGtal::KhalimskySpaceND< dim, TInteger >::upperBound | ( | ) | const |
Return the upper bound for digital points in this space.
Referenced by main(), 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(), main(), main(), SCENARIO(), SCENARIO(), SCENARIO(), SCENARIO(), 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. 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 >::makeDualPolygonalSurface(), DGtal::Shortcuts< TKSpace >::makePrimalPolygonalSurface(), DGtal::Shortcuts< TKSpace >::makePrimalSurfaceMesh(), DGtal::Shortcuts< TKSpace >::CellReader::operator()(), DGtal::Shortcuts< TKSpace >::CellWriter::operator()(), DGtal::Shortcuts< TKSpace >::SCellReader::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 2080 of file KhalimskySpaceND.h.
|
private |
Definition at line 2081 of file KhalimskySpaceND.h.
|
private |
Definition at line 2082 of file KhalimskySpaceND.h.
|
private |
Definition at line 2078 of file KhalimskySpaceND.h.
|
private |
Definition at line 2079 of file KhalimskySpaceND.h.
|
staticconstexpr |
Definition at line 433 of file KhalimskySpaceND.h.
|
staticconstexpr |
Definition at line 432 of file KhalimskySpaceND.h.
Referenced by main(), main(), testCellDrawOnBoard(), testDirectIncidence(), testExplicitDigitalSurface(), testIncidence(), testLightExplicitDigitalSurface(), and testSurfelAdjacency().