File failed to load: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.3/config/TeX-MML-AM_CHTML/MathJax.js
DGtal 2.0.0
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 >:
[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:

  • an explicit set of oriented surfels
  • the boundary of an explicit set of spels
  • the boundary of an explicit set of digital points
  • the boundary of a set of digital points, defined implicitly by a predicate: Point -> bool
  • a set of oriented surfels, defined implicitly by a predicate: Surfel -> bool
  • a set of oriented surfels, implicitly by a predicate: Oriented Surfel -> bool
  • the boundary of a region in a labelled image
  • the frontier between two regions in a labelled image
  • ...

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

Definition at line 143 of file CDigitalSurfaceContainer.h.

144 {
145 // check const methods.
147 }

References checkConstConstraints().

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

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

Referenced by BOOST_CONCEPT_USAGE().

Field Documentation

◆ myBool

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

Definition at line 172 of file CDigitalSurfaceContainer.h.

Referenced by checkConstConstraints().

◆ myConnectedness

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

Definition at line 175 of file CDigitalSurfaceContainer.h.

Referenced by checkConstConstraints().

◆ myKSpace

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

Definition at line 170 of file CDigitalSurfaceContainer.h.

Referenced by checkConstConstraints().

◆ myPtrTracker

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

Definition at line 174 of file CDigitalSurfaceContainer.h.

Referenced by checkConstConstraints().

◆ mySize

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

Definition at line 176 of file CDigitalSurfaceContainer.h.

Referenced by checkConstConstraints().

◆ mySurfel

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

Definition at line 171 of file CDigitalSurfaceContainer.h.

Referenced by checkConstConstraints().

◆ mySurfelCIt

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

Definition at line 173 of file CDigitalSurfaceContainer.h.

Referenced by checkConstConstraints().

◆ myX

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

Definition at line 169 of file CDigitalSurfaceContainer.h.

Referenced by checkConstConstraints().


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