31 #if defined(UmbrellaComputer_RECURSES) 32 #error Recursive header files inclusion detected in UmbrellaComputer.h 33 #else // defined(UmbrellaComputer_RECURSES) 35 #define UmbrellaComputer_RECURSES 37 #if !defined UmbrellaComputer_h 39 #define UmbrellaComputer_h 44 #include "DGtal/base/Common.h" 45 #include "DGtal/topology/CDigitalSurfaceTracker.h" 86 template <
typename TDigitalSurfaceTracker>
96 typedef typename DigitalSurfaceContainer::KSpace
KSpace;
97 typedef typename DigitalSurfaceContainer::Surfel
Surfel;
98 typedef typename DigitalSurfaceContainer::Size
Size;
99 typedef typename KSpace::SCell
SCell;
116 inline State(
const Surfel & _surfel,
118 : surfel( _surfel ), k( _k ), epsilon( _epsilon ), j( _j )
122 return ( surfel == other.
surfel )
124 && ( epsilon == other.
epsilon )
129 return ( surfel < other.
surfel )
130 || ( ( surfel == other.
surfel )
132 || ( ( k == other.
k )
133 && ( ( epsilon < other.
epsilon )
134 || ( ( epsilon == other.
epsilon)
135 && ( j < other.
j ) ) ) ) ) );
178 void init(
const DigitalSurfaceTracker & tracker,
203 const KSpace &
space()
const;
209 const Surfel &
surfel()
const;
303 template <
typename TDigitalSurfaceTracker>
305 operator<< ( std::ostream & out, const UmbrellaComputer<TDigitalSurfaceTracker> & object );
312 #include "DGtal/topology/UmbrellaComputer.ih" 317 #endif // !defined UmbrellaComputer_h 319 #undef UmbrellaComputer_RECURSES 320 #endif // else defined(UmbrellaComputer_RECURSES) void selfDisplay(std::ostream &out) const
DigitalSurfaceContainer::Size Size
bool operator<(const State &other) const
DigitalSurfaceTracker * myTracker
Tracker used to move on the digital surface.
TDigitalSurfaceTracker DigitalSurfaceTracker
DGtal::uint32_t Dimension
bool epsilon
Orientation to find separator (true = positively along k-axis)
void setState(const State &aState)
void init(const DigitalSurfaceTracker &tracker, Dimension k, bool epsilon, Dimension j)
const KSpace & space() const
Accessor to the digital space.
State(const Surfel &_surfel, Dimension _k, bool _epsilon, Dimension _j)
State myState
Current state for the umbrella.
bool operator==(const State &other) const
Dimension k
Direction to find separator, k in sDirs(surfel).
bool trackOrientation() const
DigitalSurfaceTracker::DigitalSurfaceContainer DigitalSurfaceContainer
bool separatorOrientation() const
const State & state() const
Accessor to current state.
DGtal is the top-level namespace which contains all DGtal functions and types.
Dimension j
Track direction (j != k), j in sDirs(surfel).
BOOST_CONCEPT_ASSERT((concepts::CDigitalSurfaceTracker< TDigitalSurfaceTracker >))
Aim: Useful for computing umbrellas on 'DigitalSurface's, ie set of n-1 cells around a n-3 cell...
UmbrellaComputer()
Constructor. The object is not valid.
UmbrellaComputer & operator=(const UmbrellaComputer &other)
Surfel surfel
Current surfel.
void getState(State &aState) const
~UmbrellaComputer()
Destructor.
Dimension orthDir() const
DigitalSurfaceContainer::Surfel Surfel
Dimension trackDir() const
DigitalSurfaceContainer::KSpace KSpace
Dimension separatorDir() const