DGtal 1.3.0
|
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) | |
UmbrellaComputer & | operator= (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 State & | state () const |
Accessor to current state. More... | |
const KSpace & | space () const |
Accessor to the digital space. More... | |
const Surfel & | surfel () 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 | |
DigitalSurfaceTracker * | myTracker |
Tracker used to move on the digital surface. More... | |
State | myState |
Current state for the umbrella. More... | |
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.
TDigitalSurfaceTracker | the type of the domain in which shapes are created. |
Definition at line 86 of file UmbrellaComputer.h.
typedef DigitalSurfaceTracker::DigitalSurfaceContainer DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::DigitalSurfaceContainer |
Definition at line 94 of file UmbrellaComputer.h.
typedef TDigitalSurfaceTracker DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::DigitalSurfaceTracker |
Definition at line 93 of file UmbrellaComputer.h.
typedef DigitalSurfaceContainer::KSpace DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::KSpace |
Definition at line 95 of file UmbrellaComputer.h.
typedef KSpace::SCell DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::SCell |
Definition at line 98 of file UmbrellaComputer.h.
typedef DigitalSurfaceContainer::Size DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::Size |
Definition at line 97 of file UmbrellaComputer.h.
typedef DigitalSurfaceContainer::Surfel DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::Surfel |
Definition at line 96 of file UmbrellaComputer.h.
DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::~UmbrellaComputer | ( | ) |
Destructor.
DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::UmbrellaComputer | ( | ) |
Constructor. The object is not valid.
DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::UmbrellaComputer | ( | const UmbrellaComputer< TDigitalSurfaceTracker > & | other | ) |
Copy constructor.
other | the object to clone. |
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.
|
private |
void DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::getState | ( | State & | aState | ) | const |
Returns the state of the umbrella in the referenced object [state].
aState | (returns) the current umbrella state describing the face, the separator and the pivot. |
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.
tracker | a tracker on a digital surface with a valid 'current()' surfel. (cloned). Specifies the initial surfel. |
k | the separator direction different from [j] and the orthogonal direction to the surfel. |
epsilon | the orientation where to find the separator pointing at the pivot. |
j | the track direction where the next surfel of the umbrella is. |
bool DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::isValid | ( | ) | const |
Checks the validity/consistency of the object.
unsigned int DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::next | ( | ) |
Turns around the current pivot (positive turn).
UmbrellaComputer & DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::operator= | ( | const UmbrellaComputer< TDigitalSurfaceTracker > & | other | ) |
Assignment.
other | the object to copy. |
Dimension DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::orthDir | ( | ) | const |
SCell DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::pivot | ( | ) | const |
unsigned int DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::previous | ( | ) |
Turns around the current pivot (negative turn).
void DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::selfDisplay | ( | std::ostream & | out | ) | const |
Writes/Displays the object on an output stream.
out | the output stream where the object is written. |
SCell DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::separator | ( | ) | const |
Dimension DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::separatorDir | ( | ) | const |
bool DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::separatorOrientation | ( | ) | const |
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.
aState | a state describing the face, the separator and the pivot. |
const KSpace & DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::space | ( | ) | const |
Accessor to the digital space.
const State & DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::state | ( | ) | const |
Accessor to current state.
const Surfel & DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::surfel | ( | ) | const |
Dimension DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::trackDir | ( | ) | const |
bool DGtal::UmbrellaComputer< TDigitalSurfaceTracker >::trackOrientation | ( | ) | const |
|
private |
Current state for the umbrella.
Definition at line 285 of file UmbrellaComputer.h.
|
private |
Tracker used to move on the digital surface.
Definition at line 283 of file UmbrellaComputer.h.