DGtal 1.3.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Attributes
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 >:
DGtal::concepts::CPreCellularGridSpaceND< T > boost::DefaultConstructible< T > boost::CopyConstructible< T >

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

Definitions

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()

template<typename T >
DGtal::concepts::CCellularGridSpaceND< T >::BOOST_CONCEPT_USAGE ( CCellularGridSpaceND< T >  )
inline

◆ 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 --------------------
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

template<typename T >
bool DGtal::concepts::CCellularGridSpaceND< T >::myBool
private

◆ myCell

template<typename T >
CPreCellularGridSpaceND<T>::Cell DGtal::concepts::CCellularGridSpaceND< T >::myCell
private

◆ myDim

template<typename T >
Dimension DGtal::concepts::CCellularGridSpaceND< T >::myDim
private

◆ myInteger

template<typename T >
CPreCellularGridSpaceND<T>::Integer DGtal::concepts::CCellularGridSpaceND< T >::myInteger
private

◆ myP1

template<typename T >
CPreCellularGridSpaceND<T>::Point DGtal::concepts::CCellularGridSpaceND< T >::myP1
private

◆ myP2

template<typename T >
CPreCellularGridSpaceND<T>::Point DGtal::concepts::CCellularGridSpaceND< T >::myP2
private

◆ mySCell

template<typename T >
CPreCellularGridSpaceND<T>::SCell DGtal::concepts::CCellularGridSpaceND< T >::mySCell
private

◆ mySize

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

◆ myX

template<typename T >
T DGtal::concepts::CCellularGridSpaceND< T >::myX
private

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