75 template <
typename SpectrumType>
80 std::map<double, int> marks;
81 for (std::vector<PeakMarker *>::const_iterator cvit = markers_.begin(); cvit != markers_.end(); ++cvit)
83 std::map<double, bool> marked;
84 (*cvit)->apply(marked, spectrum);
85 for (std::map<double, bool>::const_iterator cmit = marked.begin(); cmit != marked.end(); ++cmit)
94 for (
Iterator it = spectrum.begin(); it != spectrum.end(); )
96 if (marks[it->getMZ()] > 0)
102 it = spectrum.erase(it);
113 return "MarkerMower";
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:93
In-Memory representation of a mass spectrometry run.
Definition: MSExperiment.h:73
The representation of a 1D spectrum.
Definition: MSSpectrum.h:70
ContainerType::iterator Iterator
Mutable iterator.
Definition: MSSpectrum.h:128
MarkerMower uses PeakMarker to find peaks, those that are not marked get removed.
Definition: MarkerMower.h:56
void insertmarker(PeakMarker *peak_marker)
insert new Marker (violates the DefaultParamHandler interface)
MarkerMower & operator=(const MarkerMower &source)
assignment operator
void filterPeakSpectrum(PeakSpectrum &spectrum)
MarkerMower()
default constructor
void filterPeakMap(PeakMap &exp)
void filterSpectrum(SpectrumType &spectrum)
Definition: MarkerMower.h:76
~MarkerMower() override
destructor
std::vector< PeakMarker * > markers_
used peak markers
Definition: MarkerMower.h:125
MarkerMower(const MarkerMower &source)
copy constructor
static const String getProductName()
Definition: MarkerMower.h:111
PeakMarker marks peaks that seem to fulfill some criterion.
Definition: PeakMarker.h:49
A more convenient string class.
Definition: String.h:60
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47