LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::thresholding Class Reference

Threshold segmentation of a single channel (monochrom) image or a contour. More...

#include <ltiThresholding.h>

Inheritance diagram for lti::thresholding:
Inheritance graph
[legend]
Collaboration diagram for lti::thresholding:
Collaboration graph
[legend]

List of all members.

Classes

class  parameters
 the parameters for the class thresholding More...

Public Member Functions

 thresholding ()
 thresholding (const parameters &par)
 thresholding (const thresholding &other)
virtual ~thresholding ()
virtual const char * getTypeName () const
bool apply (channel8 &srcdest) const
bool apply (const channel8 &src, channel8 &dest) const
bool apply (const channel8 &src, channel8 &dest, const float lowThreshold, const float highThreshold=1.0f, const bool keepInRegion=true, const bool keepOutRegion=false) const
bool apply (channel &src) const
bool apply (const channel &src, channel8 &dest) const
bool apply (const channel &src, channel &dest) const
bool apply (const channel &src, channel &dest, const float lowThreshold, const float highThreshold=1.0f, const bool keepInRegion=true, const bool keepOutRegion=false, const float inRegionValue=1.0f, const float outRegionValue=0.0f) const
bool apply (const channel8 &src, areaPoints &dest) const
bool apply (const channel &src, areaPoints &dest) const
bool apply (const channel8 &src, const areaPoints &comp, areaPoints &dest) const
bool apply (const channel &src, const areaPoints &comp, areaPoints &dest) const
thresholdingcopy (const thresholding &other)
virtual functorclone () const
virtual bool updateParameters ()
const parametersgetParameters () const

Protected Member Functions

bool initLut (ubyte *lut, ubyte *mask, const float lowThreshold, const float highThreshold, const bool keepInRegion, const bool keepOutRegion, const float inRegionValue, const float outRegionValue) const

Protected Attributes

ubyte lut [256]
ubyte mask [256]

Detailed Description

Threshold segmentation of a single channel (monochrom) image or a contour.

An upper and a lower threshold are used in order to define the pixel-value-region where the thresholding should operate.

Attention: This class was ThresholdSegmentation, but the meaning of highThreshold and lowThreshold has been changed.


Constructor & Destructor Documentation

lti::thresholding::thresholding (  ) 

default constructor

lti::thresholding::thresholding ( const parameters par  ) 

Construct a functor using the given parameters.

lti::thresholding::thresholding ( const thresholding other  ) 

copy constructor

Parameters:
other the object to be copied
virtual lti::thresholding::~thresholding (  )  [virtual]

destructor


Member Function Documentation

bool lti::thresholding::apply ( const channel src,
const areaPoints comp,
areaPoints dest 
) const

segmentate the src channel, and consider only the area points given by the "comp" point list .

Parameters:
src channel with the source data.
comp the list of points that should be segmented
dest point list where the result will be left.
Returns:
true if apply successful or false otherwise.
bool lti::thresholding::apply ( const channel8 src,
const areaPoints comp,
areaPoints dest 
) const

segmentate the src channel, and consider only the area points given by the "comp" list.

Parameters:
src channel8 with the source data.
comp the list of points that should be segmented
dest point list where the result will be left.
Returns:
true if apply successful or false otherwise.
bool lti::thresholding::apply ( const channel src,
areaPoints dest 
) const

segmentate the channel src, and generate an area-points-list on for the given dest-contour

Parameters:
src channel with the source data.
dest the area point list where the result will be left. Only the area points will be generated. If you need another contour representation you can use the castFrom methods of the other point list types (see lti::borderPoints, lti::ioPoints)
Returns:
true if apply successful or false otherwise.
bool lti::thresholding::apply ( const channel8 src,
areaPoints dest 
) const

segmentate the channel src, and generate an area-points-list on for the given dest-contour

Parameters:
src channel8 with the source data.
dest the area point-list where the result will be left.
Returns:
true if apply successful or false otherwise.
bool lti::thresholding::apply ( const channel src,
channel dest,
const float  lowThreshold,
const float  highThreshold = 1.0f,
const bool  keepInRegion = true,
const bool  keepOutRegion = false,
const float  inRegionValue = 1.0f,
const float  outRegionValue = 0.0f 
) const

segmentate the src channel and leave the result on dest.

Parameters:
src channel with the source data
dest channel where the results will be left
lowThreshold low threshold value
highThreshold high threshold value (optional Default: 1.0f)
keepInRegion if the inner pixels should be kept (optional Default: true)
keepOutRegion if the outer pixels should be kept (optional Default: false)
inRegionValue if keepInRegion is false the inner pixels are replaced with this value (optional Default: 1.0f)
outRegionValue if keepOutRegion is false the outer pixels are replaced with this value (optional Default: 0.0f)
bool lti::thresholding::apply ( const channel src,
channel dest 
) const [virtual]

