DGtal  1.5.beta
DGtal::functors::BoundaryPredicate< TKSpace, TImage > Class Template Reference

Aim: The predicate on surfels that represents the frontier between a region and its complementary in an image. It can be used with ExplicitDigitalSurface or LightExplicitDigitalSurface so as to define a digital surface. Such surfaces may of course be open. More...

#include <DGtal/topology/helpers/BoundaryPredicate.h>

Public Types

typedef TKSpace KSpace
 
typedef TImage Image
 
typedef KSpace::Surfel Surfel
 
typedef KSpace::Point Point
 
typedef KSpace::SCell SCell
 
typedef Image::Value Value
 

Public Member Functions

 BOOST_CONCEPT_ASSERT ((concepts::CCellularGridSpaceND< TKSpace >))
 
 BOOST_CONCEPT_ASSERT ((concepts::CConstImage< TImage >))
 
 BOOST_STATIC_ASSERT ((concepts::ConceptUtils::SameType< typename KSpace::Point, typename Image::Point >::value))
 
 ~BoundaryPredicate ()
 
 BoundaryPredicate (ConstAlias< KSpace > aSpace, ConstAlias< Image > anImage, const Value &l1)
 
 BoundaryPredicate (const BoundaryPredicate &other)
 
BoundaryPredicateoperator= (const BoundaryPredicate &other)
 
bool operator() (const Surfel &s) const
 
void selfDisplay (std::ostream &out) const
 
bool isValid () const
 

Private Attributes

const KSpacemyPtrSpace
 the cellular space where lies the image. More...
 
const ImagemyPtrImage
 
Value myLabel1
 the label of the inner region that defines the boundary. More...
 

Detailed Description

template<typename TKSpace, typename TImage>
class DGtal::functors::BoundaryPredicate< TKSpace, TImage >

Aim: The predicate on surfels that represents the frontier between a region and its complementary in an image. It can be used with ExplicitDigitalSurface or LightExplicitDigitalSurface so as to define a digital surface. Such surfaces may of course be open.

Description of class 'BoundaryPredicate'

Template Parameters
TKSpaceany model of cellular space
TImageany model of Image

Definition at line 69 of file BoundaryPredicate.h.

Member Typedef Documentation

◆ Image

template<typename TKSpace , typename TImage >
typedef TImage DGtal::functors::BoundaryPredicate< TKSpace, TImage >::Image

Definition at line 76 of file BoundaryPredicate.h.

◆ KSpace

template<typename TKSpace , typename TImage >
typedef TKSpace DGtal::functors::BoundaryPredicate< TKSpace, TImage >::KSpace

Definition at line 75 of file BoundaryPredicate.h.

◆ Point

template<typename TKSpace , typename TImage >
typedef KSpace::Point DGtal::functors::BoundaryPredicate< TKSpace, TImage >::Point

Definition at line 78 of file BoundaryPredicate.h.

◆ SCell

template<typename TKSpace , typename TImage >
typedef KSpace::SCell DGtal::functors::BoundaryPredicate< TKSpace, TImage >::SCell

Definition at line 79 of file BoundaryPredicate.h.

◆ Surfel

template<typename TKSpace , typename TImage >
typedef KSpace::Surfel DGtal::functors::BoundaryPredicate< TKSpace, TImage >::Surfel

Definition at line 77 of file BoundaryPredicate.h.

◆ Value

template<typename TKSpace , typename TImage >
typedef Image::Value DGtal::functors::BoundaryPredicate< TKSpace, TImage >::Value

Definition at line 80 of file BoundaryPredicate.h.

Constructor & Destructor Documentation

◆ ~BoundaryPredicate()

template<typename TKSpace , typename TImage >
DGtal::functors::BoundaryPredicate< TKSpace, TImage >::~BoundaryPredicate ( )

Destructor.

◆ BoundaryPredicate() [1/2]

template<typename TKSpace , typename TImage >
DGtal::functors::BoundaryPredicate< TKSpace, TImage >::BoundaryPredicate ( ConstAlias< KSpace aSpace,
ConstAlias< Image anImage,
const Value l1 
)

Constructor. The frontier will be defined only with the image domain. The space must be large enough to contain the boundary.

Parameters
aSpacea cellular grid space (referenced).
anImageany image (referenced).
l1a label in the image that defines the inner region.

◆ BoundaryPredicate() [2/2]

template<typename TKSpace , typename TImage >
DGtal::functors::BoundaryPredicate< TKSpace, TImage >::BoundaryPredicate ( const BoundaryPredicate< TKSpace, TImage > &  other)

Copy constructor.

Parameters
otherthe object to clone.

Member Function Documentation

◆ BOOST_CONCEPT_ASSERT() [1/2]

template<typename TKSpace , typename TImage >
DGtal::functors::BoundaryPredicate< TKSpace, TImage >::BOOST_CONCEPT_ASSERT ( (concepts::CCellularGridSpaceND< TKSpace >)  )

◆ BOOST_CONCEPT_ASSERT() [2/2]

template<typename TKSpace , typename TImage >
DGtal::functors::BoundaryPredicate< TKSpace, TImage >::BOOST_CONCEPT_ASSERT ( (concepts::CConstImage< TImage >)  )

◆ BOOST_STATIC_ASSERT()

template<typename TKSpace , typename TImage >
DGtal::functors::BoundaryPredicate< TKSpace, TImage >::BOOST_STATIC_ASSERT ( (concepts::ConceptUtils::SameType< typename KSpace::Point, typename Image::Point >::value)  )

◆ isValid()

template<typename TKSpace , typename TImage >
bool DGtal::functors::BoundaryPredicate< TKSpace, TImage >::isValid ( ) const

Checks the validity/consistency of the object.

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

◆ operator()()

template<typename TKSpace , typename TImage >
bool DGtal::functors::BoundaryPredicate< TKSpace, TImage >::operator() ( const Surfel s) const

Predicate operator.

Parameters
sany surfel
Returns
'true' iff s has its inner voxel that has label myLabel1 in image myImage and its outer voxel that has a label different from myLabel1.

◆ operator=()

template<typename TKSpace , typename TImage >
BoundaryPredicate& DGtal::functors::BoundaryPredicate< TKSpace, TImage >::operator= ( const BoundaryPredicate< TKSpace, TImage > &  other)

Assignment. Required by CSurfelPredicate.

Parameters
otherthe object to clone.
Returns
a reference to this object.

◆ selfDisplay()

template<typename TKSpace , typename TImage >
void DGtal::functors::BoundaryPredicate< TKSpace, TImage >::selfDisplay ( std::ostream &  out) const

Writes/Displays the object on an output stream.

Parameters
outthe output stream where the object is written.

Field Documentation

◆ myLabel1

template<typename TKSpace , typename TImage >
Value DGtal::functors::BoundaryPredicate< TKSpace, TImage >::myLabel1
private

the label of the inner region that defines the boundary.

Definition at line 153 of file BoundaryPredicate.h.

◆ myPtrImage

template<typename TKSpace , typename TImage >
const Image* DGtal::functors::BoundaryPredicate< TKSpace, TImage >::myPtrImage
private

Definition at line 151 of file BoundaryPredicate.h.

◆ myPtrSpace

template<typename TKSpace , typename TImage >
const KSpace* DGtal::functors::BoundaryPredicate< TKSpace, TImage >::myPtrSpace
private

the cellular space where lies the image.

Definition at line 149 of file BoundaryPredicate.h.


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