DGtal
1.0.beta
|
#include <DGtal/topology/KhalimskySpaceND.h>
Data Structures | |
struct | CellMap |
struct | SCellMap |
struct | SurfelMap |
Public Types | |
enum | Closure { CLOSED, OPEN, PERIODIC } |
typedef TInteger | Integer |
typedef NumberTraits< Integer >::UnsignedVersion | Size |
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 |
typedef std::set< SCell > | SCellSet |
typedef std::set< SCell > | SurfelSet |
Public Member Functions | |
Standard services | |
~KhalimskySpaceND () | |
KhalimskySpaceND () | |
KhalimskySpaceND (const KhalimskySpaceND &other)=default | |
KhalimskySpaceND & | operator= (const KhalimskySpaceND &other)=default |
KhalimskySpaceND (KhalimskySpaceND &&other)=default | |
KhalimskySpaceND & | operator= (KhalimskySpaceND &&other)=default |
bool | init (const Point &lower, const Point &upper, bool isClosed) |
bool | init (const Point &lower, const Point &upper, Closure closure) |
bool | init (const Point &lower, const Point &upper, const std::array< Closure, dim > &closure) |
Basic services | |
Size | size (Dimension k) const |
Integer | min (Dimension k) const |
Integer | max (Dimension k) const |
const Point & | lowerBound () const |
const Point & | upperBound () const |
const Cell & | lowerCell () const |
const Cell & | upperCell () const |
bool | uIsValid (const PreCell &c, Dimension k) const |
bool | uIsValid (const PreCell &c) const |
bool | sIsValid (const SPreCell &c, Dimension k) const |
bool | sIsValid (const SPreCell &c) const |
bool | cIsValid (const Point &p, Dimension k) const |
bool | cIsValid (const Point &p) const |
Closure type query | |
bool | isSpaceClosed () const |
bool | isSpaceClosed (Dimension k) const |
bool | isSpacePeriodic () const |
bool | isSpacePeriodic (Dimension k) const |
bool | isAnyDimensionPeriodic () const |
Closure | getClosure (Dimension k) const |
Cell creation services | |
Cell | uCell (const PreCell &c) const |
Cell | uCell (const Point &kp) const |
Cell | uCell (Point p, const PreCell &c) const |
SCell | sCell (const SPreCell &c) const |
SCell | sCell (const Point &kp, Sign sign=POS) const |
SCell | sCell (Point p, const SPreCell &c) const |
Cell | uSpel (Point p) const |
SCell | sSpel (Point p, Sign sign=POS) const |
Cell | uPointel (Point p) const |
SCell | sPointel (Point p, Sign sign=POS) const |
Read accessors to cells | |
Integer | uKCoord (const Cell &c, Dimension k) const |
Integer | uCoord (const Cell &c, Dimension k) const |
const Point & | uKCoords (const Cell &c) const |
Point | uCoords (const Cell &c) const |
Integer | sKCoord (const SCell &c, Dimension k) const |
Integer | sCoord (const SCell &c, Dimension k) const |
const Point & | sKCoords (const SCell &c) const |
Point | sCoords (const SCell &c) const |
Sign | sSign (const SCell &c) const |
Write accessors to cells | |
void | uSetKCoord (Cell &c, Dimension k, Integer i) const |
void | sSetKCoord (SCell &c, Dimension k, Integer i) const |
void | uSetCoord (Cell &c, Dimension k, Integer i) const |
void | sSetCoord (SCell &c, Dimension k, Integer i) const |
void | uSetKCoords (Cell &c, const Point &kp) const |
void | sSetKCoords (SCell &c, const Point &kp) const |
void | uSetCoords (Cell &c, const Point &kp) const |
void | sSetCoords (SCell &c, const Point &kp) const |
void | sSetSign (SCell &c, Sign s) const |
Conversion signed/unsigned | |
SCell | signs (const Cell &p, Sign s) const |
Cell | unsigns (const SCell &p) const |
SCell | sOpp (const SCell &p) const |
Cell topology services | |
Integer | uTopology (const Cell &p) const |
Integer | sTopology (const SCell &p) const |
Dimension | uDim (const Cell &p) const |
Dimension | sDim (const SCell &p) const |
bool | uIsSurfel (const Cell &b) const |
bool | sIsSurfel (const SCell &b) const |
bool | uIsOpen (const Cell &p, Dimension k) const |
bool | sIsOpen (const SCell &p, Dimension k) const |
Iterator services for cells | |
DirIterator | uDirs (const Cell &p) const |
DirIterator | sDirs (const SCell &p) const |
DirIterator | uOrthDirs (const Cell &p) const |
DirIterator | sOrthDirs (const SCell &p) const |
Dimension | uOrthDir (const Cell &s) const |
Dimension | sOrthDir (const SCell &s) const |
Unsigned cell geometry services | |
Integer | uFirst (const PreCell &p, Dimension k) const |
Cell | uFirst (const PreCell &p) const |
Integer | uLast (const PreCell &p, Dimension k) const |
Cell | uLast (const PreCell &p) const |
Cell | uGetIncr (const Cell &p, Dimension k) const |
bool | uIsMax (const Cell &p, Dimension k) const |
bool | uIsInside (const PreCell &p, Dimension k) const |
bool | uIsInside (const PreCell &p) const |
bool | cIsInside (const Point &p, Dimension k) const |
bool | cIsInside (const Point &p) const |
Cell | uGetMax (Cell p, Dimension k) const |
Cell | uGetDecr (const Cell &p, Dimension k) const |
bool | uIsMin (const Cell &p, Dimension k) const |
Cell | uGetMin (Cell p, Dimension k) const |
Cell | uGetAdd (const Cell &p, Dimension k, Integer x) const |
Cell | uGetSub (const Cell &p, Dimension k, Integer x) const |
Integer | uDistanceToMax (const Cell &p, Dimension k) const |
Integer | uDistanceToMin (const Cell &p, Dimension k) const |
Cell | uTranslation (const Cell &p, const Vector &vec) const |
Cell | uProjection (const Cell &p, const Cell &bound, Dimension k) const |
void | uProject (Cell &p, const Cell &bound, Dimension k) const |
bool | uNext (Cell &p, const Cell &lower, const Cell &upper) const |
Signed cell geometry services | |
Integer | sFirst (const SPreCell &p, Dimension k) const |
SCell | sFirst (const SPreCell &p) const |
Integer | sLast (const SPreCell &p, Dimension k) const |
SCell | sLast (const SPreCell &p) const |
SCell | sGetIncr (const SCell &p, Dimension k) const |
bool | sIsMax (const SCell &p, Dimension k) const |
bool | sIsInside (const SPreCell &p, Dimension k) const |
bool | sIsInside (const SPreCell &p) const |
SCell | sGetMax (SCell p, Dimension k) const |
SCell | sGetDecr (const SCell &p, Dimension k) const |
bool | sIsMin (const SCell &p, Dimension k) const |
SCell | sGetMin (SCell p, Dimension k) const |
SCell | sGetAdd (const SCell &p, Dimension k, Integer x) const |
SCell | sGetSub (const SCell &p, Dimension k, Integer x) const |
Integer | sDistanceToMax (const SCell &p, Dimension k) const |
Integer | sDistanceToMin (const SCell &p, Dimension k) const |
SCell | sTranslation (const SCell &p, const Vector &vec) const |
SCell | sProjection (const SCell &p, const SCell &bound, Dimension k) const |
void | sProject (SCell &p, const SCell &bound, Dimension k) const |
bool | sNext (SCell &p, const SCell &lower, const SCell &upper) const |
Neighborhood services | |
Cells | uNeighborhood (const Cell &cell) const |
SCells | sNeighborhood (const SCell &cell) const |
Cells | uProperNeighborhood (const Cell &cell) const |
SCells | sProperNeighborhood (const SCell &cell) const |
Cell | uAdjacent (const Cell &p, Dimension k, bool up) const |
SCell | sAdjacent (const SCell &p, Dimension k, bool up) const |
Incidence services | |
Cell | uIncident (const Cell &c, Dimension k, bool up) const |
SCell | sIncident (const SCell &c, Dimension k, bool up) const |
Cells | uLowerIncident (const Cell &c) const |
Cells | uUpperIncident (const Cell &c) const |
SCells | sLowerIncident (const SCell &c) const |
SCells | sUpperIncident (const SCell &c) const |
Cells | uFaces (const Cell &c) const |
Cells | uCoFaces (const Cell &c) const |
bool | sDirect (const SCell &p, Dimension k) const |
SCell | sDirectIncident (const SCell &p, Dimension k) const |
SCell | sIndirectIncident (const SCell &p, Dimension k) const |
DGtal interface | |
void | selfDisplay (std::ostream &out) const |
bool | isValid () const |
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 |
Private Member Functions | |
BOOST_CONCEPT_ASSERT ((concepts::CInteger< TInteger >)) | |
Internals | |
void | uAddFaces (Cells &faces, const Cell &c, Dimension axis) const |
void | uAddCoFaces (Cells &cofaces, const Cell &c, Dimension axis) const |
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 64 of file KhalimskySpaceND.h.
using DGtal::KhalimskySpaceND< dim, TInteger >::AnyCellCollection = typename PreCellularGridSpace::template AnyCellCollection< CellType > |
Definition at line 435 of file KhalimskySpaceND.h.
typedef KhalimskyCell< dim, Integer > DGtal::KhalimskySpaceND< dim, TInteger >::Cell |
Definition at line 414 of file KhalimskySpaceND.h.
typedef AnyCellCollection<Cell> DGtal::KhalimskySpaceND< dim, TInteger >::Cells |
Definition at line 438 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 443 of file KhalimskySpaceND.h.
typedef KhalimskySpaceND<dim, Integer> DGtal::KhalimskySpaceND< dim, TInteger >::CellularGridSpace |
Definition at line 410 of file KhalimskySpaceND.h.
using DGtal::KhalimskySpaceND< dim, TInteger >::DirIterator = typename PreCellularGridSpace::DirIterator |
Definition at line 421 of file KhalimskySpaceND.h.
|
private |
Features basic operations on coordinates, especially for periodic dimensions.
Definition at line 395 of file KhalimskySpaceND.h.
typedef TInteger DGtal::KhalimskySpaceND< dim, TInteger >::Integer |
Arithmetic ring induced by (+,-,*) and Integer numbers.
Definition at line 403 of file KhalimskySpaceND.h.
typedef PointVector< dim, Integer > DGtal::KhalimskySpaceND< dim, TInteger >::Point |
Definition at line 424 of file KhalimskySpaceND.h.
typedef KhalimskyPreCell< dim, Integer > DGtal::KhalimskySpaceND< dim, TInteger >::PreCell |
Definition at line 415 of file KhalimskySpaceND.h.
typedef KhalimskyPreSpaceND<dim, Integer> DGtal::KhalimskySpaceND< dim, TInteger >::PreCellularGridSpace |
Definition at line 411 of file KhalimskySpaceND.h.
typedef SignedKhalimskyCell< dim, Integer > DGtal::KhalimskySpaceND< dim, TInteger >::SCell |
Definition at line 416 of file KhalimskySpaceND.h.
typedef AnyCellCollection<SCell> DGtal::KhalimskySpaceND< dim, TInteger >::SCells |
Definition at line 439 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 446 of file KhalimskySpaceND.h.
typedef bool DGtal::KhalimskySpaceND< dim, TInteger >::Sign |
Definition at line 420 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 406 of file KhalimskySpaceND.h.
typedef SpaceND<dim, Integer> DGtal::KhalimskySpaceND< dim, TInteger >::Space |
Definition at line 409 of file KhalimskySpaceND.h.
typedef SignedKhalimskyPreCell< dim, Integer > DGtal::KhalimskySpaceND< dim, TInteger >::SPreCell |
Definition at line 417 of file KhalimskySpaceND.h.
typedef SCell DGtal::KhalimskySpaceND< dim, TInteger >::Surfel |
Definition at line 419 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 449 of file KhalimskySpaceND.h.
typedef PointVector< dim, Integer > DGtal::KhalimskySpaceND< dim, TInteger >::Vector |
Definition at line 425 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 470 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 |
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 >::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 >::cIsValid | ( | const Point & | p, |
Dimension | k | ||
) | const |
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. bool DGtal::KhalimskySpaceND< dim, TInteger >::cIsValid | ( | const Point & | p | ) | const |
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. 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 DGtal::functions::generateVoxelComplexTable().
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. |
bool DGtal::KhalimskySpaceND< dim, TInteger >::isAnyDimensionPeriodic | ( | ) | const |
bool DGtal::KhalimskySpaceND< dim, TInteger >::isSpaceClosed | ( | ) | const |
bool DGtal::KhalimskySpaceND< dim, TInteger >::isSpaceClosed | ( | Dimension | k | ) | const |
k | the dimension. |
bool DGtal::KhalimskySpaceND< dim, TInteger >::isSpacePeriodic | ( | ) | const |
bool DGtal::KhalimskySpaceND< dim, TInteger >::isSpacePeriodic | ( | Dimension | k | ) | const |
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 |
const Cell& DGtal::KhalimskySpaceND< dim, TInteger >::lowerCell | ( | ) | const |
Integer DGtal::KhalimskySpaceND< dim, TInteger >::max | ( | Dimension | k | ) | const |
k | a coordinate. |
Integer DGtal::KhalimskySpaceND< dim, TInteger >::min | ( | Dimension | k | ) | const |
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 |
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 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)
. 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 | ( | 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 |
c | any signed cell. |
k | any valid dimension. |
uIsValid(c)
is true. Point DGtal::KhalimskySpaceND< dim, TInteger >::sCoords | ( | const SCell & | c | ) | const |
c | any signed cell. |
uIsValid(c)
is true. Referenced by 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()(), and DGtal::functors::SCellToCode< KSpace >::operator()().
Dimension DGtal::KhalimskySpaceND< dim, TInteger >::sDim | ( | const SCell & | p | ) | const |
p | any signed cell. |
Referenced by DGtal::functors::SCellToPoint< KSpace >::operator()().
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. |
SCell DGtal::KhalimskySpaceND< dim, TInteger >::sDirectIncident | ( | const SCell & | p, |
Dimension | k | ||
) | const |
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 DGtal::functors::SCellToInnerPoint< KSpace >::operator()(), and DGtal::functors::SCellToIncidentPoints< KSpace >::operator()().
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 DGtal::functors::SCellToPoint< KSpace >::operator()(), DGtal::functors::SCellToArrow< KSpace >::operator()(), and DGtal::functors::SCellToCode< KSpace >::operator()().
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. |
Integer DGtal::KhalimskySpaceND< dim, TInteger >::sFirst | ( | const SPreCell & | p, |
Dimension | k | ||
) | const |
lowerCell()[k]
and upperCell()[k]
. SCell DGtal::KhalimskySpaceND< dim, TInteger >::sFirst | ( | const SPreCell & | p | ) | const |
sIsValid(sFirst(p))
is true. SCell DGtal::KhalimskySpaceND< dim, TInteger >::sGetAdd | ( | const SCell & | p, |
Dimension | k, | ||
Integer | x | ||
) | const |
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 |
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 |
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 |
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 |
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. SCell DGtal::KhalimskySpaceND< dim, TInteger >::sIndirectIncident | ( | const SCell & | p, |
Dimension | k | ||
) | const |
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 DGtal::functors::SCellToPoint< KSpace >::operator()(), DGtal::functors::SCellToArrow< KSpace >::operator()(), DGtal::functors::SCellToOuterPoint< KSpace >::operator()(), DGtal::functors::SCellToIncidentPoints< KSpace >::operator()(), and DGtal::functors::SCellToCode< KSpace >::operator()().
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. |
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 >::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 |
p | any signed cell. |
k | any direction. |
bool DGtal::KhalimskySpaceND< dim, TInteger >::sIsSurfel | ( | const SCell & | b | ) | const |
b | any signed cell. |
bool DGtal::KhalimskySpaceND< dim, TInteger >::sIsValid | ( | const SPreCell & | c, |
Dimension | k | ||
) | const |
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. bool DGtal::KhalimskySpaceND< dim, TInteger >::sIsValid | ( | const SPreCell & | c | ) | const |
c | a signed cell. |
true
if the given signed cell has Khalimsky coordinates between those of the cells returned by lowerCell and upperCell. Size DGtal::KhalimskySpaceND< dim, TInteger >::size | ( | Dimension | k | ) | const |
k | a dimension. |
Integer DGtal::KhalimskySpaceND< dim, TInteger >::sKCoord | ( | const SCell & | c, |
Dimension | k | ||
) | const |
c | any signed cell. |
k | any valid dimension. |
uIsValid(c)
is true. const Point& DGtal::KhalimskySpaceND< dim, TInteger >::sKCoords | ( | const SCell & | c | ) | const |
c | any signed cell. |
uIsValid(c)
is true. Referenced by DGtal::functors::deprecated::SCellToMidPoint< KSpace >::operator()(), DGtal::functors::SCellToArrow< KSpace >::operator()(), and DGtal::functors::SCellToCode< KSpace >::operator()().
Integer DGtal::KhalimskySpaceND< dim, TInteger >::sLast | ( | const SPreCell & | p, |
Dimension | k | ||
) | const |
lowerCell()[k]
and upperCell()[k]
. SCell DGtal::KhalimskySpaceND< dim, TInteger >::sLast | ( | const SPreCell & | p | ) | const |
sIsValid(sLast(p))
is true. SCells DGtal::KhalimskySpaceND< dim, TInteger >::sLowerIncident | ( | const SCell & | c | ) | const |
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. 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. 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. 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 |
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 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. 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. 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 |
c | any signed cell. |
uIsValid(c)
is true. 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. Integer DGtal::KhalimskySpaceND< dim, TInteger >::sTopology | ( | const SCell & | p | ) | const |
p | any signed cell. |
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. SCells DGtal::KhalimskySpaceND< dim, TInteger >::sUpperIncident | ( | const SCell & | c | ) | const |
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 |
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 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)
. 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 | ( | 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 |
c | any unsigned cell. |
uIsValid(c)
is true. uIsValid(b)
is true for every returned cell b. Integer DGtal::KhalimskySpaceND< dim, TInteger >::uCoord | ( | const Cell & | c, |
Dimension | k | ||
) | const |
c | any unsigned cell. |
k | any valid dimension. |
uIsValid(c)
is true. Point DGtal::KhalimskySpaceND< dim, TInteger >::uCoords | ( | const Cell & | c | ) | const |
c | any unsigned cell. |
uIsValid(c)
is true. Dimension DGtal::KhalimskySpaceND< dim, TInteger >::uDim | ( | const Cell & | p | ) | const |
p | any unsigned cell. |
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 |
c | any unsigned cell. |
uIsValid(c)
is true. uIsValid(b)
is true for every returned cell b. Integer DGtal::KhalimskySpaceND< dim, TInteger >::uFirst | ( | const PreCell & | p, |
Dimension | k | ||
) | const |
lowerCell()[k]
and upperCell()[k]
. Cell DGtal::KhalimskySpaceND< dim, TInteger >::uFirst | ( | const PreCell & | p | ) | const |
uIsValid(uFirst(p))
is true. Cell DGtal::KhalimskySpaceND< dim, TInteger >::uGetAdd | ( | const Cell & | p, |
Dimension | k, | ||
Integer | x | ||
) | const |
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 |
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 |
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. 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 |
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 |
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. 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. |
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 >::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 |
p | any cell. |
k | any direction. |
bool DGtal::KhalimskySpaceND< dim, TInteger >::uIsSurfel | ( | const Cell & | b | ) | const |
b | any unsigned cell. |
bool DGtal::KhalimskySpaceND< dim, TInteger >::uIsValid | ( | const PreCell & | c, |
Dimension | k | ||
) | const |
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. bool DGtal::KhalimskySpaceND< dim, TInteger >::uIsValid | ( | const PreCell & | c | ) | const |
c | a unsigned cell. |
true
if the given unsigned cell has Khalimsky coordinates between those of the cells returned by lowerCell and upperCell. Integer DGtal::KhalimskySpaceND< dim, TInteger >::uKCoord | ( | const Cell & | c, |
Dimension | k | ||
) | const |
c | any unsigned cell. |
k | any valid dimension. |
uIsValid(c)
is true. const Point& DGtal::KhalimskySpaceND< dim, TInteger >::uKCoords | ( | const Cell & | c | ) | const |
c | any unsigned cell. |
uIsValid(c)
is true. Integer DGtal::KhalimskySpaceND< dim, TInteger >::uLast | ( | const PreCell & | p, |
Dimension | k | ||
) | const |
lowerCell()[k]
and upperCell()[k]
. Cell DGtal::KhalimskySpaceND< dim, TInteger >::uLast | ( | const PreCell & | p | ) | const |
uIsValid(uLast(p))
is true. Cells DGtal::KhalimskySpaceND< dim, TInteger >::uLowerIncident | ( | const Cell & | c | ) | const |
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. 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. 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. 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. const Point& DGtal::KhalimskySpaceND< dim, TInteger >::upperBound | ( | ) | const |
const Cell& DGtal::KhalimskySpaceND< dim, TInteger >::upperCell | ( | ) | const |
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. 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. Integer DGtal::KhalimskySpaceND< dim, TInteger >::uTopology | ( | const Cell & | p | ) | const |
p | any unsigned cell. |
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 |
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.
|
static |
Definition at line 430 of file KhalimskySpaceND.h.
|
static |
Definition at line 429 of file KhalimskySpaceND.h.
Referenced by DGtal::Shortcuts< TKSpace >::getPrimalVertices(), DGtal::Shortcuts< TKSpace >::makeDualPolygonalSurface(), DGtal::Shortcuts< TKSpace >::makePrimalPolygonalSurface(), DGtal::Shortcuts< TKSpace >::CellWriter::operator()(), DGtal::Shortcuts< TKSpace >::CellReader::operator()(), DGtal::Shortcuts< TKSpace >::SCellReader::operator()(), DGtal::Shortcuts< TKSpace >::outputDualDigitalSurfaceAsObj(), DGtal::Shortcuts< TKSpace >::outputSurfelsAsObj(), DGtal::Shortcuts< TKSpace >::saveOBJ(), 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 1932 of file KhalimskySpaceND.h.
|
private |
Definition at line 1933 of file KhalimskySpaceND.h.
|
private |
Definition at line 1934 of file KhalimskySpaceND.h.
|
private |
Definition at line 1930 of file KhalimskySpaceND.h.
|
private |
Definition at line 1931 of file KhalimskySpaceND.h.
|
static |
Definition at line 432 of file KhalimskySpaceND.h.
|
static |
Definition at line 431 of file KhalimskySpaceND.h.