DGtal 1.3.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | Private Attributes
DGtal::functors::SimpleThresholdForegroundPredicate< Image > Class Template Reference

Aim: Define a simple Foreground predicate thresholding image values given a single thresold. More precisely, the functor operator() returns true if the value is greater than a given threshold. More...

#include <DGtal/images/SimpleThresholdForegroundPredicate.h>

Public Types

typedef Image::Value Value
 
typedef Image::Point Point
 

Public Member Functions

 BOOST_CONCEPT_ASSERT ((concepts::CConstImage< Image >))
 
 SimpleThresholdForegroundPredicate (ConstAlias< Image > aImage, const Value value)
 
bool operator() (const typename Image::Point &aPoint) const
 
bool operator() (const typename Image::Domain::ConstIterator &it) const
 
bool operator() (const typename Image::ConstRange::ConstIterator &it) const
 

Protected Member Functions

 SimpleThresholdForegroundPredicate ()
 

Private Attributes

const ImagemyImage
 
Value myVal
 

Detailed Description

template<typename Image>
class DGtal::functors::SimpleThresholdForegroundPredicate< Image >

Aim: Define a simple Foreground predicate thresholding image values given a single thresold. More precisely, the functor operator() returns true if the value is greater than a given threshold.

Description of template class 'SimpleThresholdForegroundPredicate'

This class is a model of concepts::CPointPredicate.

Template Parameters
Imagean model of CConstImage concept.
Examples
examples/tutorial-examples/polyhedralizer.cpp, geometry/volumes/distance/distancetransform2D.cpp, geometry/volumes/distance/distancetransform3D.cpp, geometry/volumes/distance/toricdomainvolumetric.cpp, tutorial-examples/polyhedralizer.cpp, and tutorial-examples/volDTGranulo.cpp.

Definition at line 65 of file SimpleThresholdForegroundPredicate.h.

Member Typedef Documentation

◆ Point

Definition at line 71 of file SimpleThresholdForegroundPredicate.h.

◆ Value

Definition at line 70 of file SimpleThresholdForegroundPredicate.h.

Constructor & Destructor Documentation

◆ SimpleThresholdForegroundPredicate() [1/2]

template<typename Image >
DGtal::functors::SimpleThresholdForegroundPredicate< Image >::SimpleThresholdForegroundPredicate ( ConstAlias< Image aImage,
const Value  value 
)
inline

Constructor. This functor can be used to threshold image values greater (>) than value.

Parameters
aImagethe image.
valuethe threshold value.

Definition at line 80 of file SimpleThresholdForegroundPredicate.h.

◆ SimpleThresholdForegroundPredicate() [2/2]

template<typename Image >
DGtal::functors::SimpleThresholdForegroundPredicate< Image >::SimpleThresholdForegroundPredicate ( )
protected

Member Function Documentation

◆ BOOST_CONCEPT_ASSERT()

template<typename Image >
DGtal::functors::SimpleThresholdForegroundPredicate< Image >::BOOST_CONCEPT_ASSERT ( (concepts::CConstImage< Image >)  )

◆ operator()() [1/3]

template<typename Image >
bool DGtal::functors::SimpleThresholdForegroundPredicate< Image >::operator() ( const typename Image::ConstRange::ConstIterator it) const
inline
Returns
True if the point belongs to the value interval.

Definition at line 103 of file SimpleThresholdForegroundPredicate.h.

104 {
105 return ((*it) > myVal);
106 }

References DGtal::functors::SimpleThresholdForegroundPredicate< Image >::myVal.

◆ operator()() [2/3]

template<typename Image >
bool DGtal::functors::SimpleThresholdForegroundPredicate< Image >::operator() ( const typename Image::Domain::ConstIterator it) const
inline
Returns
True if the point belongs to the value interval.

Definition at line 95 of file SimpleThresholdForegroundPredicate.h.

96 {
97 return ( (*myImage)(*it) > myVal);
98 }

References DGtal::functors::SimpleThresholdForegroundPredicate< Image >::myImage, and DGtal::functors::SimpleThresholdForegroundPredicate< Image >::myVal.

◆ operator()() [3/3]

template<typename Image >
bool DGtal::functors::SimpleThresholdForegroundPredicate< Image >::operator() ( const typename Image::Point aPoint) const
inline
Returns
True if the point belongs to the value interval.

Definition at line 87 of file SimpleThresholdForegroundPredicate.h.

88 {
89 return ((*myImage)(aPoint) > myVal);
90 }
const Point aPoint(3, 4)

References aPoint(), DGtal::functors::SimpleThresholdForegroundPredicate< Image >::myImage, and DGtal::functors::SimpleThresholdForegroundPredicate< Image >::myVal.

Field Documentation

◆ myImage

template<typename Image >
const Image* DGtal::functors::SimpleThresholdForegroundPredicate< Image >::myImage
private

◆ myVal


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