DGtal  1.5.beta
DGtal::concepts::CCellularGridSpaceND< T > Struct Template Reference

Aim: This concept describes a cellular grid space in nD. In these spaces obtained by cartesian product, cells have a cubic shape that depends on the dimension: 0-cells are points, 1-cells are unit segments, 2-cells are squares, 3-cells are cubes, and so on. More...

#include <DGtal/topology/CCellularGridSpaceND.h>

Inheritance diagram for DGtal::concepts::CCellularGridSpaceND< T >:
[legend]

Public Types

typedef T::Size Size
 
- Public Types inherited from DGtal::concepts::CPreCellularGridSpaceND< T >
typedef T::Integer Integer
 
typedef T::Space Space
 
typedef T::PreCellularGridSpace PreCellularGridSpace
 
typedef T::Cell Cell
 
typedef T::SCell SCell
 
typedef T::Surfel Surfel
 
typedef T::Sign Sign
 
typedef T::DirIterator DirIterator
 
typedef T::Point Point
 
typedef T::Vector Vector
 
typedef T::Cells Cells
 
typedef T::SCells SCells
 
typedef T::CellSet CellSet
 
typedef T::SCellSet SCellSet
 
typedef T::SurfelSet SurfelSet
 
typedef int Dummy
 
typedef T::template CellMap< Dummy >::Type CellMap
 
typedef T::template SCellMap< Dummy >::Type SCellMap
 
typedef T::template SurfelMap< Dummy >::Type SurfelMap
 

Public Member Functions

 BOOST_CONCEPT_ASSERT ((CUnsignedNumber< Size >))
 
 BOOST_CONCEPT_ASSERT ((CIntegralNumber< Size >))
 
 BOOST_CONCEPT_USAGE (CCellularGridSpaceND)
 
void checkConstConstraints () const
 
- Public Member Functions inherited from DGtal::concepts::CPreCellularGridSpaceND< T >
 BOOST_CONCEPT_ASSERT ((CInteger< Integer >))
 
 BOOST_STATIC_ASSERT ((ConceptUtils::SameType< Integer, typename Space::Integer >::value))
 
 BOOST_STATIC_ASSERT ((ConceptUtils::SameType< Point, typename Space::Point >::value))
 
 BOOST_STATIC_ASSERT ((ConceptUtils::SameType< Vector, typename Space::Vector >::value))
 
 BOOST_CONCEPT_ASSERT ((CConstSinglePassRange< Cells >))
 
 BOOST_CONCEPT_ASSERT ((CConstSinglePassRange< SCells >))
 
 BOOST_CONCEPT_ASSERT ((boost::UniqueAssociativeContainer< CellSet >))
 
 BOOST_CONCEPT_ASSERT ((boost::UniqueAssociativeContainer< SCellSet >))
 
 BOOST_CONCEPT_ASSERT ((boost::UniqueAssociativeContainer< SurfelSet >))
 
 BOOST_CONCEPT_ASSERT ((boost::SimpleAssociativeContainer< CellSet >))
 
 BOOST_CONCEPT_ASSERT ((boost::SimpleAssociativeContainer< SCellSet >))
 
 BOOST_CONCEPT_ASSERT ((boost::SimpleAssociativeContainer< SurfelSet >))
 
 BOOST_CONCEPT_ASSERT ((boost::UniqueAssociativeContainer< CellMap >))
 
 BOOST_CONCEPT_ASSERT ((boost::UniqueAssociativeContainer< SCellMap >))
 
 BOOST_CONCEPT_ASSERT ((boost::UniqueAssociativeContainer< SurfelMap >))
 
 BOOST_CONCEPT_ASSERT ((boost::PairAssociativeContainer< CellMap >))
 
 BOOST_CONCEPT_ASSERT ((boost::PairAssociativeContainer< SCellMap >))
 
 BOOST_CONCEPT_ASSERT ((boost::PairAssociativeContainer< SurfelMap >))
 
 BOOST_CONCEPT_USAGE (CPreCellularGridSpaceND)
 
void checkConstConstraints () const
 

Private Attributes

myX
 
CPreCellularGridSpaceND< T >::Integer myInteger
 
Size mySize
 
Dimension myDim
 
