DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions | Protected Member Functions | Private Attributes
DGtal::IntervalForegroundPredicate< Image > Class Template Reference

#include <IntervalForegroundPredicate.h>

Collaboration diagram for DGtal::IntervalForegroundPredicate< Image >:
Collaboration graph
[legend]

Public Types

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

Public Member Functions

 BOOST_CONCEPT_ASSERT ((CImage< Image >))
 IntervalForegroundPredicate (const Image &aImage, const Value minVal, const Value maxVal)
bool operator() (const typename Image::Point &aPoint) const
bool operator() (const typename Image::Iterator &it) const
bool operator() (const typename Image::ConstIterator &it) const
bool operator() (const typename Image::SpanIterator &it) const

Protected Member Functions

 IntervalForegroundPredicate ()

Private Attributes

CountedPtr< ImagemyImage
Value myMaxVal
Value myMinVal

Detailed Description

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

Aim: Define a simple Foreground predicate thresholding image values between two constant values.

Description of template class 'IntervalForegroundPredicate'

Template Parameters:
TImagean model of CImageContainer concept.

Definition at line 60 of file IntervalForegroundPredicate.h.


Member Typedef Documentation

template<typename Image>
typedef Image::Point DGtal::IntervalForegroundPredicate< Image >::Point

Definition at line 66 of file IntervalForegroundPredicate.h.

template<typename Image>
typedef Image::Value DGtal::IntervalForegroundPredicate< Image >::Value

Definition at line 65 of file IntervalForegroundPredicate.h.


Constructor & Destructor Documentation

template<typename Image>
DGtal::IntervalForegroundPredicate< Image >::IntervalForegroundPredicate ( const 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:
minValthe minimum value (first value excluded).
maxValthe maximum value (last value considered).

Definition at line 75 of file IntervalForegroundPredicate.h.

:
myImage(new Image(aImage)), myMaxVal(maxVal), myMinVal(minVal) {};
template<typename Image>
DGtal::IntervalForegroundPredicate< Image >::IntervalForegroundPredicate ( )
protected

Member Function Documentation

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

Definition at line 83 of file IntervalForegroundPredicate.h.

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

{
return ((*myImage)(aPoint) > myMinVal) && ((*myImage)(aPoint) <= myMaxVal);
}
template<typename Image>
bool DGtal::IntervalForegroundPredicate< Image >::operator() ( const typename Image::Iterator it) const
inline
Returns:
True if the point belongs to the value interval.

Definition at line 91 of file IntervalForegroundPredicate.h.

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

{
return ((*myImage)(it) > myMinVal) && ((*myImage)(it) <= myMaxVal);
}
template<typename Image>
bool DGtal::IntervalForegroundPredicate< Image >::operator() ( const typename Image::ConstIterator it) const
inline
Returns:
True if the point belongs to the value interval.

Definition at line 99 of file IntervalForegroundPredicate.h.

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

{
return ((*myImage)(it) > myMinVal) && ((*myImage)(it) <= myMaxVal);
}
template<typename Image>
bool DGtal::IntervalForegroundPredicate< Image >::operator() ( const typename Image::SpanIterator it) const
inline
Returns:
True if the point belongs to the value interval.

Definition at line 107 of file IntervalForegroundPredicate.h.

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

{
return ((*myImage)(it) > myMinVal) && ((*myImage)(it) <= myMaxVal);
}

Field Documentation

template<typename Image>
CountedPtr<Image> DGtal::IntervalForegroundPredicate< Image >::myImage
private
template<typename Image>
Value DGtal::IntervalForegroundPredicate< Image >::myMaxVal
private
template<typename Image>
Value DGtal::IntervalForegroundPredicate< Image >::myMinVal
private

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