DGtal  1.1.0
KhalimskySpaceND.h
1
17 #pragma once
18
33 #if defined(KhalimskySpaceND_RECURSES)
34 #error Recursive header files inclusion detected in KhalimskySpaceND.h
35 #else // defined(KhalimskySpaceND_RECURSES)
36
37 #define KhalimskySpaceND_RECURSES
38
39 #if !defined KhalimskySpaceND_h
40
41 #define KhalimskySpaceND_h
42
44 // Inclusions
45 #include <iostream>
46 #include <set>
47 #include <map>
48 #include <array>
49 #include <DGtal/base/Common.h>
50 #include <DGtal/kernel/CInteger.h>
51 #include <DGtal/kernel/PointVector.h>
52 #include <DGtal/kernel/SpaceND.h>
53 #include <DGtal/topology/KhalimskyPreSpaceND.h>
55
56 namespace DGtal
57 {
59  // Pre-declaration
60  template <
61  Dimension dim,
62  typename TInteger = DGtal::int32_t
63  >
64  class KhalimskySpaceND;
65
67
70  template < class TKhalimskySpace >
72
74
80  template < Dimension dim,
81  typename TInteger = DGtal::int32_t >
83  {
84
87
88
89  // Aliases
90  public:
91  using Integer = TInteger;
98
99  // Friendship
100  friend class KhalimskySpaceND< dim, TInteger >;
102
103  private:
106
107  private:
108
113  explicit KhalimskyCell( const Point & aPoint );
114
119  explicit KhalimskyCell( const PreCell & aCell );
120
121  public:
123  operator PreCell const& () const;
124
126  PreCell const& preCell() const;
127
128  private:
130  explicit operator PreCell & ();
131
132  public:
136  explicit KhalimskyCell( Integer dummy = 0 );
137
141  KhalimskyCell( const KhalimskyCell & other ) = default;
142
146  KhalimskyCell & operator=( const KhalimskyCell & other ) = default;
147
151  KhalimskyCell( KhalimskyCell && other ) = default;
152
156  KhalimskyCell & operator=( KhalimskyCell && other ) = default;
157
162  bool operator==( const KhalimskyCell & other ) const;
163
168  bool operator!=( const KhalimskyCell & other ) const;
169
174  bool operator<( const KhalimskyCell & other ) const;
175
176  // --------------- CDrawableWithBoard2D realization -------------------
177  public:
178
183  //DrawableWithBoard2D* defaultStyle( std::string mode = "" ) const;
184
188  std::string className() const;
189
190  };
191
192  template < Dimension dim,
193  typename TInteger >
194  std::ostream &
195  operator<<( std::ostream & out,
196  const KhalimskyCell< dim, TInteger > & object );
197
198
200
206  template < Dimension dim,
207  typename TInteger = DGtal::int32_t >
209  {
212
213  // Aliases
214  public:
215  using Integer = TInteger;
222
223  // Friendship
224  friend class KhalimskySpaceND< dim, TInteger >;
226
227  private:
230
231  private:
237  explicit SignedKhalimskyCell( const Point & aPoint, bool positive );
238
243  explicit SignedKhalimskyCell( const SPreCell & aCell );
244
245  public:
247  operator SPreCell const& () const;
248
250  SPreCell const& preCell() const;
251
252  private:
254  explicit operator SPreCell & ();
255
256  public:
260  explicit SignedKhalimskyCell( Integer dummy = 0 );
261
265  SignedKhalimskyCell( const SignedKhalimskyCell & other ) = default;
266
270  SignedKhalimskyCell & operator=( const SignedKhalimskyCell & other ) = default;
271
276
281
286  bool operator==( const SignedKhalimskyCell & other ) const;
287
292  bool operator!=( const SignedKhalimskyCell & other ) const;
293
298  bool operator<( const SignedKhalimskyCell & other ) const;
299
300  // --------------- CDrawableWithBoard2D realization -------------------
301  public:
302
307  //DrawableWithBoard2D* defaultStyle( std::string mode = "" ) const;
308
313  std::string className() const;
314
315  };
316
317  template < Dimension dim,
318  typename TInteger >
319  std::ostream &
320  operator<<( std::ostream & out,
321  const SignedKhalimskyCell< dim, TInteger > & object );
322
324  // template class KhalimskySpaceND
388  template <
389  Dimension dim,
390  typename TInteger
391  >
393  : private KhalimskySpaceNDHelper< KhalimskySpaceND< dim, TInteger > >
394  {
395
397  friend class KhalimskySpaceNDHelper< KhalimskySpaceND< dim, TInteger > >;
398
401
402  public:
404  typedef TInteger Integer;
405
408
409  // Spaces
413
414  // Cells
419
420  typedef SCell Surfel;
421  typedef bool Sign;
423
424  // Points and Vectors
427
428
429  // static constants
430  static const constexpr Dimension dimension = dim;
431  static const constexpr Dimension DIM = dim;
432  static const constexpr Sign POS = true;
433  static const constexpr Sign NEG = false;
434
435  template < typename CellType >
436  using AnyCellCollection = typename PreCellularGridSpace::template AnyCellCollection< CellType >;
437
438  // Neighborhoods, Incident cells, Faces and Cofaces
441
442  // Sets, Maps
444  typedef std::set<Cell> CellSet;
445
447  typedef std::set<SCell> SCellSet;
448
450  typedef std::set<SCell> SurfelSet;
451
454  template <typename Value> struct CellMap {
455  typedef std::map<Cell,Value> Type;
456  };
457
460  template <typename Value> struct SCellMap {
461  typedef std::map<SCell,Value> Type;
462  };
463
466  template <typename Value> struct SurfelMap {
467  typedef std::map<SCell,Value> Type;
468  };
469
471  enum Closure
472  {
475  PERIODIC
476  };
477
478  // ----------------------- Standard services ------------------------------
482  public:
483
486
489
494  KhalimskySpaceND ( const KhalimskySpaceND & other ) = default;
495
501  KhalimskySpaceND & operator= ( const KhalimskySpaceND & other ) = default;
502
507  KhalimskySpaceND ( KhalimskySpaceND && other ) = default;
508
515
526  bool init( const Point & lower,
527  const Point & upper,
528  bool isClosed );
529
541  bool init( const Point & lower,
542  const Point & upper,
543  Closure closure );
544
556  bool init( const Point & lower,
557  const Point & upper,
558  const std::array<Closure, dim> & closure );
559
561
562  // ------------------------- Basic services ------------------------------
566  public:
567
574  Size size( Dimension k ) const;
575
582  Integer min( Dimension k ) const;
583
590  Integer max( Dimension k ) const;
591
597  const Point & lowerBound() const;
598
604  const Point & upperBound() const;
605
611  const Cell & lowerCell() const;
612
618  const Cell & upperCell() const;
619
632  bool uIsValid( const PreCell & c, Dimension k ) const;
633
645  bool uIsValid( const PreCell & c ) const;
646
659  bool sIsValid( const SPreCell & c, Dimension k ) const;
660
672  bool sIsValid( const SPreCell & c ) const;
673
684  bool cIsValid( const Point & p, Dimension k ) const;
685
695  bool cIsValid( const Point & p ) const;
696
698
699  // ----------------------- Closure type query --------------------------
703  public:
704
709  bool isSpaceClosed() const;
710
716  bool isSpaceClosed( Dimension k ) const;
717
722  bool isSpacePeriodic() const;
723
729  bool isSpacePeriodic( Dimension k ) const;
730
736
742
744
745  // ----------------------- Cell creation services --------------------------
749  public:
750
765  Cell uCell( const PreCell & c ) const;
766
780  Cell uCell( const Point & kp ) const;
781
797  Cell uCell( Point p, const PreCell & c ) const;
798
813  SCell sCell( const SPreCell & c ) const;
814
829  SCell sCell( const Point & kp, Sign sign = POS ) const;
830
846  SCell sCell( Point p, const SPreCell & c ) const;
847
861  Cell uSpel( Point p ) const;
862
877  SCell sSpel( Point p, Sign sign = POS ) const;
878
892  Cell uPointel( Point p ) const;
893
909  SCell sPointel( Point p, Sign sign = POS ) const;
910
912
913  // ----------------------- Read accessors to cells ------------------------
917  public:
925  Integer uKCoord( const Cell & c, Dimension k ) const;
926
934  Integer uCoord( const Cell & c, Dimension k ) const;
935
942  const Point & uKCoords( const Cell & c ) const;
943
950  Point uCoords( const Cell & c ) const;
951
959  Integer sKCoord( const SCell & c, Dimension k ) const;
960
968  Integer sCoord( const SCell & c, Dimension k ) const;
969
976  const Point & sKCoords( const SCell & c ) const;
977
984  Point sCoords( const SCell & c ) const;
985
992  Sign sSign( const SCell & c ) const;
993
995
996  // ----------------------- Write accessors to cells ------------------------
1000  public:
1001
1010  void uSetKCoord( Cell & c, Dimension k, Integer i ) const;
1011
1020  void sSetKCoord( SCell & c, Dimension k, Integer i ) const;
1021
1030  void uSetCoord( Cell & c, Dimension k, Integer i ) const;
1031
1040  void sSetCoord( SCell & c, Dimension k, Integer i ) const;
1041
1050  void uSetKCoords( Cell & c, const Point & kp ) const;
1051
1059  void sSetKCoords( SCell & c, const Point & kp ) const;
1060
1068  void uSetCoords( Cell & c, const Point & kp ) const;
1069
1077  void sSetCoords( SCell & c, const Point & kp ) const;
1078
1083  void sSetSign( SCell & c, Sign s ) const;
1084
1086
1087  // -------------------- Conversion signed/unsigned ------------------------
1091  public:
1100  SCell signs( const Cell & p, Sign s ) const;
1101
1109  Cell unsigns( const SCell & p ) const;
1110
1118  SCell sOpp( const SCell & p ) const;
1119
1121
1122  // ------------------------- Cell topology services -----------------------
1126  public:
1132  Integer uTopology( const Cell & p ) const;
1133
1139  Integer sTopology( const SCell & p ) const;
1140
1146  Dimension uDim( const Cell & p ) const;
1147
1153  Dimension sDim( const SCell & p ) const;
1154
1160  bool uIsSurfel( const Cell & b ) const;
1161
1167  bool sIsSurfel( const SCell & b ) const;
1168
1175  bool uIsOpen( const Cell & p, Dimension k ) const;
1176
1183  bool sIsOpen( const SCell & p, Dimension k ) const;
1184
1186
1187  // -------------------- Iterator services for cells ------------------------
1191  public:
1192
1214  DirIterator uDirs( const Cell & p ) const;
1215
1237  DirIterator sDirs( const SCell & p ) const;
1238
1260  DirIterator uOrthDirs( const Cell & p ) const;
1261
1283  DirIterator sOrthDirs( const SCell & p ) const;
1284
1291  Dimension uOrthDir( const Cell & s ) const;
1292
1299  Dimension sOrthDir( const SCell & s ) const;
1300
1302
1303  // -------------------- Unsigned cell geometry services --------------------
1307  public:
1308
1315  Integer uFirst( const PreCell & p, Dimension k ) const;
1316
1323  Cell uFirst( const PreCell & p ) const;
1324
1331  Integer uLast( const PreCell & p, Dimension k ) const;
1332
1339  Cell uLast( const PreCell & p ) const;
1340
1351  Cell uGetIncr( const Cell & p, Dimension k ) const;
1352
1362  bool uIsMax( const Cell & p, Dimension k ) const;
1363
1364
1372  bool uIsInside( const PreCell & p, Dimension k ) const;
1373
1374
1381  bool uIsInside( const PreCell & p ) const;
1382
1390  bool cIsInside( const Point & p, Dimension k ) const;
1391
1392
1399  bool cIsInside( const Point & p ) const;
1400
1410  Cell uGetMax( Cell p, Dimension k ) const;
1411
1422  Cell uGetDecr( const Cell & p, Dimension k ) const;
1423
1433  bool uIsMin( const Cell & p, Dimension k ) const;
1434
1444  Cell uGetMin( Cell p, Dimension k ) const;
1445
1446
1458  Cell uGetAdd( const Cell & p, Dimension k, Integer x ) const;
1459
1471  Cell uGetSub( const Cell & p, Dimension k, Integer x ) const;
1472
1480  Integer uDistanceToMax( const Cell & p, Dimension k ) const;
1481
1490  Integer uDistanceToMin( const Cell & p, Dimension k ) const;
1491
1500  Cell uTranslation( const Cell & p, const Vector & vec ) const;
1501
1514  Cell uProjection( const Cell & p, const Cell & bound, Dimension k ) const;
1515
1527  void uProject( Cell & p, const Cell & bound, Dimension k ) const;
1528
1552  bool uNext( Cell & p, const Cell & lower, const Cell & upper ) const;
1553
1555
1556  // -------------------- Signed cell geometry services --------------------
1560  public:
1561
1568  Integer sFirst( const SPreCell & p, Dimension k ) const;
1569
1576  SCell sFirst( const SPreCell & p ) const;
1577
1584  Integer sLast( const SPreCell & p, Dimension k ) const;
1585
1592  SCell sLast( const SPreCell & p ) const;
1593
1604  SCell sGetIncr( const SCell & p, Dimension k ) const;
1605
1615  bool sIsMax( const SCell & p, Dimension k ) const;
1616
1624  bool sIsInside( const SPreCell & p, Dimension k ) const;
1625
1632  bool sIsInside( const SPreCell & p ) const;
1633
1643  SCell sGetMax( SCell p, Dimension k ) const;
1644
1655  SCell sGetDecr( const SCell & p, Dimension k ) const;
1656
1666  bool sIsMin( const SCell & p, Dimension k ) const;
1667
1677  SCell sGetMin( SCell p, Dimension k ) const;
1678
1690  SCell sGetAdd( const SCell & p, Dimension k, Integer x ) const;
1691
1703  SCell sGetSub( const SCell & p, Dimension k, Integer x ) const;
1704
1712  Integer sDistanceToMax( const SCell & p, Dimension k ) const;
1713
1722  Integer sDistanceToMin( const SCell & p, Dimension k ) const;
1723
1732  SCell sTranslation( const SCell & p, const Vector & vec ) const;
1733
1746  SCell sProjection( const SCell & p, const SCell & bound, Dimension k ) const;
1747
1759  void sProject( SCell & p, const SCell & bound, Dimension k ) const;
1760
1784  bool sNext( SCell & p, const SCell & lower, const SCell & upper ) const;
1785
1787
1788  // ----------------------- Neighborhood services --------------------------
1792  public:
1793
1805  Cells uNeighborhood( const Cell & cell ) const;
1806
1818  SCells sNeighborhood( const SCell & cell ) const;
1819
1832  Cells uProperNeighborhood( const Cell & cell ) const;
1833
1846  SCells sProperNeighborhood( const SCell & cell ) const;
1847
1861  Cell uAdjacent( const Cell & p, Dimension k, bool up ) const;
1862
1876  SCell sAdjacent( const SCell & p, Dimension k, bool up ) const;
1877
1879
1880  // ----------------------- Incidence services --------------------------
1884  public:
1885
1900  Cell uIncident( const Cell & c, Dimension k, bool up ) const;
1901
1919  SCell sIncident( const SCell & c, Dimension k, bool up ) const;
1920
1928  Cells uLowerIncident( const Cell & c ) const;
1929
1937  Cells uUpperIncident( const Cell & c ) const;
1938
1947  SCells sLowerIncident( const SCell & c ) const;
1948
1957  SCells sUpperIncident( const SCell & c ) const;
1958
1966  Cells uFaces( const Cell & c ) const;
1967
1975  Cells uCoFaces( const Cell & c ) const;
1976
1993  bool sDirect( const SCell & p, Dimension k ) const;
1994
2006  SCell sDirectIncident( const SCell & p, Dimension k ) const;
2007
2019  SCell sIndirectIncident( const SCell & p, Dimension k ) const;
2020
2022
2023  // ----------------------- Interface --------------------------------------
2027  public:
2028
2033  void selfDisplay ( std::ostream & out ) const;
2034
2039  bool isValid() const;
2040
2042
2043  // ------------------------- Protected Datas ------------------------------
2044  private:
2045  // ------------------------- Private Datas --------------------------------
2046  private:
2051  std::array<Closure, dimension> myClosure;
2052
2053  // ------------------------- Hidden services ------------------------------
2054  protected:
2055
2056
2057  private:
2058
2059
2060
2061  // ------------------------- Internals ------------------------------------
2065  private:
2067  void uAddFaces( Cells& faces, const Cell& c, Dimension axis ) const;
2068
2070  void uAddCoFaces( Cells& cofaces, const Cell& c, Dimension axis ) const;
2071
2073
2074  }; // end of class KhalimskySpaceND
2075
2076
2083  template < Dimension dim,
2084  typename TInteger >
2085  std::ostream&
2086  operator<< ( std::ostream & out,
2087  const KhalimskySpaceND<dim, TInteger > & object );
2088
2089 } // namespace DGtal
2090
2091
2093 // Includes inline functions.
2094 #include "DGtal/topology/KhalimskySpaceND.ih"
2095
2096 // //
2098
2099 #endif // !defined KhalimskySpaceND_h
2100
2101 #undef KhalimskySpaceND_RECURSES
2102 #endif // else defined(KhalimskySpaceND_RECURSES)
DGtal::KhalimskySpaceND::uSetCoords
void uSetCoords(Cell &c, const Point &kp) const
Sets the digital coordinates of [c] to [kp].
DGtal::KhalimskyCell::className
std::string className() const
Return the style name used for drawing this object.
DGtal::KhalimskyPreCell< dim, Integer >
DGtal::SignedKhalimskyCell::Integer
TInteger Integer
Definition: KhalimskySpaceND.h:215
DGtal::KhalimskySpaceND::sProperNeighborhood
SCells sProperNeighborhood(const SCell &cell) const
Computes the proper 1-neighborhood of the cell [c] and returns it.
DGtal::KhalimskySpaceND::uFirst
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].
DGtal::KhalimskySpaceND::dimension
static constexpr const Dimension dimension
Definition: KhalimskySpaceND.h:430
DGtal::KhalimskySpaceND::uIsInside
bool uIsInside(const PreCell &p) const
Useful to check if you are going out of the space.
DGtal::SignedKhalimskyCell::operator=
SignedKhalimskyCell & operator=(const SignedKhalimskyCell &other)=default
Copy operator.
DGtal::KhalimskySpaceND::PERIODIC
@ PERIODIC
The dimension is periodic.
Definition: KhalimskySpaceND.h:475
DGtal::KhalimskySpaceND::sGetMax
SCell sGetMax(SCell p, Dimension k) const
Useful to check if you are going out of the space.
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.
DGtal::KhalimskySpaceND::SCells
AnyCellCollection< SCell > SCells
Definition: KhalimskySpaceND.h:440
DGtal::SignedKhalimskyCell::UnsignedInteger
typename NumberTraits< Integer >::UnsignedVersion UnsignedInteger
Definition: KhalimskySpaceND.h:216
DGtal::KhalimskySpaceND::upperBound
const Point & upperBound() const
Return the upper bound for digital points in this space.
DGtal::KhalimskySpaceND::uProject
void uProject(Cell &p, const Cell &bound, Dimension k) const
Projects [p] along the [k]th direction toward [bound].
DGtal::KhalimskySpaceND::uCell
Cell uCell(const PreCell &c) const
From an unsigned cell, returns an unsigned cell lying into this Khalismky space.
DGtal::KhalimskySpaceND::sIndirectIncident
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 negativ...
DGtal::KhalimskySpaceND::uGetMin
Cell uGetMin(Cell p, Dimension k) const
Useful to check if you are going out of the space.
DGtal::KhalimskySpaceND::sIsSurfel
bool sIsSurfel(const SCell &b) const
Return 'true' if [b] is a surfel (spans all but one coordinate).
DGtal::KhalimskySpaceND::uCell
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...
DGtal::KhalimskySpaceND::uIsOpen
bool uIsOpen(const Cell &p, Dimension k) const
Return 'true' if [p] is open along the direction [k].
DGtal::KhalimskySpaceND::uDim
Dimension uDim(const Cell &p) const
Return the dimension of the cell [p].
DGtal::KhalimskySpaceND::sLast
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].
DGtal::SignedKhalimskyCell::SignedKhalimskyCell
SignedKhalimskyCell(Integer dummy=0)
Default constructor.
DGtal::KhalimskyCell::KhalimskyCell
KhalimskyCell(const PreCell &aCell)
Explicit constructor from a KhalimskyPreCell.
DGtal::concepts::CInteger
Aim: Concept checking for Integer Numbers. More precisely, this concept is a refinement of both CEucl...
Definition: CInteger.h:88
DGtal::SignedKhalimskyCell::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((concepts::CInteger< TInteger >))
Integer must be a model of the concept CInteger.
DGtal::KhalimskySpaceND::SurfelSet
std::set< SCell > SurfelSet
Preferred type for defining a set of surfels (always signed cells).
Definition: KhalimskySpaceND.h:450
DGtal::KhalimskySpaceND::sIsMax
bool sIsMax(const SCell &p, Dimension k) const
Useful to check if you are going out of the space.
DGtal::KhalimskySpaceND::uIsValid
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 ...
DGtal::KhalimskySpaceND::uFirst
Cell uFirst(const PreCell &p) const
Return the first cell of the space with the same type as [p].
DGtal::KhalimskySpaceND< dimAmbient, DGtal::int32_t >::Closure
Closure
Boundaries closure type.
Definition: KhalimskySpaceND.h:472
DGtal::KhalimskySpaceND::uSetKCoords
void uSetKCoords(Cell &c, const Point &kp) const
Sets the Khalimsky coordinates of [c] to [kp].
DGtal::KhalimskySpaceND::sTranslation
SCell sTranslation(const SCell &p, const Vector &vec) const
Add the vector [vec] to [p].
lower
Vector lower(const Vector &z, unsigned int k)
Definition: viewDualSurface.cpp:190
DGtal::SignedKhalimskyCell::operator=
SignedKhalimskyCell & operator=(SignedKhalimskyCell &&other)=default
Move operator.
DGtal::NumberTraits
Aim: The traits class for all models of Cinteger.
Definition: NumberTraits.h:533
DGtal::KhalimskySpaceND::sIsInside
bool sIsInside(const SPreCell &p, Dimension k) const
Useful to check if you are going out of the space.
DGtal::KhalimskySpaceND::isSpacePeriodic
bool isSpacePeriodic() const
Return 'true' iff the space is periodic along every dimension.
DGtal::KhalimskySpaceND::uIsMax
bool uIsMax(const Cell &p, Dimension k) const
Useful to check if you are going out of the space.
DGtal::KhalimskySpaceND::isAnyDimensionPeriodic
bool isAnyDimensionPeriodic() const
Return 'true' iff the space is periodic along at least one dimension.
DGtal::KhalimskySpaceND::uSpel
Cell uSpel(Point p) const
From the digital coordinates of a point in Zn, builds the corresponding spel (cell of maximal dimensi...
DGtal::KhalimskyCell::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((concepts::CInteger< TInteger >))
Integer must be a model of the concept CInteger.
DGtal::KhalimskySpaceND::sGetMin
SCell sGetMin(SCell p, Dimension k) const
Useful to check if you are going out of the space.
DGtal::KhalimskySpaceND::init
bool init(const Point &lower, const Point &upper, bool isClosed)
Specifies the upper and lower bounds for the maximal cells in this space.
DGtal::KhalimskySpaceND::getClosure
Closure getClosure(Dimension k) const
Gets closure type.
DGtal::KhalimskySpaceND::uCoord
Integer uCoord(const Cell &c, Dimension k) const
Return its digital coordinate along [k].
DGtal::KhalimskySpaceND::uIsValid
bool uIsValid(const PreCell &c) const
Returns true if the given unsigned cell has Khalimsky coordinates between those of the cells returned...
DGtal::int32_t
boost::int32_t int32_t
signed 32-bit integer.
Definition: BasicTypes.h:72
DGtal::KhalimskySpaceND::max
Integer max(Dimension k) const
Return the maximal digital coordinate in the k-dimension.
DGtal::KhalimskySpaceND::sCell
SCell sCell(const SPreCell &c) const
From a signed cell, returns a signed cell lying into this Khalismky space.
DGtal::KhalimskySpaceND::myClosure
std::array< Closure, dimension > myClosure
Definition: KhalimskySpaceND.h:2051
DGtal::KhalimskySpaceND::lowerCell
const Cell & lowerCell() const
Return the lower bound for cells in this space.
DGtal::KhalimskySpaceND::uLast
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].
DGtal::KhalimskySpaceND::Cells
AnyCellCollection< Cell > Cells
Definition: KhalimskySpaceND.h:439
DGtal::KhalimskySpaceND::sGetIncr
SCell sGetIncr(const SCell &p, Dimension k) const
Return the same element as [p] except for the incremented coordinate [k].
DGtal::KhalimskySpaceND::uOrthDir
Dimension uOrthDir(const Cell &s) const
Given an unsigned surfel [s], returns its orthogonal direction (ie, the coordinate where the surfel i...
aPoint
const Point aPoint(3, 4)
DGtal::SignedKhalimskyCell::SignedKhalimskyCell
SignedKhalimskyCell(const SignedKhalimskyCell &other)=default
Copy constructor.
DGtal::KhalimskySpaceND::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((concepts::CInteger< TInteger >))
Integer must be signed to characterize a ring.
DGtal::KhalimskyCell::operator=
KhalimskyCell & operator=(KhalimskyCell &&other)=default
Move operator.
DGtal::KhalimskySpaceND::init
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.
DGtal::SignedKhalimskyCell::SignedKhalimskyCell
SignedKhalimskyCell(SignedKhalimskyCell &&other)=default
Move constructor.
DGtal::Dimension
DGtal::uint32_t Dimension
Definition: Common.h:133
DGtal::KhalimskySpaceND::sSetSign
void sSetSign(SCell &c, Sign s) const
Sets the sign of the cell.
DGtal::KhalimskySpaceND::NEG
static constexpr const Sign NEG
Definition: KhalimskySpaceND.h:433
DGtal::KhalimskyCell::operator==
bool operator==(const KhalimskyCell &other) const
Equality operator.
DGtal::KhalimskySpaceND::Helper
KhalimskySpaceNDHelper< KhalimskySpaceND< dim, TInteger > > Helper
Features basic operations on coordinates, especially for periodic dimensions.
Definition: KhalimskySpaceND.h:396
DGtal::SignedKhalimskyCell::SignedKhalimskyCell
SignedKhalimskyCell(const SPreCell &aCell)
Explicit constructor from a SignedKhalimskyPreCell.
DGtal::KhalimskySpaceND::uProperNeighborhood
Cells uProperNeighborhood(const Cell &cell) const
Computes the proper 1-neighborhood of the cell [c] and returns it.
DGtal::KhalimskySpaceND::uUpperIncident
Cells uUpperIncident(const Cell &c) const
Return the cells directly up incident to c in this space.
DGtal::KhalimskySpaceND::sCell
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 ...
DGtal::KhalimskySpaceND::sDirs
DirIterator sDirs(const SCell &p) const
Given a signed cell [p], returns an iterator to iterate over each coordinate the cell spans.
DGtal::KhalimskySpaceND::PreCell
KhalimskyPreCell< dim, Integer > PreCell
Definition: KhalimskySpaceND.h:416
DGtal::KhalimskyCell::operator!=
bool operator!=(const KhalimskyCell &other) const
Difference operator.
DGtal::KhalimskySpaceND::lowerBound
const Point & lowerBound() const
Return the lower bound for digital points in this space.
DGtal::KhalimskySpaceND::SPreCell
SignedKhalimskyPreCell< dim, Integer > SPreCell
Definition: KhalimskySpaceND.h:418
DGtal::KhalimskySpaceND::sSpel
SCell sSpel(Point p, Sign sign=POS) const
From the digital coordinates of a point in Zn, builds the corresponding spel (cell of maximal dimensi...
dim
unsigned int dim(const Vector &z)
Definition: viewDualSurface.cpp:174
DGtal::KhalimskySpaceND::sCoords
Point sCoords(const SCell &c) const
Return its digital coordinates.
DGtal::KhalimskySpaceND::DIM
static constexpr const Dimension DIM
Definition: KhalimskySpaceND.h:431
DGtal::SignedKhalimskyCell
Represents a signed cell in a cellular grid space by its Khalimsky coordinates and a boolean value.
Definition: KhalimskySpaceND.h:209
DGtal::KhalimskySpaceND::uDistanceToMin
Integer uDistanceToMin(const Cell &p, Dimension k) const
Useful to check if you are going out of the space (for non-periodic dimensions).
DGtal::KhalimskySpaceND::myLower
Point myLower
Definition: KhalimskySpaceND.h:2047
SCell sGetAdd(const SCell &p, Dimension k, Integer x) const
Return the same element as [p] except for a coordinate [k] incremented with x.
DGtal::KhalimskySpaceND::sIsInside
bool sIsInside(const SPreCell &p) const
Useful to check if you are going out of the space.
DGtal::KhalimskySpaceND::sSetCoord
void sSetCoord(SCell &c, Dimension k, Integer i) const
Sets the [k]-th digital coordinate of [c] to [i].
DGtal::KhalimskySpaceND::Surfel
SCell Surfel
Definition: KhalimskySpaceND.h:420
DGtal::KhalimskySpaceND::sDirect
bool sDirect(const SCell &p, Dimension k) const
Return 'true' if the direct orientation of [p] along [k] is in the positive coordinate direction.
DGtal::KhalimskySpaceND::uSetCoord
void uSetCoord(Cell &c, Dimension k, Integer i) const
Sets the [k]-th digital coordinate of [c] to [i].
DGtal::KhalimskySpaceND::sSign
Sign sSign(const SCell &c) const
Return its sign.
DGtal::KhalimskySpaceND::uFaces
Cells uFaces(const Cell &c) const
Return the proper faces of [c] (chain of lower incidence) that belong to the space.
DGtal::KhalimskySpaceND::uIsMin
bool uIsMin(const Cell &p, Dimension k) const
Useful to check if you are going out of the space.
DGtal::KhalimskySpaceND::SurfelMap::Type
std::map< SCell, Value > Type
Definition: KhalimskySpaceND.h:467
DGtal::KhalimskySpaceND::SCellSet
std::set< SCell > SCellSet
Preferred type for defining a set of SCell(s).
Definition: KhalimskySpaceND.h:447
DGtal::KhalimskySpaceND::uDistanceToMax
Integer uDistanceToMax(const Cell &p, Dimension k) const
Useful to check if you are going out of the space (for non-periodic dimensions).
DGtal::KhalimskySpaceND::isSpacePeriodic
bool isSpacePeriodic(Dimension k) const
Return 'true' iff the space is periodic along the specified dimension.
DGtal::SpaceND
Definition: SpaceND.h:96
DGtal::KhalimskySpaceND::CellSet
std::set< Cell > CellSet
Preferred type for defining a set of Cell(s).
Definition: KhalimskySpaceND.h:444
DGtal::KhalimskySpaceND::~KhalimskySpaceND
~KhalimskySpaceND()
Destructor.
DGtal::KhalimskySpaceND::Cell
KhalimskyCell< dim, Integer > Cell
Definition: KhalimskySpaceND.h:415
DGtal::KhalimskyPreSpaceND
Aim: This class is a model of CPreCellularGridSpaceND. It represents the cubical grid as a cell compl...
Definition: KhalimskyPreSpaceND.h:380
DGtal::KhalimskySpaceND::KhalimskySpaceND
KhalimskySpaceND(const KhalimskySpaceND &other)=default
Copy constructor.
DGtal::KhalimskySpaceND::Point
PointVector< dim, Integer > Point
Definition: KhalimskySpaceND.h:425
DGtal::KhalimskyCell< dim, Integer >::Integer
Integer Integer
Definition: KhalimskySpaceND.h:91
DGtal::KhalimskySpaceND::sFirst
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].
DGtal::KhalimskySpaceND::CellMap::Type
std::map< Cell, Value > Type
Definition: KhalimskySpaceND.h:455
void uAddFaces(Cells &faces, const Cell &c, Dimension axis) const
Used by uFaces for computing incident faces.
DGtal::KhalimskySpaceND::sLowerIncident
SCells sLowerIncident(const SCell &c) const
Return the signed cells directly low incident to c in this space.
DGtal::KhalimskySpaceND::uSetKCoord
void uSetKCoord(Cell &c, Dimension k, Integer i) const
Sets the [k]-th Khalimsky coordinate of [c] to [i].
DGtal::KhalimskySpaceND::uCoFaces
Cells uCoFaces(const Cell &c) const
Return the proper cofaces of [c] (chain of upper incidence) that belong to the space.
DGtal::KhalimskySpaceND::sDistanceToMax
Integer sDistanceToMax(const SCell &p, Dimension k) const
Useful to check if you are going out of the space (for non-periodic dimensions).
DGtal::KhalimskySpaceND::sCoord
Integer sCoord(const SCell &c, Dimension k) const
Return its digital coordinate along [k].
DGtal::KhalimskySpaceND::sDirectIncident
SCell sDirectIncident(const SCell &p, Dimension k) const
Return the direct incident cell of [p] along [k] (the incident cell along [k])
DGtal::KhalimskySpaceND::uLast
Cell uLast(const PreCell &p) const
Return the last cell of the space with the same type as [p].
DGtal::SignedKhalimskyCell::className
std::string className() const
Return the style name used for drawing this object.
DGtal::KhalimskySpaceND::CellularGridSpace
KhalimskySpaceND< dim, Integer > CellularGridSpace
Definition: KhalimskySpaceND.h:411
DGtal::KhalimskySpaceND::SCell
SignedKhalimskyCell< dim, Integer > SCell
Definition: KhalimskySpaceND.h:417
DGtal::KhalimskySpaceND::isSpaceClosed
bool isSpaceClosed() const
Return 'true' iff the space is closed or periodic along every dimension.
DGtal::KhalimskySpaceND::Size
NumberTraits< Integer >::UnsignedVersion Size
Type used to represent sizes in the digital space.
Definition: KhalimskySpaceND.h:407
DGtal::KhalimskySpaceND::sDistanceToMin
Integer sDistanceToMin(const SCell &p, Dimension k) const
Useful to check if you are going out of the space (for non-periodic dimensions).
DGtal::KhalimskySpaceND::myCellLower
Cell myCellLower
Definition: KhalimskySpaceND.h:2049
DGtal::KhalimskySpaceND::sIsMin
bool sIsMin(const SCell &p, Dimension k) const
Useful to check if you are going out of the space.
DGtal::SignedKhalimskyCell::operator==
bool operator==(const SignedKhalimskyCell &other) const
Equality operator.
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition: ClosedIntegerHalfPlane.h:49
DGtal::KhalimskySpaceND::sLast
SCell sLast(const SPreCell &p) const
Return the last cell of the space with the same type as [p].
DGtal::KhalimskySpaceND::uIsInside
bool uIsInside(const PreCell &p, Dimension k) const
Useful to check if you are going out of the space.
DGtal::KhalimskySpaceND::sGetSub
SCell sGetSub(const SCell &p, Dimension k, Integer x) const
Return the same element as [p] except for a coordinate [k] decremented with x.
DGtal::KhalimskySpaceNDHelper
Internal class of KhalimskySpaceND that provides some optimizations depending on the space type.
Definition: KhalimskySpaceND.h:71
DGtal::KhalimskySpaceND::sPointel
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)...
DGtal::KhalimskySpaceND::init
bool init(const Point &lower, const Point &upper, Closure closure)
Specifies the upper and lower bounds for the maximal cells in this space.
DGtal::KhalimskySpaceND::KhalimskySpaceND
KhalimskySpaceND()
Default constructor.
DGtal::KhalimskySpaceND::sOrthDirs
DirIterator sOrthDirs(const SCell &p) const
Given a signed cell [p], returns an iterator to iterate over each coordinate the cell does not span.
DGtal::KhalimskySpaceND::sKCoords
const Point & sKCoords(const SCell &c) const
Return its Khalimsky coordinates.
DGtal::KhalimskySpaceND::sSetCoords
void sSetCoords(SCell &c, const Point &kp) const
Sets the digital coordinates of [c] to [kp].
DGtal::KhalimskySpaceND::Space
SpaceND< dim, Integer > Space
Definition: KhalimskySpaceND.h:410
DGtal::KhalimskyCell::KhalimskyCell
KhalimskyCell(Integer dummy=0)
Default constructor.
DGtal::SignedKhalimskyCell::preCell
SPreCell const & preCell() const
Returns the underlying constant signed pre-cell.
DGtal::KhalimskySpaceND::uTopology
Integer uTopology(const Cell &p) const
Return the topology word of [p].
Cell uGetAdd(const Cell &p, Dimension k, Integer x) const
Return the same element as [p] except for a coordinate [k] incremented with x.
DGtal::KhalimskySpaceND::min
Integer min(Dimension k) const
Return the minimal digital coordinate in the k-dimension.
DGtal::KhalimskySpaceND::myCellUpper
Cell myCellUpper
Definition: KhalimskySpaceND.h:2050
DGtal::KhalimskySpaceND::CLOSED
@ CLOSED
The dimension is closed and non-periodic.
Definition: KhalimskySpaceND.h:473
DGtal::KhalimskySpaceND::sIsValid
bool sIsValid(const SPreCell &c) const
Returns true if the given signed cell has Khalimsky coordinates between those of the cells returned b...
DGtal::KhalimskySpaceND::sKCoord
Integer sKCoord(const SCell &c, Dimension k) const
Return its Khalimsky coordinate along [k].
DGtal::KhalimskySpaceND::cIsInside
bool cIsInside(const Point &p, Dimension k) const
Useful to check if you are going out of the space.
DGtal::KhalimskyCell::KhalimskyCell
KhalimskyCell(KhalimskyCell &&other)=default
Move constructor.
DGtal::KhalimskyCell::preCell
PreCell const & preCell() const
Returns the underlying constant pre-cell.
DGtal::KhalimskySpaceND::uCoords
Point uCoords(const Cell &c) const
Return its digital coordinates.
DGtal::KhalimskySpaceND::sSetKCoords
void sSetKCoords(SCell &c, const Point &kp) const
Sets the Khalimsky coordinates of [c] to [kp].
DGtal::KhalimskySpaceND::uNeighborhood
Cells uNeighborhood(const Cell &cell) const
Computes the 1-neighborhood of the cell [c] and returns it.
DGtal::KhalimskySpaceND::sProjection
SCell sProjection(const SCell &p, const SCell &bound, Dimension k) const
Return the projection of [p] along the [k]th direction toward [bound].
void uAddCoFaces(Cells &cofaces, const Cell &c, Dimension axis) const
Used by uCoFaces for computing incident cofaces.
DGtal::operator<<
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
DGtal::KhalimskySpaceND::uDirs
DirIterator uDirs(const Cell &p) const
Given an unsigned cell [p], returns an iterator to iterate over each coordinate the cell spans.
DGtal::KhalimskySpaceND::operator=
KhalimskySpaceND & operator=(const KhalimskySpaceND &other)=default
Copy operator.
DGtal::KhalimskySpaceND< dimAmbient, DGtal::int32_t >::AnyCellCollection
typename PreCellularGridSpace::template AnyCellCollection< CellType > AnyCellCollection
Definition: KhalimskySpaceND.h:436
DGtal::SignedKhalimskyPreCell< dim, Integer >
DGtal::KhalimskySpaceND::sIsOpen
bool sIsOpen(const SCell &p, Dimension k) const
Return 'true' if [p] is open along the direction [k].
DGtal::KhalimskySpaceND::sTopology
Integer sTopology(const SCell &p) const
Return the topology word of [p].
DGtal::KhalimskySpaceND::sFirst
SCell sFirst(const SPreCell &p) const
Return the first cell of the space with the same type as [p].
DGtal::KhalimskySpaceND< dimAmbient, DGtal::int32_t >::DirIterator
typename PreCellularGridSpace::DirIterator DirIterator
Definition: KhalimskySpaceND.h:422
DGtal::KhalimskySpaceND::sOrthDir
Dimension sOrthDir(const SCell &s) const
Given a signed surfel [s], returns its orthogonal direction (ie, the coordinate where the surfel is c...
DGtal::KhalimskySpaceND::cIsInside
bool cIsInside(const Point &p) const
Useful to check if you are going out of the space.
DGtal::KhalimskySpaceND::isSpaceClosed
bool isSpaceClosed(Dimension k) const
Return 'true' iff the space is closed or periodic along the specified dimension.
DGtal::KhalimskyCell::operator=
KhalimskyCell & operator=(const KhalimskyCell &other)=default
Copy operator.
DGtal::KhalimskySpaceND::sProject
void sProject(SCell &p, const SCell &bound, Dimension k) const
Projects [p] along the [k]th direction toward [bound].
DGtal::KhalimskySpaceND::uKCoords
const Point & uKCoords(const Cell &c) const
Return its Khalimsky coordinates.
DGtal::KhalimskySpaceND::uGetIncr
Cell uGetIncr(const Cell &p, Dimension k) const
Return the same element as [p] except for the incremented coordinate [k].
DGtal::KhalimskySpaceND::uIsSurfel
bool uIsSurfel(const Cell &b) const
Return 'true' if [b] is a surfel (spans all but one coordinate).
DGtal::KhalimskySpaceND::sIsValid
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 return...
upper
Vector upper(const Vector &z, unsigned int k)
Definition: viewDualSurface.cpp:197
DGtal::KhalimskySpaceND::uProjection
Cell uProjection(const Cell &p, const Cell &bound, Dimension k) const
Return the projection of [p] along the [k]th direction toward [bound].
DGtal::KhalimskySpaceND::PreCellularGridSpace
KhalimskyPreSpaceND< dim, Integer > PreCellularGridSpace
Definition: KhalimskySpaceND.h:412
DGtal::KhalimskySpaceND::signs
SCell signs(const Cell &p, Sign s) const
Creates a signed cell from an unsigned one and a given sign.
DGtal::KhalimskySpaceND::uOrthDirs
DirIterator uOrthDirs(const Cell &p) const
Given an unsigned cell [p], returns an iterator to iterate over each coordinate the cell does not spa...
DGtal::KhalimskySpaceND::uIncident
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].
DGtal::KhalimskySpaceND::uGetSub
Cell uGetSub(const Cell &p, Dimension k, Integer x) const
Return the same element as [p] except for a coordinate [k] decremented with x.
DGtal::PointVector< dim, Integer >
DGtal::KhalimskySpaceND::sUpperIncident
SCells sUpperIncident(const SCell &c) const
Return the signed cells directly up incident to c in this space.
DGtal::KhalimskySpaceND::myUpper
Point myUpper
Definition: KhalimskySpaceND.h:2048
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.
DGtal::KhalimskySpaceND::sNeighborhood
SCells sNeighborhood(const SCell &cell) const
Computes the 1-neighborhood of the cell [c] and returns it.
DGtal::KhalimskySpaceND::OPEN
@ OPEN
The dimension is open.
Definition: KhalimskySpaceND.h:474
DGtal::KhalimskySpaceND::POS
static constexpr const Sign POS
Definition: KhalimskySpaceND.h:432
DGtal::KhalimskySpaceND::isValid
bool isValid() const
Checks the validity/consistency of the object.
DGtal::SignedKhalimskyCell::operator<
bool operator<(const SignedKhalimskyCell &other) const
Inferior operator. (lexicographic order).
DGtal::KhalimskySpaceND::SCellMap::Type
std::map< SCell, Value > Type
Definition: KhalimskySpaceND.h:461
DGtal::KhalimskySpaceND::sNext
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).
DGtal::KhalimskySpaceND::Integer
TInteger Integer
Arithmetic ring induced by (+,-,*) and Integer numbers.
Definition: KhalimskySpaceND.h:404
DGtal::SignedKhalimskyCell::SignedKhalimskyCell
SignedKhalimskyCell(const Point &aPoint, bool positive)
Explicit constructor from its Khalimsky coordinates.
DGtal::KhalimskySpaceND::sIncident
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].
DGtal::KhalimskySpaceND::uCell
Cell uCell(const Point &kp) const
From the Khalimsky coordinates of a cell, builds the corresponding unsigned cell lying into this Khal...
DGtal::KhalimskySpaceND::unsigns
Cell unsigns(const SCell &p) const
Creates an unsigned cell from a signed one.
DGtal::KhalimskyCell::KhalimskyCell
KhalimskyCell(const KhalimskyCell &other)=default
Copy constructor.
DGtal::KhalimskySpaceND::upperCell
const Cell & upperCell() const
Return the upper bound for cells in this space.
DGtal::SignedKhalimskyCell::mySPreCell
SPreCell mySPreCell
Underlying signed pre-cell.
Definition: KhalimskySpaceND.h:229
DGtal::KhalimskyCell::KhalimskyCell
KhalimskyCell(const Point &aPoint)
Explicit constructor from its Khalimsky coordinates.
DGtal::KhalimskySpaceND::selfDisplay
void selfDisplay(std::ostream &out) const
Writes/Displays the object on an output stream.
DGtal::KhalimskyCell< dim, Integer >::UnsignedInteger
typename NumberTraits< Integer >::UnsignedVersion UnsignedInteger
Definition: KhalimskySpaceND.h:92
DGtal::KhalimskySpaceND::sGetDecr
SCell sGetDecr(const SCell &p, Dimension k) const
Return the same element as [p] except for an decremented coordinate [k].
DGtal::KhalimskySpaceND::uPointel
Cell uPointel(Point p) const
From the digital coordinates of a point in Zn, builds the corresponding pointel (cell of dimension 0)...
DGtal::KhalimskySpaceND::uKCoord
Integer uKCoord(const Cell &c, Dimension k) const
Return its Khalimsky coordinate along [k].
DGtal::KhalimskySpaceND::cIsValid
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 ...
DGtal::KhalimskySpaceND::sDim
Dimension sDim(const SCell &p) const
Return the dimension of the cell [p].
DGtal::KhalimskySpaceND::Vector
PointVector< dim, Integer > Vector
Definition: KhalimskySpaceND.h:426
DGtal::KhalimskySpaceND::cIsValid
bool cIsValid(const Point &p) const
Returns true if the given cell has Khalimsky coordinates between those of the cells returned by lower...
DGtal::KhalimskyCell::operator<
bool operator<(const KhalimskyCell &other) const
Inferior operator. (lexicographic order).
DGtal::KhalimskyPreSpaceND::DirIterator
PreCellDirectionIterator< dim, Integer > DirIterator
Definition: KhalimskyPreSpaceND.h:394
DGtal::KhalimskySpaceND::uLowerIncident
Cells uLowerIncident(const Cell &c) const
Return the cells directly low incident to c in this space.
DGtal::KhalimskySpaceND::uGetMax
Cell uGetMax(Cell p, Dimension k) const
Useful to check if you are going out of the space.
DGtal::SignedKhalimskyCell::operator!=
bool operator!=(const SignedKhalimskyCell &other) const
Difference operator.
DGtal::KhalimskySpaceND::uTranslation
Cell uTranslation(const Cell &p, const Vector &vec) const
Add the vector [vec] to [p].
DGtal::KhalimskyCell::myPreCell
PreCell myPreCell
Underlying pre-cell.
Definition: KhalimskySpaceND.h:105
DGtal::KhalimskySpaceND::KhalimskySpaceND
KhalimskySpaceND(KhalimskySpaceND &&other)=default
Move constructor.
DGtal::KhalimskySpaceND::uGetDecr
Cell uGetDecr(const Cell &p, Dimension k) const
Return the same element as [p] except for an decremented coordinate [k].
DGtal::KhalimskyCell
Represents an (unsigned) cell in a cellular grid space by its Khalimsky coordinates.
Definition: KhalimskySpaceND.h:83
DGtal::KhalimskySpaceND::sSetKCoord
void sSetKCoord(SCell &c, Dimension k, Integer i) const
Sets the [k]-th Khalimsky coordinate of [c] to [i].
DGtal::KhalimskySpaceND::uNext
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).
DGtal::KhalimskySpaceND::sCell
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...
DGtal::KhalimskySpaceND::Sign
bool Sign
Definition: KhalimskySpaceND.h:421
DGtal::KhalimskySpaceND
Aim: This class is a model of CCellularGridSpaceND. It represents the cubical grid as a cell complex,...
Definition: KhalimskySpaceND.h:394
DGtal::KhalimskySpaceND::size
Size size(Dimension k) const
Return the width of the space in the k-dimension.
DGtal::KhalimskySpaceND::sOpp
SCell sOpp(const SCell &p) const
Creates the signed cell with the inverse sign of [p].