CPreCellularGridSpaceND< T >::Point myP1
 
CPreCellularGridSpaceND< T >::Point myP2
 
CPreCellularGridSpaceND< T >::Cell myCell
 
CPreCellularGridSpaceND< T >::SCell mySCell
 
bool myBool
 

Detailed Description

template<typename T>
struct DGtal::concepts::CCellularGridSpaceND< T >

Aim: This concept describes a cellular grid space in nD. In these spaces obtained by cartesian product, cells have a cubic shape that depends on the dimension: 0-cells are points, 1-cells are unit segments, 2-cells are squares, 3-cells are cubes, and so on.

Description of concept 'CCellularGridSpaceND'

Refinement of CPreCellularGridSpaceND

In addition of CPreCellularGridSpaceND, CCellularGridSpaceND add bounds and related methods.

Models of CCellularGridSpaceND are used whenever you need to define a topology on your subsets of the digital space, especially boundaries of objects, curves and digital surfaces.

The space is generally finite (except for arbitrary size integers). The user should choose between a closed (default) cell space or an open cell space.

We refer the reader to Cellular grid space and topology, unoriented and oriented cells, incidence for further details.

Associated types

Notation

  • X : A type that is a model of CCellularGridSpaceND
  • x : object of type X
  • k : object of type Dimension
  • i : object of type Integer
  • c : object of type Cell
  • sc : object of type SCell
  • s : object of type Surfel
  • p, p1, p2 : object of type Point
  • v : object of type Vector
  • sign: object of type Sign

Definitions

  • a model of CCellularGridSpaceND is said closed if it includes the cells of lower dimension along its bounds. It is indeed closed in the sense of the star-topology.
  • a model of CCellularGridSpaceND is said open if it does not include the cells of lower dimension along its bounds. It is indeed open in the sense of the star-topology.
  • when it is initialized with points p1 and p2, the cellular space has a parallelepipedic shape bounded by the given coordinates. Any valid cell has then digital coordinates in-between p1 and p2 (included).
  • when it is default constructed, it is bounded by points -p and p (p is model dependant)
  • adjacent cells to some cell c are cells, lying within the space bounds, with the same topology as c but whose one of their digital coordinates differs by one. They are often called 1-adjacent.
  • incident cells to some cell c are cells, lying within the space bounds, that are either a face of c or such that c is one of their faces.

Valid expressions and semantics

Name Expression Type requirements Return type Precondition Semantics Post condition Complexity
initialization x.init(p1, p2, b) b is bool bool initializes the space so that cells are within the bounds p1 and p2, returns true iff the initialization was valid (ie, such bounds are representable with these integers).
Size or width x.size( k ) Integer returns the size/width of the space along the axis k
Minimal coordinate x.min( k ) Integer returns the minimal possible digital coordinate along the axis k
Maximal coordinate x.max( k ) Integer returns the maximal possible digital coordinate along the axis k
Lower bound x.lowerBound() Point returns the lowest point in the space, i.e. p1
Upper bound x.upperBound() Point returns the uppermost point in the space, i.e. p1
Lower cell x.lowerCell() Cell returns the lowest cell in the space
Upper cell x.upperCell() Cell returns the uppermost cell in the space
Closedness x.isSpaceClosed() bool returns 'true' iff the cellular space is closed
Get first cell x.uFirst(c) Cell returns the first cell of the space with same topology as c
Get last cell x.uLast(c) Cell returns the last cell of the space with same topology as c
Get maximal cell along some axis x.uGetMax(c,k) Cell returns the same cell as c except the k-th coordinate that is the maximal possible
Get minimal cell along some axis x.uGetMin(c,k) Cell returns the same cell as c except the k-th coordinate that is the minimal possible
Distance to upper bound x.uDistanceToMax(c,k) Integer returns the number of increments to do along the k-th axis to reach the upper bound
Distance to lower bound x.uDistanceToMin(c,k) Integer returns the number of decrements to do along the k-th axis to reach the lower bound
Get first cell x.sFirst(sc) SCell returns the first cell of the space with same topology as sc
Get last cell x.sLast(sc) SCell returns the last cell of the space with same topology as sc
Get maximal cell along some axis x.sGetMax(sc,k) SCell returns the same cell as sc except the k-th coordinate that is the maximal possible
Get minimal cell along some axis x.sGetMin(sc,k) SCell returns the same cell as sc except the k-th coordinate that is the minimal possible
Distance to upper bound x.sDistanceToMax(sc,k) Integer returns the number of increments to do along the k-th axis to reach the upper bound
Distance to lower bound x.sDistanceToMin(sc,k) Integer returns the number of decrements to do along the k-th axis to reach the lower bound

