DGtal 1.3.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Member Functions | Private Attributes
DGtal::DigitalSurfacePredicate< TSurface > Class Template Reference

Aim: A point predicate which tells whether a point belongs to the set of pointels of a given digital surface or not. More...

#include <DGtal/geometry/surfaces/DigitalSurfacePredicate.h>

Public Types

using Surface = TSurface
 
using Point = typename Surface::Point
 
using Integer = typename Point::Coordinate
 
using KSpace = typename Surface::KSpace
 

Public Member Functions

 DigitalSurfacePredicate ()
 
 DigitalSurfacePredicate (ConstAlias< Surface > aSurface)
 
 ~DigitalSurfacePredicate ()
 
 DigitalSurfacePredicate (const DigitalSurfacePredicate &other)
 
DigitalSurfacePredicateoperator= (const DigitalSurfacePredicate &other)
 
bool operator() (Point const &aPoint) const
 
void selfDisplay (std::ostream &out) const
 
bool isValid () const
 

Private Member Functions

KSpace const & space () const
 
void buildPointSet ()
 

Private Attributes

CountedConstPtrOrConstPtr< SurfacemySurface
 
UnorderedSetByBlock< PointmyPointSet
 

Detailed Description

template<typename TSurface>
class DGtal::DigitalSurfacePredicate< TSurface >

Aim: A point predicate which tells whether a point belongs to the set of pointels of a given digital surface or not.

Description of template class 'DigitalSurfacePredicate'

Internally the set of pointels is stored in a DGtal::UnorderedSetByBlock.

Template Parameters
TSurfaceany digital surface type.

Models: A DigitalSurfacePredicate is a model of concepts::CPointPredicate.

Definition at line 65 of file DigitalSurfacePredicate.h.

Member Typedef Documentation

◆ Integer

template<typename TSurface >
using DGtal::DigitalSurfacePredicate< TSurface >::Integer = typename Point::Coordinate

Definition at line 71 of file DigitalSurfacePredicate.h.

◆ KSpace

template<typename TSurface >
using DGtal::DigitalSurfacePredicate< TSurface >::KSpace = typename Surface::KSpace

Definition at line 72 of file DigitalSurfacePredicate.h.

◆ Point

template<typename TSurface >
using DGtal::DigitalSurfacePredicate< TSurface >::Point = typename Surface::Point

Definition at line 70 of file DigitalSurfacePredicate.h.

◆ Surface

template<typename TSurface >
using DGtal::DigitalSurfacePredicate< TSurface >::Surface = TSurface

Definition at line 69 of file DigitalSurfacePredicate.h.

Constructor & Destructor Documentation

◆ DigitalSurfacePredicate() [1/3]

template<typename TSurface >
DGtal::DigitalSurfacePredicate< TSurface >::DigitalSurfacePredicate ( )

Default constructor.

◆ DigitalSurfacePredicate() [2/3]

template<typename TSurface >
DGtal::DigitalSurfacePredicate< TSurface >::DigitalSurfacePredicate ( ConstAlias< Surface aSurface)

Constructor.

Parameters
aSurfacea digital surface.

◆ ~DigitalSurfacePredicate()

template<typename TSurface >
DGtal::DigitalSurfacePredicate< TSurface >::~DigitalSurfacePredicate ( )

Destructor.

◆ DigitalSurfacePredicate() [3/3]

template<typename TSurface >
DGtal::DigitalSurfacePredicate< TSurface >::DigitalSurfacePredicate ( const DigitalSurfacePredicate< TSurface > &  other)

Copy constructor.

Parameters
otherthe object to clone.

Member Function Documentation

◆ buildPointSet()

template<typename TSurface >
void DGtal::DigitalSurfacePredicate< TSurface >::buildPointSet ( )
private

Computes the set of pointels, fills the myPointSet object.

◆ isValid()

template<typename TSurface >
bool DGtal::DigitalSurfacePredicate< TSurface >::isValid ( ) const

Checks the validity/consistency of the object.

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

◆ operator()()

template<typename TSurface >
bool DGtal::DigitalSurfacePredicate< TSurface >::operator() ( Point const &  aPoint) const

Test whether a point is a pointel of a digital surface or not.

Parameters
aPointany digital point.
Returns
'true' if the point is a pointel of the digital surface, false otherwise.

◆ operator=()

template<typename TSurface >
DigitalSurfacePredicate & DGtal::DigitalSurfacePredicate< TSurface >::operator= ( const DigitalSurfacePredicate< TSurface > &  other)

Copy assignment operator.

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

◆ selfDisplay()

template<typename TSurface >
void DGtal::DigitalSurfacePredicate< TSurface >::selfDisplay ( std::ostream &  out) const

Writes/Displays the object on an output stream.

Parameters
outthe output stream where the object is written.

◆ space()

template<typename TSurface >
KSpace const & DGtal::DigitalSurfacePredicate< TSurface >::space ( ) const
private

Get the Khalimsky space associated with the digital surface.

Field Documentation

◆ myPointSet

template<typename TSurface >
UnorderedSetByBlock<Point> DGtal::DigitalSurfacePredicate< TSurface >::myPointSet
private

The set of pointels.

Definition at line 138 of file DigitalSurfacePredicate.h.

◆ mySurface

template<typename TSurface >
CountedConstPtrOrConstPtr<Surface> DGtal::DigitalSurfacePredicate< TSurface >::mySurface
private

A pointer on the digital surface.

Definition at line 137 of file DigitalSurfacePredicate.h.


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