DGtal  1.3.beta
Public Types | Public Member Functions | Protected Member Functions | Private Attributes
DGtal::functors::IntervalForegroundPredicate< Image > Class Template Reference

Aim: Define a simple Foreground predicate thresholding image values between two constant values (the first one being excluded). More...

#include <DGtal/images/IntervalForegroundPredicate.h>

Public Types

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

Public Member Functions

 BOOST_CONCEPT_ASSERT ((concepts::CConstImage< Image >))
 
 IntervalForegroundPredicate (ConstAlias< Image > aImage, const Value minVal, const Value maxVal)
 
bool operator() (const typename Image::Point &aPoint) const
 
bool operator() (const typename Image::ConstRange::ConstIterator &it) const
 

Protected Member Functions

 IntervalForegroundPredicate ()
 

Private Attributes

const ImagemyImage
 
Value myMaxVal
 
Value myMinVal
 

Detailed Description

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

Aim: Define a simple Foreground predicate thresholding image values between two constant values (the first one being excluded).

Description of template class 'IntervalForegroundPredicate'

This class is a model of concepts::CPointPredicate.

Template Parameters
Imagean model of CImageContainer concept.
Examples
geometry/surfaces/dvcm-3d.cpp.

Definition at line 64 of file IntervalForegroundPredicate.h.

Member Typedef Documentation

◆ Point

Definition at line 70 of file IntervalForegroundPredicate.h.

◆ Value

Definition at line 69 of file IntervalForegroundPredicate.h.

Constructor & Destructor Documentation

◆ IntervalForegroundPredicate() [1/2]

template<typename Image >
DGtal::functors::IntervalForegroundPredicate< Image >::IntervalForegroundPredicate ( ConstAlias< Image aImage,
const Value  minVal,
const Value  maxVal 
)
inline

Constructor. This functor can be used to threshold image values in the interval ]minVal,maxVal].

Parameters
aImagethe image.
minValthe minimum value (first value excluded).
maxValthe maximum value (last value considered).

Definition at line 80 of file IntervalForegroundPredicate.h.

82  :
83  myImage(&aImage), myMaxVal(maxVal), myMinVal(minVal) {};

◆ IntervalForegroundPredicate() [2/2]

Member Function Documentation

◆ BOOST_CONCEPT_ASSERT()

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

◆ operator()() [1/2]

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

Definition at line 96 of file IntervalForegroundPredicate.h.

97  {
98  return ((*it) > myMinVal) && ((*it) <= myMaxVal);
99  }

References DGtal::functors::IntervalForegroundPredicate< Image >::myMaxVal, and DGtal::functors::IntervalForegroundPredicate< Image >::myMinVal.

◆ operator()() [2/2]

template<typename Image >
bool DGtal::functors::IntervalForegroundPredicate< Image >::operator() ( const typename Image::Point aPoint) const
inline

Field Documentation

◆ myImage

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

◆ myMaxVal

template<typename Image >
Value DGtal::functors::IntervalForegroundPredicate< Image >::myMaxVal
private

◆ myMinVal

template<typename Image >
Value DGtal::functors::IntervalForegroundPredicate< Image >::myMinVal
private

The documentation for this class was generated from the following file:
DGtal::functors::IntervalForegroundPredicate::myMinVal
Value myMinVal
Definition: IntervalForegroundPredicate.h:105
aPoint
const Point aPoint(3, 4)
DGtal::functors::IntervalForegroundPredicate::myImage
const Image * myImage
Definition: IntervalForegroundPredicate.h:103
DGtal::functors::IntervalForegroundPredicate::myMaxVal
Value myMaxVal
Definition: IntervalForegroundPredicate.h:104