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

#include <DGtal/topology/CDigitalSurfaceContainer.h>

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

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 accessorx.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 rangex.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

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

Definition at line 134 of file CDigitalSurfaceContainer.h.

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

Definition at line 131 of file CDigitalSurfaceContainer.h.

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

Definition at line 135 of file CDigitalSurfaceContainer.h.

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

Definition at line 132 of file CDigitalSurfaceContainer.h.

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

Definition at line 133 of file CDigitalSurfaceContainer.h.

Member Function Documentation

template<typename T >
DGtal::concepts::CDigitalSurfaceContainer< T >::BOOST_CONCEPT_ASSERT ( (concepts::CCellularGridSpaceND< KSpace >)  )
template<typename T >
DGtal::concepts::CDigitalSurfaceContainer< T >::BOOST_CONCEPT_ASSERT ( (CDigitalSurfaceTracker< DigitalSurfaceTracker >)  )
template<typename T >
DGtal::concepts::CDigitalSurfaceContainer< T >::BOOST_CONCEPT_USAGE ( CDigitalSurfaceContainer< T >  )
inline

Definition at line 143 of file CDigitalSurfaceContainer.h.

References DGtal::concepts::CDigitalSurfaceContainer< T >::checkConstConstraints().

144  {
145  // check const methods.
147  }
template<typename T >
void DGtal::concepts::CDigitalSurfaceContainer< T >::checkConstConstraints ( ) const
inline

Definition at line 148 of file CDigitalSurfaceContainer.h.

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

149  {
150  // x.space() const, returns a const KSpace &
151  ConceptUtils::sameType( myKSpace, myX.space() );
152  // x.isInside( Surfel ) const, returns bool.
153  ConceptUtils::sameType( myBool, myX.isInside( mySurfel ) );
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
165  ConceptUtils::sameType( myBool, myX.empty() );
166  }
void sameType(const T &t1, const T &t2)

Field Documentation

template<typename T >
bool DGtal::concepts::CDigitalSurfaceContainer< T >::myBool
private
template<typename T >
Connectedness DGtal::concepts::CDigitalSurfaceContainer< T >::myConnectedness
private
template<typename T >
KSpace DGtal::concepts::CDigitalSurfaceContainer< T >::myKSpace
private
template<typename T >
DigitalSurfaceTracker* DGtal::concepts::CDigitalSurfaceContainer< T >::myPtrTracker
private
template<typename T >
Size DGtal::concepts::CDigitalSurfaceContainer< T >::mySize
private
template<typename T >
Surfel DGtal::concepts::CDigitalSurfaceContainer< T >::mySurfel
private
template<typename T >
SurfelConstIterator DGtal::concepts::CDigitalSurfaceContainer< T >::mySurfelCIt
private
template<typename T >
T DGtal::concepts::CDigitalSurfaceContainer< T >::myX
private

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