Image Component Library (ICL)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Private Member Functions | Private Attributes
icl::filter::ThresholdOp Class Reference

Class for thresholding operations. More...

#include <ThresholdOp.h>

Inheritance diagram for icl::filter::ThresholdOp:
icl::filter::UnaryOp icl::utils::Configurable

List of all members.

Public Types

enum  optype {
  lt, gt, ltgt, ltVal,
  gtVal, ltgtVal
}
 this enum specifiy all possible thresholding operations More...

Public Member Functions

 ThresholdOp (optype ttype, float lowThreshold=127, float highThreshold=127, float lowVal=0, float highVal=255)
 Constructor.
virtual ~ThresholdOp ()
 Destructor.
virtual void apply (const core::ImgBase *poSrc, core::ImgBase **ppoDst)
 applies the Threshold Operator
float getLowThreshold () const
 returns the lower threshold
float getHighThreshold () const
 returns the upper threshold
float getLowVal () const
 returns the lower value
float getHighVal () const
 returns the upper value
optype getType () const
 returns the type of the thresholding operation
void setLowThreshold (float lowThreshold)
 sets the lower threshold
void setHighThreshold (float highThreshold)
 sets the upper threshold
void setLowVal (float lowVal)
 sets the lower value
void setHighVal (float highVal)
 sets the upper value
void setType (optype type)
 sets the type of the thresholding operation

Private Member Functions

void tlt (const core::ImgBase *poSrc, core::ImgBase **ppoDst, float threshold)
 less than thresholding
void tgt (const core::ImgBase *poSrc, core::ImgBase **ppoDst, float threshold)
 greater than thresholding
void tltgt (const core::ImgBase *poSrc, core::ImgBase **ppoDst, float low, float hi)
 less than and greater than thresholding
void tltVal (const core::ImgBase *poSrc, core::ImgBase **ppoDst, float threshold, float val)
 less than thresholding with explicit set value
void tgtVal (const core::ImgBase *poSrc, core::ImgBase **ppoDst, float threshold, float val)
 greater than thresholding with explicit set value
void tltgtVal (const core::ImgBase *poSrc, core::ImgBase **ppoDst, float low, float lowVal, float hi, float hiVal)
 less than and greater than thresholding with explicit set values

Private Attributes

float m_fLowThreshold
float m_fHighThreshold
float m_fLowVal
float m_fHighVal
optype m_eType

Detailed Description

Class for thresholding operations.

Essentially there are two different types of Threshold functions:

Functions flavours

There exist two different types off function interfaces:

Benchmarks


Member Enumeration Documentation

this enum specifiy all possible thresholding operations

Enumerator:
lt 
gt 
ltgt 
ltVal 
gtVal 
ltgtVal 

Constructor & Destructor Documentation

icl::filter::ThresholdOp::ThresholdOp ( optype  ttype,
float  lowThreshold = 127,
float  highThreshold = 127,
float  lowVal = 0,
float  highVal = 255 
)

Constructor.

Parameters:
ttypethreshold type,
See also:
optype
Parameters:
lowThresholdlower threshold
highThresholdupper threshold
lowValvalues above lowThreshold will be set to this value
highValvalues higher than highThreshold will be set to this value

Destructor.


Member Function Documentation

virtual void icl::filter::ThresholdOp::apply ( const core::ImgBase poSrc,
core::ImgBase **  ppoDst 
) [virtual]

applies the Threshold Operator

Parameters:
poSrcthe source image
ppoDstpointer to the destination image

Implements icl::filter::UnaryOp.

returns the upper threshold

Returns:
upper threshold
float icl::filter::ThresholdOp::getHighVal ( ) const [inline]

returns the upper value

Returns:
upper value

returns the lower threshold

Returns:
lower threshold
float icl::filter::ThresholdOp::getLowVal ( ) const [inline]

returns the lower value

Returns:
lower value

returns the type of the thresholding operation

Returns:
optype
void icl::filter::ThresholdOp::setHighThreshold ( float  highThreshold) [inline]

sets the upper threshold

Parameters:
highThresholdupper threshold
void icl::filter::ThresholdOp::setHighVal ( float  highVal) [inline]

sets the upper value

Parameters:
highValupper value
void icl::filter::ThresholdOp::setLowThreshold ( float  lowThreshold) [inline]

sets the lower threshold

Parameters:
lowThresholdlower threshold
void icl::filter::ThresholdOp::setLowVal ( float  lowVal) [inline]

sets the lower value

Parameters:
lowVallower value
void icl::filter::ThresholdOp::setType ( optype  type) [inline]

sets the type of the thresholding operation

Parameters:
typeoptype
void icl::filter::ThresholdOp::tgt ( const core::ImgBase poSrc,
core::ImgBase **  ppoDst,
float  threshold 
) [private]

greater than thresholding

void icl::filter::ThresholdOp::tgtVal ( const core::ImgBase poSrc,
core::ImgBase **  ppoDst,
float  threshold,
float  val 
) [private]

greater than thresholding with explicit set value

void icl::filter::ThresholdOp::tlt ( const core::ImgBase poSrc,
core::ImgBase **  ppoDst,
float  threshold 
) [private]

less than thresholding

void icl::filter::ThresholdOp::tltgt ( const core::ImgBase poSrc,
core::ImgBase **  ppoDst,
float  low,
float  hi 
) [private]

less than and greater than thresholding

void icl::filter::ThresholdOp::tltgtVal ( const core::ImgBase poSrc,
core::ImgBase **  ppoDst,
float  low,
float  lowVal,
float  hi,
float  hiVal 
) [private]

less than and greater than thresholding with explicit set values

void icl::filter::ThresholdOp::tltVal ( const core::ImgBase poSrc,
core::ImgBase **  ppoDst,
float  threshold,
float  val 
) [private]

less than thresholding with explicit set value


Member Data Documentation


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines