DGtal  0.9.4beta
Public Types | Public Member Functions | Private Attributes
DGtal::concepts::CCellularGridSpaceND< T > Struct Template Reference

#include <DGtal/topology/CCellularGridSpaceND.h>

Inheritance diagram for DGtal::concepts::CCellularGridSpaceND< T >:
[legend]
Collaboration 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

Definitions

Valid expressions and semantics

Name Expression Type requirements Return type Precondition Semantics Post condition Complexity
initializationx.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 cellx.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 axisx.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 axisx.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 cellx.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 axisx.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 axisx.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

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

Definition at line 167 of file CCellularGridSpaceND.h.

Member Function Documentation

template<typename T >
DGtal::concepts::CCellularGridSpaceND< T >::BOOST_CONCEPT_ASSERT ( (CUnsignedNumber< Size >)  )
template<typename T >
DGtal::concepts::CCellularGridSpaceND< T >::BOOST_CONCEPT_ASSERT ( (CIntegralNumber< Size >)  )
template<typename T >
DGtal::concepts::CCellularGridSpaceND< T >::BOOST_CONCEPT_USAGE ( CCellularGridSpaceND< T >  )
inline
template<typename T >
void DGtal::concepts::CCellularGridSpaceND< T >::checkConstConstraints ( ) const
inline

Definition at line 177 of file CCellularGridSpaceND.h.

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

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 >::Integer myInteger
CPreCellularGridSpaceND< T >::SCell mySCell
void sameType(const T &t1, const T &t2)
CPreCellularGridSpaceND< T >::Cell myCell
CPreCellularGridSpaceND< T >::Point myP1
CPreCellularGridSpaceND< T >::Point myP2

Field Documentation

template<typename T >
bool DGtal::concepts::CCellularGridSpaceND< T >::myBool
private
template<typename T >
CPreCellularGridSpaceND<T>::Cell DGtal::concepts::CCellularGridSpaceND< T >::myCell
private
template<typename T >
Dimension DGtal::concepts::CCellularGridSpaceND< T >::myDim
private
template<typename T >
CPreCellularGridSpaceND<T>::Integer DGtal::concepts::CCellularGridSpaceND< T >::myInteger
private
template<typename T >
CPreCellularGridSpaceND<T>::Point DGtal::concepts::CCellularGridSpaceND< T >::myP1
private
template<typename T >
CPreCellularGridSpaceND<T>::Point DGtal::concepts::CCellularGridSpaceND< T >::myP2
private
template<typename T >
CPreCellularGridSpaceND<T>::SCell DGtal::concepts::CCellularGridSpaceND< T >::mySCell
private
template<typename T >
Size DGtal::concepts::CCellularGridSpaceND< T >::mySize
private
template<typename T >
T DGtal::concepts::CCellularGridSpaceND< T >::myX
private

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