DGtal 1.3.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Attributes
DGtal::concepts::CDigitalSurfaceContainer< T > Struct Template Reference

Aim: The digital surface container concept describes a minimal set of inner types and methods so as to describe the data of digital surfaces. More...

#include <DGtal/topology/CDigitalSurfaceContainer.h>

Inheritance diagram for DGtal::concepts::CDigitalSurfaceContainer< T >:
boost::CopyConstructible< T >

Public Types

typedef T::KSpace KSpace
 
typedef T::Surfel Surfel
 
typedef T::SurfelConstIterator SurfelConstIterator
 
typedef T::DigitalSurfaceTracker DigitalSurfaceTracker
 
typedef T::Size Size
 

Public Member Functions

 BOOST_CONCEPT_ASSERT ((boost_concepts::SinglePassIteratorConcept< SurfelConstIterator >))
 
 BOOST_CONCEPT_ASSERT ((boost_concepts::ReadableIteratorConcept< SurfelConstIterator >))
 
 BOOST_CONCEPT_ASSERT ((concepts::CCellularGridSpaceND< KSpace >))
 
 BOOST_CONCEPT_ASSERT ((CDigitalSurfaceTracker< DigitalSurfaceTracker >))
 
 BOOST_CONCEPT_USAGE (CDigitalSurfaceContainer)
 
void checkConstConstraints () const
 

Private Attributes

myX
 
KSpace myKSpace
 
Surfel mySurfel
 
bool myBool
 
SurfelConstIterator mySurfelCIt
 
DigitalSurfaceTrackermyPtrTracker
 
Connectedness myConnectedness
 
Size mySize
 

Detailed Description

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

Aim: The digital surface container concept describes a minimal set of inner types and methods so as to describe the data of digital surfaces.

Description of concept 'CDigitalSurfaceContainer'

Digital surfaces arise in many different contexts:

Since there are so many digital surfaces, it is necessary to provide a mechanism to handle them generically. The class DigitalSurface will be the common proxy to hide models of CDigitalSurfaceContainer.

Hence CDigitalSurfaceContainer describes how to access the data representing the digital surface in common way.

See Models of digital surface containers

Refinement of boost::CopyConstructible

Associated types

Notation

Definitions

Valid expressions and semantics

Name Expression Type requirements Return type Precondition Semantics Post condition Complexity
space accessor x.space() const KSpace & returns a reference to the cellular grid space in which lies the digital surface.
inside test x.isInside( s ) bool returns true iff the surfel s belongs to this digital surface.
begin of range x.begin() SurfelConstIterator returns a const iterator pointing to the first element in the digital surface, seen as a collection of surfels.
end of range x.end() SurfelConstIterator returns an iterator pointing past the last element in the digital surface, seen as a collection of surfels.
tracker instanciation x.newTracker( s ) DigitalSurfaceTracker* returns a dynamically allocated instance of tracker initialized at the surfel s.
connectedness test x.connectedness() enum Connectedness returns either DISCONNECTED, CONNECTED, UNKNOWN depending on the surface.
number of surfels x.nbSurfels() Size returns the number of surfels of this surface.
empty container test x.empty() bool returns true iff the digital surface contains no surfel.

Invariants

Models

Notes

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

Definition at line 127 of file CDigitalSurfaceContainer.h.

Member Typedef Documentation

◆ DigitalSurfaceTracker

template<typename T >
typedef T::DigitalSurfaceTracker DGtal::concepts::CDigitalSurfaceContainer< T >::DigitalSurfaceTracker

Definition at line 134 of file CDigitalSurfaceContainer.h.

◆ KSpace

template<typename T >
typedef T::KSpace DGtal::concepts::CDigitalSurfaceContainer< T >::KSpace

Definition at line 131 of file CDigitalSurfaceContainer.h.

◆ Size

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

Definition at line 135 of file CDigitalSurfaceContainer.h.

◆ Surfel

template<typename T >
typedef T::Surfel DGtal::concepts::CDigitalSurfaceContainer< T >::Surfel

Definition at line 132 of file CDigitalSurfaceContainer.h.

◆ SurfelConstIterator

template<typename T >
typedef T::SurfelConstIterator DGtal::concepts::CDigitalSurfaceContainer< T >::SurfelConstIterator

Definition at line 133 of file CDigitalSurfaceContainer.h.

Member Function Documentation

◆ BOOST_CONCEPT_ASSERT() [1/4]

◆ BOOST_CONCEPT_ASSERT() [2/4]

◆ BOOST_CONCEPT_ASSERT() [3/4]

template<typename T >
DGtal::concepts::CDigitalSurfaceContainer< T >::BOOST_CONCEPT_ASSERT ( (CDigitalSurfaceTracker< DigitalSurfaceTracker >)  )

◆ BOOST_CONCEPT_ASSERT() [4/4]

template<typename T >
DGtal::concepts::CDigitalSurfaceContainer< T >::BOOST_CONCEPT_ASSERT ( (concepts::CCellularGridSpaceND< KSpace >)  )

◆ BOOST_CONCEPT_USAGE()

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

◆ checkConstConstraints()

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

Definition at line 148 of file CDigitalSurfaceContainer.h.

149 {
150 // x.space() const, returns a const KSpace &
152 // x.isInside( Surfel ) const, returns bool.
154 // x.begin() const, returns SurfelConstIterator
156 // x.end() const, returns SurfelConstIterator
158 // x.newTracker( Surfel ) const, returns DigitalSurfaceTracker*
160 // x.connectedness() const, returns Connectedness
161 ConceptUtils::sameType( myConnectedness, myX.connectedness() );
162 // x.nbSurfels() const, returns Connectedness
163 ConceptUtils::sameType( mySize, myX.nbSurfels() );
164 // x.empty() const, returns bool
166 }
void sameType(const T &, const T &)
Definition: ConceptUtils.h:117

References DGtal::concepts::CDigitalSurfaceContainer< T >::myBool, DGtal::concepts::CDigitalSurfaceContainer< T >::myConnectedness, DGtal::concepts::CDigitalSurfaceContainer< T >::myKSpace, DGtal::concepts::CDigitalSurfaceContainer< T >::myPtrTracker, DGtal::concepts::CDigitalSurfaceContainer< T >::mySize, DGtal::concepts::CDigitalSurfaceContainer< T >::mySurfel, DGtal::concepts::CDigitalSurfaceContainer< T >::mySurfelCIt, DGtal::concepts::CDigitalSurfaceContainer< T >::myX, and DGtal::concepts::ConceptUtils::sameType().

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

Field Documentation

◆ myBool

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

◆ myConnectedness

template<typename T >
Connectedness DGtal::concepts::CDigitalSurfaceContainer< T >::myConnectedness
private

◆ myKSpace

template<typename T >
KSpace DGtal::concepts::CDigitalSurfaceContainer< T >::myKSpace
private

◆ myPtrTracker

template<typename T >
DigitalSurfaceTracker* DGtal::concepts::CDigitalSurfaceContainer< T >::myPtrTracker
private

◆ mySize

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

◆ mySurfel

template<typename T >
Surfel DGtal::concepts::CDigitalSurfaceContainer< T >::mySurfel
private

◆ mySurfelCIt

template<typename T >
SurfelConstIterator DGtal::concepts::CDigitalSurfaceContainer< T >::mySurfelCIt
private

◆ myX

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

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