segmentate the channel src, and leave the result in dest

Parameters:
src channel with the source data.
dest channel where the resulting mask will be left.
Returns:
true if apply successful or false otherwise.

Reimplemented from lti::modifier.

Reimplemented in lti::relativeThresholding.

bool lti::thresholding::apply ( const channel src,
channel8 dest 
) const

generates a mask for the channel src.

Parameters:
src channel with the source data.
dest channel where the resulting mask will be left.
Returns:
true if apply successful or false otherwise.
bool lti::thresholding::apply ( channel src  )  const [virtual]

segmentates a channel on place

Parameters:
src channel with the source data. The result will be left here as well.
Returns:
true if apply successful or false otherwise.

Reimplemented from lti::modifier.

Reimplemented in lti::relativeThresholding.

bool lti::thresholding::apply ( const channel8 src,
channel8 dest,
const float  lowThreshold,
const float  highThreshold = 1.0f,
const bool  keepInRegion = true,
const bool  keepOutRegion = false 
) const

segmentate the src channel and leave the result on dest.

this apply is slower because everytime it is invoked a new Lookuptable is generated

Parameters:
src channel8 with the source data.
dest channel8 where the result will be left.
lowThreshold low threshold value
highThreshold high threshold value (optional Default: 1)
keepInRegion if the inner pixels should be kept (optional Default: true)
keepOutRegion if the outer pixels should be kept (optional Default: false)
Returns:
true if apply successful or false otherwise.
bool lti::thresholding::apply ( const channel8 src,
channel8 dest 
) const [virtual]

segmentate the src channel and leave the result on dest

Parameters:
src channel8 with the source data.
dest channel8 where the result will be left.
Returns:
true if apply successful or false otherwise.

Reimplemented from lti::modifier.

Reimplemented in lti::relativeThresholding.

bool lti::thresholding::apply ( channel8 srcdest  )  const [virtual]

operates on the given parameter.

Parameters:
srcdest channel8 with the source data. The result will be left here too.
Returns:
true if apply successful or false otherwise.

Reimplemented from lti::modifier.

Reimplemented in lti::relativeThresholding.

virtual functor* lti::thresholding::clone (  )  const [virtual]

returns a pointer to a clone of the functor.

Implements lti::functor.

Reimplemented in lti::optimalThresholding, and lti::relativeThresholding.

thresholding& lti::thresholding::copy ( const thresholding other  ) 

copy data of "other" functor.

Reimplemented from lti::functor.

Reimplemented in lti::optimalThresholding, and lti::relativeThresholding.

const parameters& lti::thresholding::getParameters (  )  const

returns used parameters

Reimplemented from lti::modifier.

Reimplemented in lti::optimalThresholding, and lti::relativeThresholding.

virtual const char* lti::thresholding::getTypeName (  )  const [virtual]

returns the name of this type ("thresholding")

Reimplemented from lti::modifier.

Reimplemented in lti::optimalThresholding, and lti::relativeThresholding.

bool lti::thresholding::initLut ( ubyte lut,
ubyte mask,
const float  lowThreshold,
const float  highThreshold,
const bool  keepInRegion,
const bool  keepOutRegion,
const float  inRegionValue,
const float  outRegionValue 
) const [protected]

Method to init the lookuptables.

The lookuptables will be used to accelerate the segmentation of channel8 data. Usually they are initialized within invocation of setParameters() but also in applies to channel8 which contains Thresholds as parameters.

Parameters:
lut where to store the look up table
mask where to store the mask table
lowThreshold low threshold value
highThreshold high threshold value
keepInRegion whether the inner pixels of the original channel8 should be kept
keepOutRegion whether the outer pixels of the original channel8 should be kept
inRegionValue if keepInRegion is false, the pixel will be overwritten with this value
outRegionValue if keepOutRegion is false, the pixel will be overwritten with this value
virtual bool lti::thresholding::updateParameters (  )  [virtual]

sets the functor's parameters.

This member makes a copy of theParam: the functor will keep its own copy of the parameters!

Reimplemented from lti::functor.


Member Data Documentation

ubyte lti::thresholding::lut[256] [protected]

This look up table will be used to accelerate the segmentation of channel8 data.

It contains the value to be assigned to the destination channel It will be generated within the member setParameters

ubyte lti::thresholding::mask[256] [protected]

This look up table will be used to accelerate the segmentation of channel8 data.

It contains 0 if the value must be considered as background or 1 otherwise. It will be generated within the member setParameters


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

Generated on Sat Apr 10 15:27:56 2010 for LTI-Lib by Doxygen 1.6.1