| OpenMS 2.5.0

Public Types | Public Member Functions | Public Attributes | Protected Member Functions | List of all members
ContinuousWaveletTransformNumIntegration Class Reference

This class computes the continuous wavelet transformation using a marr wavelet. More...

`#include <OpenMS/TRANSFORMATIONS/RAW2PEAK/ContinuousWaveletTransformNumIntegration.h>`

Inheritance diagram for ContinuousWaveletTransformNumIntegration:

## Public Types

typedef ContinuousWaveletTransform::PeakConstIterator | PeakConstIterator
| Profile data const iterator type. More...
Public Types inherited from ContinuousWaveletTransform
typedef std::vector< Peak1D >::const_iterator | PeakConstIterator
| Raw data const iterator type. More...

## Public Member Functions

| ContinuousWaveletTransformNumIntegration ()
| Constructor. More...
| ~ContinuousWaveletTransformNumIntegration () override
| Destructor. More...
template<typename InputPeakIterator >
void | transform (InputPeakIterator begin_input, InputPeakIterator end_input, float resolution)
| Computes the wavelet transform of a given profile data interval [begin_input,end_input) More...
void | init (double scale, double spacing) override
| Perform necessary preprocessing steps like tabulating the Wavelet. More...
Public Member Functions inherited from ContinuousWaveletTransform
| ContinuousWaveletTransform ()
| Constructor. More...
virtual | ~ContinuousWaveletTransform ()
| Destructor. More...
const std::vector< Peak1D > & | getSignal () const
| Non-mutable access to the wavelet transform of the signal. More...
std::vector< Peak1D > & | getSignal ()
| Mutable access to the wavelet transform of the signal. More...
void | setSignal (const std::vector< Peak1D > &signal)
| Mutable access to the wavelet transform of the signal. More...
const std::vector< double > & | getWavelet () const
| Non-mutable access to the wavelet. More...
std::vector< double > & | getWavelet ()
| Mutable access to the wavelet. More...
void | setWavelet (const std::vector< double > &wavelet)
| Mutable access to the signal. More...
double | getScale () const
double & | getScale ()
| Mutable access to the spacing of raw data. More...
void | setScale (double scale)
| Mutable access to the spacing of raw data. More...
double | getSpacing () const
double & | getSpacing ()
| Mutable access to the spacing of raw data. More...
void | setSpacing (double spacing)
| Mutable access to the spacing of raw data. More...
SignedSize | getLeftPaddingIndex () const
| Non-mutable access to the position where the signal starts (in the interval [0,end_left_padding_) are the padded zeros) More...
SignedSize & | getLeftPaddingIndex ()
| Mutable access to the position where the signal starts. More...
void | setLeftPaddingIndex (const SignedSize end_left_padding)
| Mutable access to position where the signal starts. More...
SignedSize | getRightPaddingIndex () const
| Non-mutable access to the position where the signal ends (in the interval (begin_right_padding_,end] are the padded zeros) More...
SignedSize & | getRightPaddingIndex ()
| Mutable access to the position where the signal starts. More...
void | setRightPaddingIndex (const SignedSize begin_right_padding)
| Mutable access to position where the signal starts. More...
SignedSize | getSignalLength () const
| Non-mutable access to signal length [end_left_padding,begin_right_padding]. More...
SignedSize & | getSignalLength ()
| Mutable access to signal length [end_left_padding,begin_right_padding]. More...
void | setSignalLength (const SignedSize signal_length)
| Mutable access to signal length [end_left_padding,begin_right_padding]. More...
int | getSize () const
| Non-mutable access to signal length including padded zeros [0,end]. More...
double | operator[] (unsigned int i)
| Yields the signal (intensity) at position i. More...
double | operator[] (unsigned int i) const

## Public Attributes

std::vector< Peak1D > | signal_
| The transformed signal. More...
std::vector< double > | wavelet_
| The pre-tabulated wavelet used for the transform. More...
double | scale_
| Spacing and scale of the wavelet and length of the signal. More...
double | spacing_
SignedSize | end_left_padding_
SignedSize | begin_right_padding_
SignedSize | signal_length_

## Protected Member Functions

