DGtal  1.3.beta
CPreCellularGridSpaceND.h
1 
17 #pragma once
18 
33 #if defined(CPreCellularGridSpaceND_RECURSES)
34 #error Recursive header files inclusion detected in CPreCellularGridSpaceND.h
35 #else // defined(CPreCellularGridSpaceND_RECURSES)
36 
37 #define CPreCellularGridSpaceND_RECURSES
38 
39 #if !defined CPreCellularGridSpaceND_h
40 
41 #define CPreCellularGridSpaceND_h
42 
44 // Inclusions
45 #include <iostream>
46 #include "DGtal/base/Common.h"
47 #include "DGtal/base/CConstSinglePassRange.h"
48 #include "DGtal/kernel/CInteger.h"
49 #include "DGtal/kernel/CUnsignedNumber.h"
50 #include "DGtal/kernel/CIntegralNumber.h"
51 
53 
54 // @since 0.8 In DGtal::concepts
55 namespace DGtal {
56  namespace concepts {
57 
59 // class CPreCellularGridSpaceND
284 template <typename T>
287 {
288  // ----------------------- Concept checks ------------------------------
289 public:
290  typedef typename T::Integer Integer;
291  typedef typename T::Space Space;
292  typedef typename T::PreCellularGridSpace PreCellularGridSpace;
293  typedef typename T::Cell Cell;
294  typedef typename T::SCell SCell;
295  typedef typename T::Surfel Surfel;
296  typedef typename T::Sign Sign;
297  typedef typename T::DirIterator DirIterator;
298  typedef typename T::Point Point;
299  typedef typename T::Vector Vector;
300  typedef typename T::Cells Cells;
301  typedef typename T::SCells SCells;
302  typedef typename T::CellSet CellSet;
303  typedef typename T::SCellSet SCellSet;
304  typedef typename T::SurfelSet SurfelSet;
305  typedef int Dummy;
306  typedef typename T::template CellMap<Dummy>::Type CellMap;
307  typedef typename T::template SCellMap<Dummy>::Type SCellMap;
308  typedef typename T::template SurfelMap<Dummy>::Type SurfelMap;
309 
328 
330  {
331  ConceptUtils::sameType( myDim, T::dimension );
332  ConceptUtils::sameType( myDim, T::DIM );
333  ConceptUtils::sameType( mySign, T::POS );
334  ConceptUtils::sameType( mySign, T::NEG );
336  }
338  {
339  ConceptUtils::sameType( myCell, myX.uCell( myP1 ) );
341  ConceptUtils::sameType( mySCell, myX.sCell( myP1 ) );
344  ConceptUtils::sameType( myCell, myX.uSpel( myP1 ) );
345  ConceptUtils::sameType( mySCell, myX.sSpel( myP1 ) );
347  ConceptUtils::sameType( myCell, myX.uPointel( myP1 ) );
348  ConceptUtils::sameType( mySCell, myX.sPointel( myP1 ) );
349  ConceptUtils::sameType( mySCell, myX.sPointel( myP1, myBool ) );
352  ConceptUtils::sameType( myP1, myX.uKCoords( myCell ) );
353  ConceptUtils::sameType( myP1, myX.uCoords( myCell ) );
356  ConceptUtils::sameType( myP1, myX.sKCoords( mySCell ) );
357  ConceptUtils::sameType( myP1, myX.sCoords( mySCell ) );
358  myX.uSetKCoord( myMutableCell, myDim, myInteger );
359  myX.uSetCoord( myMutableCell, myDim, myInteger );
360  myX.uSetKCoords( myMutableCell, myP1 );
361  myX.uSetCoords( myMutableCell, myP1 );
362  myX.sSetKCoord( myMutableSCell, myDim, myInteger );
363  myX.sSetCoord( myMutableSCell, myDim, myInteger );
364  myX.sSetKCoords( myMutableSCell, myP1 );
365  myX.sSetCoords( myMutableSCell, myP1 );
367  myX.sSetSign( myMutableSCell, mySign );
370  ConceptUtils::sameType( myCell, myX.unsigns( mySCell ) );
371  ConceptUtils::sameType( myInteger, myX.uTopology( myCell ) );
372  ConceptUtils::sameType( myInteger, myX.sTopology( mySCell ) );
375  ConceptUtils::sameType( myBool, myX.uIsSurfel( myCell ) );
376  ConceptUtils::sameType( myBool, myX.sIsSurfel( mySCell ) );
377  ConceptUtils::sameType( myBool, myX.uIsOpen( myCell, myDim ) );
381  ConceptUtils::sameType( myDirIt, myX.uOrthDirs( myCell ) );
382  ConceptUtils::sameType( myDirIt, myX.sOrthDirs( mySCell ) );
383  ConceptUtils::sameType( myDim, myX.uOrthDir( myCell ) );
384  ConceptUtils::sameType( myDim, myX.sOrthDir( mySCell ) );
385  // -------------------- Unsigned cell geometry services --------------------
386  ConceptUtils::sameType( myCell, myX.uGetIncr( myCell, myDim ) );
387  ConceptUtils::sameType( myCell, myX.uGetDecr( myCell, myDim ) );
390  ConceptUtils::sameType( myBool, myX.uIsInside( myCell, myDim ) );
393  ConceptUtils::sameType( myCell, myX.uTranslation( myCell, myV ) );
394  ConceptUtils::sameType( myCell, myX.uProjection( myCell, myCell, myDim ) );
395  myX.uProject( myMutableCell, myCell, myDim );
397  // -------------------- Signed cell geometry services --------------------
402  ConceptUtils::sameType( myBool, myX.sIsInside( mySCell, myDim ) );
405  ConceptUtils::sameType( mySCell, myX.sTranslation( mySCell, myV ) );
406  ConceptUtils::sameType( mySCell, myX.sProjection( mySCell, mySCell, myDim ) );
407  myX.sProject( myMutableSCell, mySCell, myDim );
409  // ----------------------- Neighborhood services --------------------------
410  ConceptUtils::sameType( myCells, myX.uNeighborhood( myCell ) );
411  ConceptUtils::sameType( myCells, myX.uProperNeighborhood( myCell ) );
412  ConceptUtils::sameType( mySCells, myX.sNeighborhood( mySCell ) );
413  ConceptUtils::sameType( mySCells, myX.sProperNeighborhood( mySCell ) );
414  ConceptUtils::sameType( myCell, myX.uAdjacent( myCell, myDim, myBool ) );
416  // ----------------------- Incidence services --------------------------
417  ConceptUtils::sameType( myCell, myX.uIncident( myCell, myDim, myBool ) );
419  ConceptUtils::sameType( myCells, myX.uLowerIncident( myCell ) );
420  ConceptUtils::sameType( myCells, myX.uUpperIncident( myCell ) );
421  ConceptUtils::sameType( mySCells, myX.sLowerIncident( mySCell ) );
422  ConceptUtils::sameType( mySCells, myX.sUpperIncident( mySCell ) );
424  ConceptUtils::sameType( myCells, myX.uCoFaces( myCell ) );
426  ConceptUtils::sameType( mySCell, myX.sDirectIncident( mySCell, myDim ) );
427  ConceptUtils::sameType( mySCell, myX.sIndirectIncident( mySCell, myDim ) );
428  ConceptUtils::sameType( mySCell, myX.sIndirectIncident( mySCell, myDim ) );
429  ConceptUtils::sameType( myP1, myX.interiorVoxel( mySCell) );
430  ConceptUtils::sameType( myP1, myX.exteriorVoxel( mySCell) );
431 
432 }
433  // ------------------------- Private Datas --------------------------------
434 private:
435  T myX; // do not require T to be default constructible.
444  bool myBool;
449 
450  // ------------------------- Internals ------------------------------------
451 private:
452 
453 }; // end of concept CPreCellularGridSpaceND
454 
455 } // namespace concepts
456 } // namespace DGtal
457 
458 // //
460 
461 #endif // !defined CPreCellularGridSpaceND_h
462 
463 #undef CPreCellularGridSpaceND_RECURSES
464 #endif // else defined(CPreCellularGridSpaceND_RECURSES)
DGtal::concepts::CPreCellularGridSpaceND
Aim: This concept describes an unbounded cellular grid space in nD. In these spaces obtained by carte...
Definition: CPreCellularGridSpaceND.h:285
boost::DefaultConstructible
Go to http://www.sgi.com/tech/stl/DefaultConstructible.html.
Definition: Boost.dox:30
DGtal::concepts::CPreCellularGridSpaceND::SurfelSet
T::SurfelSet SurfelSet
Definition: CPreCellularGridSpaceND.h:304
DGtal::concepts::CPreCellularGridSpaceND::myMutableCell
Cell myMutableCell
Definition: CPreCellularGridSpaceND.h:442
boost::UniqueAssociativeContainer
Go to http://www.sgi.com/tech/stl/UniqueAssociativeContainer.html.
Definition: Boost.dox:140
DGtal::concepts::CPreCellularGridSpaceND::SCells
T::SCells SCells
Definition: CPreCellularGridSpaceND.h:301
DGtal::concepts::CInteger
Aim: Concept checking for Integer Numbers. More precisely, this concept is a refinement of both CEucl...
Definition: CInteger.h:87
DGtal::concepts::CPreCellularGridSpaceND::BOOST_CONCEPT_USAGE
BOOST_CONCEPT_USAGE(CPreCellularGridSpaceND)
Definition: CPreCellularGridSpaceND.h:329
DGtal::concepts::CPreCellularGridSpaceND::myCell
Cell myCell
Definition: CPreCellularGridSpaceND.h:440
DGtal::concepts::CPreCellularGridSpaceND::myV
Vector myV
Definition: CPreCellularGridSpaceND.h:439
DGtal::Dimension
DGtal::uint32_t Dimension
Definition: Common.h:137
DGtal::concepts::CPreCellularGridSpaceND::mySCell
SCell mySCell
Definition: CPreCellularGridSpaceND.h:441
DGtal::concepts::CPreCellularGridSpaceND::DirIterator
T::DirIterator DirIterator
Definition: CPreCellularGridSpaceND.h:297
DGtal::concepts::CPreCellularGridSpaceND::Surfel
T::Surfel Surfel
Definition: CPreCellularGridSpaceND.h:295
DGtal::concepts::CPreCellularGridSpaceND::myDirIt
DirIterator myDirIt
Definition: CPreCellularGridSpaceND.h:446
DGtal::concepts::CPreCellularGridSpaceND::mySign
Sign mySign
Definition: CPreCellularGridSpaceND.h:445
DGtal::concepts::CPreCellularGridSpaceND::PreCellularGridSpace
T::PreCellularGridSpace PreCellularGridSpace
Definition: CPreCellularGridSpaceND.h:292
SCell
Z3i::SCell SCell
Definition: fullConvexityShortestPaths3D.cpp:83
DGtal::concepts::CPreCellularGridSpaceND::myBool
bool myBool
Definition: CPreCellularGridSpaceND.h:444
DGtal::concepts::CPreCellularGridSpaceND::CellMap
T::template CellMap< Dummy >::Type CellMap
Definition: CPreCellularGridSpaceND.h:306
DGtal::concepts::CPreCellularGridSpaceND::myX
T myX
Definition: CPreCellularGridSpaceND.h:435
DGtal::concepts::CPreCellularGridSpaceND::checkConstConstraints
void checkConstConstraints() const
Definition: CPreCellularGridSpaceND.h:337
DGtal::concepts::CConstSinglePassRange
Aim: Defines the concept describing a const single pass range.
Definition: CConstSinglePassRange.h:92
Surfel
KSpace::SCell Surfel
Definition: testArithmeticalDSSComputerOnSurfels.cpp:50
DGtal::concepts::CPreCellularGridSpaceND::myCells
Cells myCells
Definition: CPreCellularGridSpaceND.h:447
DGtal::concepts::CPreCellularGridSpaceND::Cells
T::Cells Cells
Definition: CPreCellularGridSpaceND.h:300
DGtal::concepts::CPreCellularGridSpaceND::SurfelMap
T::template SurfelMap< Dummy >::Type SurfelMap
Definition: CPreCellularGridSpaceND.h:308
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
DGtal::concepts::CPreCellularGridSpaceND::SCellMap
T::template SCellMap< Dummy >::Type SCellMap
Definition: CPreCellularGridSpaceND.h:307
DGtal::concepts::CPreCellularGridSpaceND::Dummy
int Dummy
Definition: CPreCellularGridSpaceND.h:305
DGtal::concepts::CPreCellularGridSpaceND::SCellSet
T::SCellSet SCellSet
Definition: CPreCellularGridSpaceND.h:303
DGtal::concepts::CPreCellularGridSpaceND::SCell
T::SCell SCell
Definition: CPreCellularGridSpaceND.h:294
boost::CopyConstructible
Go to http://www.sgi.com/tech/stl/CopyConstructible.html.
Definition: Boost.dox:34
DGtal::concepts::CPreCellularGridSpaceND::myDim
Dimension myDim
Definition: CPreCellularGridSpaceND.h:437
DGtal::concepts::ConceptUtils::sameType
void sameType(const T &, const T &)
Definition: ConceptUtils.h:117
DGtal::concepts::CPreCellularGridSpaceND::Cell
T::Cell Cell
Definition: CPreCellularGridSpaceND.h:293
DGtal::concepts::ConceptUtils::SameType
Definition: ConceptUtils.h:106
Vector
FreemanChain< int >::Vector Vector
Definition: testCombinDSS.cpp:60
Integer
Point::Coordinate Integer
Definition: examplePlaneProbingParallelepipedEstimator.cpp:44
DGtal::concepts::CPreCellularGridSpaceND::mySCells
SCells mySCells
Definition: CPreCellularGridSpaceND.h:448
DGtal::concepts::CPreCellularGridSpaceND::Vector
T::Vector Vector
Definition: CPreCellularGridSpaceND.h:299
DGtal::concepts::CPreCellularGridSpaceND::Space
T::Space Space
Definition: CPreCellularGridSpaceND.h:291
boost::SimpleAssociativeContainer
Go to http://www.sgi.com/tech/stl/SimpleAssociativeContainer.html.
Definition: Boost.dox:146
Space
SpaceND< 2 > Space
Definition: testSimpleRandomAccessRangeFromPoint.cpp:42
DGtal::concepts::CPreCellularGridSpaceND::Sign
T::Sign Sign
Definition: CPreCellularGridSpaceND.h:296
Cell
KSpace::Cell Cell
Definition: testCubicalComplex.cpp:56
DGtal::concepts::CPreCellularGridSpaceND::myInteger
Integer myInteger
Definition: CPreCellularGridSpaceND.h:436
DGtal::concepts::CPreCellularGridSpaceND::myP1
Point myP1
Definition: CPreCellularGridSpaceND.h:438
boost::PairAssociativeContainer
Go to http://www.sgi.com/tech/stl/PairAssociativeContainer.html.
Definition: Boost.dox:149
Point
MyPointD Point
Definition: testClone2.cpp:383
DGtal::concepts::CPreCellularGridSpaceND::Integer
T::Integer Integer
Definition: CPreCellularGridSpaceND.h:290
DGtal::concepts::CPreCellularGridSpaceND::myP2
Point myP2
Definition: CPreCellularGridSpaceND.h:438
DGtal::concepts::CPreCellularGridSpaceND::BOOST_STATIC_ASSERT
BOOST_STATIC_ASSERT((ConceptUtils::SameType< Integer, typename Space::Integer >::value))
DGtal::concepts::CPreCellularGridSpaceND::myMutableSCell
SCell myMutableSCell
Definition: CPreCellularGridSpaceND.h:443
DGtal::concepts::CPreCellularGridSpaceND::Point
T::Point Point
Definition: CPreCellularGridSpaceND.h:298
DGtal::concepts::CPreCellularGridSpaceND::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((CInteger< Integer >))
SurfelSet
MyDigitalSurface::SurfelSet SurfelSet
Definition: greedy-plane-segmentation-ex2.cpp:95
DGtal::concepts::CPreCellularGridSpaceND::CellSet
T::CellSet CellSet
Definition: CPreCellularGridSpaceND.h:302