Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages

MorphFilter Class Reference

#include <OpenMS/FILTERING/BASELINE/MorphFilter.h>

Inheritance diagram for MorphFilter:

DefaultParamHandler ProgressLogger TopHatFilter

List of all members.


Detailed Description

This class is the baseclass of morphological filters.

The basic idea of a morphological filter is to inhibit selected signal structures. Such structures could be noise or some irrelevant signal structures like the baseline. A morphological filter is an increasing operator and has the feature of idempotenz, which means that structures which should be received will not be modified by more applications of the filter. This class provides the basic morphological operations Erosion and Dilatation with a structuring element (a flat line) of length frameSize_.

Erosion and dilatation are implemented using van Herk's method.

MorphFilter Parameters are explained on a separate page.

Public Member Functions

 MorphFilter ()
 Constructor.
virtual ~MorphFilter ()
 Destructor.
template<typename InputPeakIterator, typename OutputPeakContainer>
void dilatation (InputPeakIterator first, InputPeakIterator last, OutputPeakContainer &result, int l)
template<typename InputPeakIterator, typename OutputPeakContainer>
void erosion (InputPeakIterator first, InputPeakIterator last, OutputPeakContainer &result, int l)

Protected Member Functions

virtual void updateMembers_ ()
 This method is used to update extra member variables at the end of the setParam() method.
template<typename InputPeakIterator, typename OutputPeakContainer>
void minusIntensities_ (InputPeakIterator first, InputPeakIterator last, OutputPeakContainer &result)
 Subtracted the intensities of all data points in [first, last] from the intensities in result.
template<typename InputPeakIterator>
void calcGErosion_ (InputPeakIterator first, InputPeakIterator last, int l, DoubleReal *g, bool b)
 Compute the auxiliary fields g and h for the erosion.
template<typename InputPeakIterator>
void calcHErosion_ (InputPeakIterator first, int l, DoubleReal *h, bool b)
template<typename InputPeakIterator>
void calcGDilatation_ (InputPeakIterator first, InputPeakIterator last, int l, DoubleReal *g, bool b)
 Compute the auxiliary fields g and h for the dilatation.
template<typename InputPeakIterator>
void calcHDilatation_ (InputPeakIterator first, InputPeakIterator last, int l, DoubleReal *h, bool b)

Protected Attributes

DoubleReal struc_size_
 The length of the structuring element.


Constructor & Destructor Documentation

MorphFilter (  )  [inline]

Constructor.

virtual ~MorphFilter (  )  [inline, virtual]

Destructor.


Member Function Documentation

void dilatation ( InputPeakIterator  first,
InputPeakIterator  last,
OutputPeakContainer &  result,
int  l 
) [inline]

Van Herk's method of the Dilatation. The algorithm requires 3 min/max comparisons for every data point independent from the length of the structuring element. Basic idea of the dilatation is "Does the structuring element touch a given set?". The value of a data point $ x $ in the signal $ s $ after a dilatation is the maximal data point in a window which is represented by the structuring element $ B $, when the $ B $'s point of reference is at $ x $:

\[ [\delta_B(s)](x)=max_{b \in B} s(x+b). \]

Dilation.png

Dilation with a structuring element of length 3

void erosion ( InputPeakIterator  first,
InputPeakIterator  last,
OutputPeakContainer &  result,
int  l 
) [inline]

Van Herk's method of the Erosion. The algorithm requires 3 min/max comparisons for every data point independent from the length of the structuring element. Basic idea of the erosion is "Does the structuring element fit completely in a given set?". The value of a data point $ x $ in the signal $s $ after an erosion is the minimal data point in a window which is represented by the structuring element $ B$, when the $ B$'s point of reference is at $ x $:

\[ [\epsilon_B(s)](x)=min_{b \in B} s(x+b). \]

Erosion.png

Erosion with a structuring element of length 3

virtual void updateMembers_ (  )  [inline, protected, virtual]

This method is used to update extra member variables at the end of the setParam() method.

Also call it at the end of the derived classes' copy constructor and assignment operator.

The default implementation is empty.

Reimplemented from DefaultParamHandler.

void minusIntensities_ ( InputPeakIterator  first,
InputPeakIterator  last,
OutputPeakContainer &  result 
) [inline, protected]

Subtracted the intensities of all data points in [first, last] from the intensities in result.

void calcGErosion_ ( InputPeakIterator  first,
InputPeakIterator  last,
int  l,
DoubleReal g,
bool  b 
) [inline, protected]

Compute the auxiliary fields g and h for the erosion.

void calcHErosion_ ( InputPeakIterator  first,
int  l,
DoubleReal h,
bool  b 
) [inline, protected]

void calcGDilatation_ ( InputPeakIterator  first,
InputPeakIterator  last,
int  l,
DoubleReal g,
bool  b 
) [inline, protected]

Compute the auxiliary fields g and h for the dilatation.

void calcHDilatation_ ( InputPeakIterator  first,
InputPeakIterator  last,
int  l,
DoubleReal h,
bool  b 
) [inline, protected]


Member Data Documentation

DoubleReal struc_size_ [protected]

The length of the structuring element.


The documentation for this class was generated from the following file:
Generated Tue Apr 1 15:36:44 2008 -- using doxygen 1.5.4 OpenMS / TOPP 1.1