35 #ifndef OPENMS_FILTERING_TRANSFORMERS_NORMALIZER_H 36 #define OPENMS_FILTERING_TRANSFORMERS_NORMALIZER_H 86 template <
typename SpectrumType>
89 if (spectrum.empty())
return;
96 if (method_ ==
"to_one")
98 divisor = spectrum.begin()->getIntensity();
99 for (ConstIterator it = spectrum.begin(); it != spectrum.end(); ++it)
101 if (divisor < it->getIntensity()) divisor = it->getIntensity();
104 else if (method_ ==
"to_TIC")
106 for (ConstIterator it = spectrum.begin(); it != spectrum.end(); ++it)
108 divisor += it->getIntensity();
118 for (Iterator it = spectrum.begin(); it != spectrum.end(); ++it)
120 it->setIntensity(it->getIntensity() / divisor);
130 void filterPeakMap(
PeakMap & exp)
const;
132 virtual void updateMembers_();
142 #endif //OPENMS_FILTERING_TRANSFORMERS_NORMALIZER_H
A more convenient string class.
Definition: String.h:57
ContainerType::const_iterator ConstIterator
Non-mutable iterator.
Definition: MSSpectrum.h:104
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
ContainerType::iterator Iterator
Mutable iterator.
Definition: MSSpectrum.h:102
The representation of a 1D spectrum.
Definition: MSSpectrum.h:67
void filterSpectrum(SpectrumType &spectrum) const
Definition: Normalizer.h:87
Invalid value exception.
Definition: Exception.h:336
In-Memory representation of a mass spectrometry experiment.
Definition: MSExperiment.h:82
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:92
Normalizes the peak intensities spectrum-wise.
Definition: Normalizer.h:58
String method_
Definition: Normalizer.h:137