Skip to content

Design of Digital Surfaces

JacquesOlivierLachaud edited this page Sep 1, 2011 · 11 revisions
  • A DigitalSurface represents a set of surfels (n-1 cells) which are connected through an adjacency relation. The digital surface has an orientation. The DigitalSurface lies in some cellular grid space KSpace.

  • DigitalSurfaces may appear in different context:

    • as the boundary of a digital object
    • as a set of signed surfels
    • as a connected boundary of some implicitly defined shape.
  • Therefore, DigitalSurfaces have several containers, which satisfy the concept CDigitalSurfaceContainer.

  • A DigitalSurface references smartly its container so as to be "light".

  • DigitalSurface<TDigitalSurfaceContainer> is a proxy class to a DigitalSurfaceContainer with:

    • inner types:
      • Self
      • DigitalSurfaceContainer
      • KSpace: == DigitalSurfaceContainer::KSpace
      • Cell, SCell, Surfel deduits du conteneur
      • ConstIterator: iterator for visiting Surfels
    • methods
      • constructors: default, copy, const DigitalSurfaceContainer & (copied), DigitalContainer* (acquired).
      • container() const and container() : return a (const or not) DigitalSurfaceContainer&
      • begin() const, end() const : wrappers to container methods.
      • neighborhood()
    • data
      • CowPtr<DigitalSurfaceContainer>
    • Propositions
      • a model of CGraph (Vertex, etc)
  • A CDigitalSurfaceContainer is a concept:

    • inner types:
      • KSpace: specifies the cellular space in which the digital surface is embedded.
      • Surfel : must be KSpace::SCell compatible (generally SCell itself).
      • SurfelConstIterator: iterator for visiting all surfels.
      • DigitalSurfaceTracker: tracker for visiting surface.
    • methods:
      • space() const: const KSpace &
      • isInside( Surfel ) const : bool
      • begin() const : SurfelConstIterator
      • end() const : SurfelConstIterator
      • newTracker( Surfel ) const: DigitalSurfaceTracker*
    • models:
      • DigitalSetBoundary: the digital surface is defined as the boundary of a digital set of points.
      • SpelSetBoundary: the digital surface is defined as the boundary of a set of spels.
      • ImplicitDigitalSurface: the digital surface is defined with a Surfel and a PointPredicate. It is connected.
      • ExplicitDigitalSurface: the digital surface is defined as a set of Surfels.
      • ...
    • data (just for information, not required)
      • const KSpace & mySpace
  • A DigitalSurfaceTracker is defined through the concept CDigitalSurfaceTracker

    • inner types:
      • DigitalSurfaceContainer
      • Surfel
    • methods:
      • copy constructor
      • surface() const : DigitalSurfaceContainer &
      • current() const : Surfel
      • orthDir() const : Direction orthogonal direction to current surfel.
      • move( const Surfel & s ) : moves the tracker to the given valid surfel ( Pre-cond surface().isInside( s ) )
      • adjacent( Surfel & s, Direction d, bool pos ) : uint8. s is the adjacent surfel to current() if it exists (different from 0). the returned value is n=1-3, n being the nth follower.
    • models:
      • ObjectBoundaryTracker, ImplicitSurfaceTracker, ExplicitSurfaceTracker