#include <OpenMS/FILTERING/SMOOTHING/GaussFilter.h>
Gaussian filters are important in many signal processing, image processing, and communication applications. These filters are characterized by narrow bandwidths, sharp cutoffs, and low passband ripple. A key feature of Gaussian filters is that the Fourier transform of a Gaussian is also a Gaussian, so the filter has the same response shape in both the time and frequency domains. The coefficients of the Gaussian-window with length
are calculated from the gaussian distribution
where represents the window area and
is the standard derivation.
Public Member Functions | |
GaussFilter () | |
Constructor. | |
virtual | ~GaussFilter () |
Destructor. | |
template<typename InputPeakIterator, typename OutputPeakContainer> | |
void | filter (InputPeakIterator first, InputPeakIterator last, OutputPeakContainer &smoothed_data_container) |
Applies the convolution with the filter coefficients to an given iterator range. | |
template<typename InputPeakContainer, typename OutputPeakContainer> | |
void | filter (const InputPeakContainer &input_peak_container, OutputPeakContainer &smoothed_data_container) |
Convolutes the filter coefficients and the input raw data. | |
template<typename InputSpectrumIterator, typename OutputPeakType> | |
void | filterExperiment (InputSpectrumIterator first, InputSpectrumIterator last, MSExperiment< OutputPeakType > &ms_exp_filtered) |
Filters every MSSpectrum in a given iterator range. | |
template<typename InputPeakType, typename OutputPeakType> | |
void | filterExperiment (const MSExperiment< InputPeakType > &ms_exp_raw, MSExperiment< OutputPeakType > &ms_exp_filtered) |
Filters a MSExperiment. | |
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> | |
DoubleReal | integrate_ (InputPeakIterator x, InputPeakIterator first, InputPeakIterator last) |
Computes the convolution of the raw data at position x and the gaussian kernel. | |
Protected Attributes | |
DoubleReal | sigma_ |
The standard derivation ![]() | |
DoubleReal | spacing_ |
The spacing of the pre-tabulated kernel coefficients. |
GaussFilter | ( | ) | [inline] |
Constructor.
virtual ~GaussFilter | ( | ) | [inline, virtual] |
Destructor.
void filter | ( | InputPeakIterator | first, | |
InputPeakIterator | last, | |||
OutputPeakContainer & | smoothed_data_container | |||
) | [inline] |
Applies the convolution with the filter coefficients to an given iterator range.
Convolutes the filter and the raw data in the iterator intervall [first,last) and writes the resulting data to the smoothed_data_container.
The resulting peaks in the smoothed_data_container (e.g. of type MSSpectrum<RawDataPoint1D >) can be of type RawDataPoint1D or any other class derived from DRawDataPoint.
Reimplemented from SmoothFilter.
void filter | ( | const InputPeakContainer & | input_peak_container, | |
OutputPeakContainer & | smoothed_data_container | |||
) | [inline] |
Convolutes the filter coefficients and the input raw data.
Convolutes the filter and the raw data in the input_peak_container and writes the resulting data to the smoothed_data_container.
The resulting peaks in the smoothed_data_container (e.g. of type MSSpectrum<RawDataPoint1D >) can be of type RawDataPoint1D or any other class derived from DRawDataPoint.
Reimplemented from SmoothFilter.
void filterExperiment | ( | InputSpectrumIterator | first, | |
InputSpectrumIterator | last, | |||
MSExperiment< OutputPeakType > & | ms_exp_filtered | |||
) | [inline] |
Filters every MSSpectrum in a given iterator range.
Filters the data successive in every scan in the intervall [first,last). The filtered data are stored in a MSExperiment.
You have to copy the ExperimentalSettings of the raw data by your own.
Reimplemented from SmoothFilter.
void filterExperiment | ( | const MSExperiment< InputPeakType > & | ms_exp_raw, | |
MSExperiment< OutputPeakType > & | ms_exp_filtered | |||
) | [inline] |
Filters a MSExperiment.
Filters the data every scan in the MSExperiment. The filtered data are stored in a MSExperiment.
Reimplemented from SmoothFilter.
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.
DoubleReal integrate_ | ( | InputPeakIterator | x, | |
InputPeakIterator | first, | |||
InputPeakIterator | last | |||
) | [inline, protected] |
Computes the convolution of the raw data at position x and the gaussian kernel.
DoubleReal sigma_ [protected] |
The standard derivation .
DoubleReal spacing_ [protected] |
The spacing of the pre-tabulated kernel coefficients.
Generated Tue Apr 1 15:36:44 2008 -- using doxygen 1.5.4 | OpenMS / TOPP 1.1 |