Image Component Library (ICL)
|
Class for thresholding operations. More...
#include <ThresholdOp.h>
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 |
Class for thresholding operations.
Essentially there are two different types of Threshold functions:
There exist two different types off function interfaces:
icl::filter::ThresholdOp::ThresholdOp | ( | optype | ttype, |
float | lowThreshold = 127 , |
||
float | highThreshold = 127 , |
||
float | lowVal = 0 , |
||
float | highVal = 255 |
||
) |
Constructor.
ttype | threshold type, |
lowThreshold | lower threshold |
highThreshold | upper threshold |
lowVal | values above lowThreshold will be set to this value |
highVal | values higher than highThreshold will be set to this value |
virtual icl::filter::ThresholdOp::~ThresholdOp | ( | ) | [virtual] |
Destructor.
virtual void icl::filter::ThresholdOp::apply | ( | const core::ImgBase * | poSrc, |
core::ImgBase ** | ppoDst | ||
) | [virtual] |
applies the Threshold Operator
poSrc | the source image |
ppoDst | pointer to the destination image |
Implements icl::filter::UnaryOp.
float icl::filter::ThresholdOp::getHighThreshold | ( | ) | const [inline] |
returns the upper threshold
float icl::filter::ThresholdOp::getHighVal | ( | ) | const [inline] |
returns the upper value
float icl::filter::ThresholdOp::getLowThreshold | ( | ) | const [inline] |
returns the lower threshold
float icl::filter::ThresholdOp::getLowVal | ( | ) | const [inline] |
returns the lower value
optype icl::filter::ThresholdOp::getType | ( | ) | const [inline] |
returns the type of the thresholding operation
void icl::filter::ThresholdOp::setHighThreshold | ( | float | highThreshold | ) | [inline] |
sets the upper threshold
highThreshold | upper threshold |
void icl::filter::ThresholdOp::setHighVal | ( | float | highVal | ) | [inline] |
sets the upper value
highVal | upper value |
void icl::filter::ThresholdOp::setLowThreshold | ( | float | lowThreshold | ) | [inline] |
sets the lower threshold
lowThreshold | lower threshold |
void icl::filter::ThresholdOp::setLowVal | ( | float | lowVal | ) | [inline] |
sets the lower value
lowVal | lower value |
void icl::filter::ThresholdOp::setType | ( | optype | type | ) | [inline] |
sets the type of the thresholding operation
type | optype |
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
optype icl::filter::ThresholdOp::m_eType [private] |
float icl::filter::ThresholdOp::m_fHighThreshold [private] |
float icl::filter::ThresholdOp::m_fHighVal [private] |
float icl::filter::ThresholdOp::m_fLowThreshold [private] |
float icl::filter::ThresholdOp::m_fLowVal [private] |