Invariants

Models

Notes

Template Parameters
Tthe type that should be a model of CCellularGridSpaceND.

Definition at line 162 of file CCellularGridSpaceND.h.

Member Typedef Documentation

◆ Size

template<typename T >
typedef T::Size DGtal::concepts::CCellularGridSpaceND< T >::Size

Definition at line 167 of file CCellularGridSpaceND.h.

Member Function Documentation

◆ BOOST_CONCEPT_ASSERT() [1/2]

template<typename T >
DGtal::concepts::CCellularGridSpaceND< T >::BOOST_CONCEPT_ASSERT ( (CIntegralNumber< Size >)  )

◆ BOOST_CONCEPT_ASSERT() [2/2]

template<typename T >
DGtal::concepts::CCellularGridSpaceND< T >::BOOST_CONCEPT_ASSERT ( (CUnsignedNumber< Size >)  )

◆ BOOST_CONCEPT_USAGE()

◆ checkConstConstraints()

template<typename T >
void DGtal::concepts::CCellularGridSpaceND< T >::checkConstConstraints ( ) const
inline

Definition at line 177 of file CCellularGridSpaceND.h.

178  {
182  ConceptUtils::sameType( myP1, myX.lowerBound() );
183  ConceptUtils::sameType( myP2, myX.upperBound() );
184  ConceptUtils::sameType( myCell, myX.lowerCell() );
185  ConceptUtils::sameType( myCell, myX.upperCell() );
186  ConceptUtils::sameType( myBool, myX.isSpaceClosed() );
187  // -------------------- Unsigned cell geometry services --------------------
188  ConceptUtils::sameType( myCell, myX.uFirst( myCell ) );
190  ConceptUtils::sameType( myCell, myX.uGetMax( myCell, myDim ) );
191  ConceptUtils::sameType( myCell, myX.uGetMin( myCell, myDim ) );
192  ConceptUtils::sameType( myInteger, myX.uDistanceToMax( myCell, myDim ) );
193  ConceptUtils::sameType( myInteger, myX.uDistanceToMin( myCell, myDim ) );
194  // -------------------- Signed cell geometry services --------------------
199  ConceptUtils::sameType( myInteger, myX.sDistanceToMax( mySCell, myDim ) );
200  ConceptUtils::sameType( myInteger, myX.sDistanceToMin( mySCell, myDim ) );
201 
202 }
CPreCellularGridSpaceND< T >::Cell myCell
CPreCellularGridSpaceND< T >::SCell mySCell
CPreCellularGridSpaceND< T >::Integer myInteger

References DGtal::concepts::CCellularGridSpaceND< T >::myBool, DGtal::concepts::CCellularGridSpaceND< T >::myCell, DGtal::concepts::CCellularGridSpaceND< T >::myDim, DGtal::concepts::CCellularGridSpaceND< T >::myInteger, DGtal::concepts::CCellularGridSpaceND< T >::myP1, DGtal::concepts::CCellularGridSpaceND< T >::myP2, DGtal::concepts::CCellularGridSpaceND< T >::mySCell, DGtal::concepts::CCellularGridSpaceND< T >::mySize, DGtal::concepts::CCellularGridSpaceND< T >::myX, and DGtal::concepts::ConceptUtils::sameType().

Referenced by DGtal::concepts::CCellularGridSpaceND< T >::BOOST_CONCEPT_USAGE().

Field Documentation

◆ myBool

◆ myCell

◆ myDim

◆ myInteger

◆ myP1

◆ myP2

◆ mySCell

◆ mySize

template<typename T >
Size DGtal::concepts::CCellularGridSpaceND< T >::mySize
private

◆ myX


The documentation for this struct was generated from the following file: