DGtal 1.3.0
Loading...
Searching...
No Matches
Data Structures | Public Types | Public Member Functions | Private Member Functions | Private Attributes
DGtal::UmbrellaComputer< TDigitalSurfaceTracker > Class Template Reference

Aim: Useful for computing umbrellas on 'DigitalSurface's, ie set of n-1 cells around a n-3 cell. More...

#include <DGtal/topology/UmbrellaComputer.h>

Data Structures

struct  State
 

Public Types

typedef TDigitalSurfaceTracker DigitalSurfaceTracker
 
typedef DigitalSurfaceTracker::DigitalSurfaceContainer DigitalSurfaceContainer
 
typedef DigitalSurfaceContainer::KSpace KSpace
 
typedef DigitalSurfaceContainer::Surfel Surfel
 
typedef DigitalSurfaceContainer::Size Size
 
typedef KSpace::SCell SCell
 

Public Member Functions

 ~UmbrellaComputer ()
 Destructor. More...
 
 UmbrellaComputer ()
 Constructor. The object is not valid. More...
 
 UmbrellaComputer (const UmbrellaComputer &other)
 
UmbrellaComputeroperator= (const UmbrellaComputer &other)
 
void init (const DigitalSurfaceTracker &tracker, Dimension k, bool epsilon, Dimension j)
 
void setState (const State &aState)
 
void getState (State &aState) const
 
const Statestate () const
 Accessor to current state. More...
 
const KSpacespace () const
 Accessor to the digital space. More...
 
const Surfelsurfel () const
 
SCell separator () const
 
SCell pivot () const
 
Dimension orthDir () const
 
Dimension trackDir () const
 
bool trackOrientation () const
 
Dimension separatorDir () const
 
bool separatorOrientation () const
 
unsigned int next ()
 
unsigned int previous ()
 
bool adjacent ()
 
void selfDisplay (std::ostream &out) const
 
bool isValid () const
 

Private Member Functions

 BOOST_CONCEPT_ASSERT ((concepts::CDigitalSurfaceTracker< TDigitalSurfaceTracker >))
 

Private Attributes

DigitalSurfaceTrackermyTracker
 Tracker used to move on the digital surface. More...
 
State myState
 Current state for the umbrella. More...
 

Detailed Description

template<typename TDigitalSurfaceTracker>
class DGtal::UmbrellaComputer< TDigitalSurfaceTracker >

Aim: Useful for computing umbrellas on 'DigitalSurface's, ie set of n-1 cells around a n-3 cell.

Description of class 'DigitalSurfaceUmbrellaComputer'

The current surfel (n-1 cell), or face, is denoted by s. The n-3 cell is called the pivot and denoted by +p. It is always a positive cell. There is also a current n-2 cell, called the separator and denoted by t, which is in the boundary of s and whose boundary contains +p.

Two directions specifies the separator and the pivot, the track direction j and the separator direction k. Moreover an orientation \( \epsilon=\pm 1 \) specifies one which side is the separator wrt the face. We have \( t = \Delta^{\epsilon}_k s, +p = \Delta^{\mu}_{j} t, \) where \( \mu \) is the direct orientation of t along j.

Turning around the pivot means moving the face and the separator once (in the track direction), such that the pivot is the same (ie +p), the track and separator directions being updated. Repeating this process a sufficient number of times brings the umbrella back in its original position, except in the case when the DigitalSurface has a boundary touching the pivot.

Uses delegation with DigitalSurfaceTracker.

Essentially a backport from ImaGene.

Template Parameters
TDigitalSurfaceTrackerthe type of the domain in which shapes are created.

Definition at line 86 of file UmbrellaComputer.h.

Member Typedef Documentation

◆ DigitalSurfaceContainer

template<typename TDigitalSurfaceTracker >
typedef DigitalSurfaceTracker::DigitalSurfaceContainer DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::DigitalSurfaceContainer

Definition at line 94 of file UmbrellaComputer.h.

◆ DigitalSurfaceTracker

template<typename TDigitalSurfaceTracker >
typedef TDigitalSurfaceTracker DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::DigitalSurfaceTracker

Definition at line 93 of file UmbrellaComputer.h.

◆ KSpace

template<typename TDigitalSurfaceTracker >
typedef DigitalSurfaceContainer::KSpace DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::KSpace

Definition at line 95 of file UmbrellaComputer.h.

◆ SCell

template<typename TDigitalSurfaceTracker >
typedef KSpace::SCell DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::SCell

Definition at line 98 of file UmbrellaComputer.h.

◆ Size

template<typename TDigitalSurfaceTracker >
typedef DigitalSurfaceContainer::Size DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::Size

Definition at line 97 of file UmbrellaComputer.h.

◆ Surfel

template<typename TDigitalSurfaceTracker >
typedef DigitalSurfaceContainer::Surfel DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::Surfel

Definition at line 96 of file UmbrellaComputer.h.

Constructor & Destructor Documentation

◆ ~UmbrellaComputer()

template<typename TDigitalSurfaceTracker >
DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::~UmbrellaComputer ( )

Destructor.

◆ UmbrellaComputer() [1/2]

template<typename TDigitalSurfaceTracker >
DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::UmbrellaComputer ( )