template<typename InputPeakIterator >
double | integrate_ (InputPeakIterator x, InputPeakIterator first, InputPeakIterator last)
| Computes the convolution of the wavelet and the profile data at position x with resolution = 1. More...
double | integrate_ (const std::vector< double > &processed_input, double spacing_data, int index)
| Computes the convolution of the wavelet and the profile data at position x with resolution > 1. More...
double | marr_ (const double x) const
| Computes the Marr wavelet at position x. More...
Protected Member Functions inherited from ContinuousWaveletTransform
template<typename InputPeakIterator >
double | getInterpolatedValue_ (double x, InputPeakIterator it_left)

## Additional Inherited Members

Protected Attributes inherited from ContinuousWaveletTransform
std::vector< Peak1D > | signal_
| The transformed signal. More...
std::vector< double > | wavelet_
| The pre-tabulated wavelet used for the transform. More...
double | scale_
| Spacing and scale of the wavelet and length of the signal. More...
double | spacing_
SignedSize | signal_length_
SignedSize | end_left_padding_
SignedSize | begin_right_padding_

## Detailed Description

This class computes the continuous wavelet transformation using a marr wavelet.

The convolution of the signal and the wavelet is computed by numerical integration.

## Member Typedef Documentation

## ◆ PeakConstIterator

typedef ContinuousWaveletTransform::PeakConstIterator PeakConstIterator

Profile data const iterator type.

## Constructor & Destructor Documentation

## ◆ ContinuousWaveletTransformNumIntegration()

ContinuousWaveletTransformNumIntegration | ( |  | ) |

inline

Constructor.

## ◆ ~ContinuousWaveletTransformNumIntegration()

~ContinuousWaveletTransformNumIntegration | ( |  | ) |

inline override

Destructor.

## Member Function Documentation

## ◆ init()

void init | ( | double | scale,
|  | double | spacing
| ) |  |

override virtual

Perform necessary preprocessing steps like tabulating the Wavelet.

Build a Marr-Wavelet for the current spacing and scale. We store the wavelet in the vector<double> wavelet_;

We only need a finite amount of points since the Marr function decays fast. We take 5*scale, since at that point the wavelet has dropped to ~ -10^-4

Reimplemented from ContinuousWaveletTransform.

## ◆ integrate_() [1/2]

double integrate_ | ( | InputPeakIterator | x,
|  | InputPeakIterator | first,
|  | InputPeakIterator | last
| ) |  |

inline protected

Computes the convolution of the wavelet and the profile data at position x with resolution = 1.

References OpenMS::Math::round().

## ◆ integrate_() [2/2]

double integrate_ | ( | const std::vector< double > & | processed_input,
|  | double | spacing_data,
|  | int | index
| ) |  |

protected

Computes the convolution of the wavelet and the profile data at position x with resolution > 1.

## ◆ marr_()

double marr_ | ( | const double | x | ) | const

inline protected

Computes the Marr wavelet at position x.

## ◆ transform()

void transform | ( | InputPeakIterator | begin_input,
|  | InputPeakIterator | end_input,
|  | float | resolution
| ) |  |

inline

Computes the wavelet transform of a given profile data interval [begin_input,end_input)

- Resolution = 1: the wavelet transform will be computed at every position of the Profile data,
- Resolution = 2: the wavelet transform will be computed at 2x(number of Profile data positions) positions (the profile data are interpolated to get the intensity for missing positions)

Note
  The InputPeakIterator should point to a Peak1D or a class derived from Peak1D.
  Before starting the transformation you have to call the init function

References OpenMS::Constants::k.

## Member Data Documentation

## ◆ begin_right_padding_

SignedSize begin_right_padding_

## ◆ end_left_padding_

SignedSize end_left_padding_

We often have to pad the transform at the left and right with zeros. Since we don't want to iterate over those as well, we have to store their positions.

## ◆ scale_

double scale_

Spacing and scale of the wavelet and length of the signal.

## ◆ signal_

std::vector<Peak1D> signal_

The transformed signal.

## ◆ signal_length_

SignedSize signal_length_

## ◆ spacing_

double spacing_

## ◆ wavelet_

std::vector<double> wavelet_

The pre-tabulated wavelet used for the transform.