Constructor. The object is not valid.

◆ UmbrellaComputer() [2/2]

template<typename TDigitalSurfaceTracker >
DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::UmbrellaComputer ( const UmbrellaComputer< TDigitalSurfaceTracker > &  other)

Copy constructor.

Parameters
otherthe object to clone.

Member Function Documentation

◆ adjacent()

template<typename TDigitalSurfaceTracker >
bool DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::adjacent ( )

Go the adjacent umbrella, ie the one which shares the same faces around the separator but whose pivot is symmetric around the separator.

Returns
'true' if their was an adjacent umbrella, 'false' otherwise. (the umbrella is in the same state as before the call).

◆ BOOST_CONCEPT_ASSERT()

template<typename TDigitalSurfaceTracker >
DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::BOOST_CONCEPT_ASSERT ( (concepts::CDigitalSurfaceTracker< TDigitalSurfaceTracker >)  )
private

◆ getState()

template<typename TDigitalSurfaceTracker >
void DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::getState ( State aState) const

Returns the state of the umbrella in the referenced object [state].

Parameters
aState(returns) the current umbrella state describing the face, the separator and the pivot.

◆ init()

template<typename TDigitalSurfaceTracker >
void DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::init ( const DigitalSurfaceTracker tracker,
Dimension  k,
bool  epsilon,
Dimension  j 
)

Initializes the umbrella with a 'DigitalSurfaceTracker'. Links the umbrella computer with a concrete surface and a surfel on it. Tells also where is the positive pivot to turn around.

Parameters
trackera tracker on a digital surface with a valid 'current()' surfel. (cloned). Specifies the initial surfel.
kthe separator direction different from [j] and the orthogonal direction to the surfel.
epsilonthe orientation where to find the separator pointing at the pivot.
jthe track direction where the next surfel of the umbrella is.

◆ isValid()

template<typename TDigitalSurfaceTracker >
bool DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::isValid ( ) const

Checks the validity/consistency of the object.

Returns
'true' if the object is valid, 'false' otherwise.

◆ next()

template<typename TDigitalSurfaceTracker >
unsigned int DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::next ( )

Turns around the current pivot (positive turn).

Returns
0 if the move was impossible (nothing is updated) otherwise returns the move code of the face.

◆ operator=()

template<typename TDigitalSurfaceTracker >
UmbrellaComputer & DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::operator= ( const UmbrellaComputer< TDigitalSurfaceTracker > &  other)

Assignment.

Parameters
otherthe object to copy.
Returns
a reference on 'this'.

◆ orthDir()

template<typename TDigitalSurfaceTracker >
Dimension DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::orthDir ( ) const
Returns
the orthogonal direction to the current surfel.

◆ pivot()

template<typename TDigitalSurfaceTracker >
SCell DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::pivot ( ) const
Returns
the pivot n-3 cell (always positively orientated).

◆ previous()

template<typename TDigitalSurfaceTracker >
unsigned int DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::previous ( )

Turns around the current pivot (negative turn).

Returns
0 if the move was impossible (nothing is updated) otherwise returns the move code of the face.

◆ selfDisplay()

template<typename TDigitalSurfaceTracker >
void DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::selfDisplay ( std::ostream &  out) const

Writes/Displays the object on an output stream.

Parameters
outthe output stream where the object is written.

◆ separator()

template<typename TDigitalSurfaceTracker >
SCell DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::separator ( ) const
Returns
the separator n-2 cell.

◆ separatorDir()

template<typename TDigitalSurfaceTracker >
Dimension DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::separatorDir ( ) const
Returns
the separator direction.

◆ separatorOrientation()

template<typename TDigitalSurfaceTracker >
bool DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::separatorOrientation ( ) const
Returns
the separator orientation.

◆ setState()

template<typename TDigitalSurfaceTracker >
void DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::setState ( const State aState)

Puts the umbrella in the state [state]. The umbrella must have been initialized with a 'DigitalSurfaceTracker' before and the state must be consistent with the tracker. In particular, the face of the state must lie on the same digital surface.

Parameters
aStatea state describing the face, the separator and the pivot.

◆ space()

template<typename TDigitalSurfaceTracker >
const KSpace & DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::space ( ) const

Accessor to the digital space.

◆ state()

template<typename TDigitalSurfaceTracker >
const State & DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::state ( ) const

Accessor to current state.

◆ surfel()

template<typename TDigitalSurfaceTracker >
const Surfel & DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::surfel ( ) const
Returns
the current surfel at which the umbrella is pointing.

◆ trackDir()

template<typename TDigitalSurfaceTracker >
Dimension DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::trackDir ( ) const
Returns
the track direction (j).

◆ trackOrientation()

template<typename TDigitalSurfaceTracker >
bool DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::trackOrientation ( ) const
Returns
the track orientation (mu).

Field Documentation

◆ myState

template<typename TDigitalSurfaceTracker >
State DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::myState
private

Current state for the umbrella.

Definition at line 285 of file UmbrellaComputer.h.

◆ myTracker

template<typename TDigitalSurfaceTracker >
DigitalSurfaceTracker* DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::myTracker
private

Tracker used to move on the digital surface.

Definition at line 283 of file UmbrellaComputer.h.


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