ProteoWizard
LocalMaximumPeakDetector.hpp
Go to the documentation of this file.
1 //
2 // $Id: LocalMaximumPeakDetector.hpp 1191 2009-08-14 19:33:05Z chambm $
3 //
4 //
5 // Original author: Matt Chambers <matt.chambers <a.t> vanderbilt.edu>
6 //
7 // Copyright 2008 Vanderbilt University - Nashville, TN 37232
8 //
9 // Licensed under the Apache License, Version 2.0 (the "License");
10 // you may not use this file except in compliance with the License.
11 // You may obtain a copy of the License at
12 //
13 // http://www.apache.org/licenses/LICENSE-2.0
14 //
15 // Unless required by applicable law or agreed to in writing, software
16 // distributed under the License is distributed on an "AS IS" BASIS,
17 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 // See the License for the specific language governing permissions and
19 // limitations under the License.
20 //
21 
22 
23 #ifndef _SIMPLEPEAKDETECTOR_HPP_
24 #define _SIMPLEPEAKDETECTOR_HPP_
25 
26 
27 #include "PeakDetector.hpp"
28 namespace pwiz {
29 namespace analysis {
30 
31 
33 {
34  LocalMaximumPeakDetector(size_t windowSize);
35 
36  /// finds all local maxima, i.e. any point that has a greater y value than both
37  /// of its neighboring points;
38  /// note: the peaks array, if non-NULL, only provides x and y values
39  virtual void detect(const std::vector<double>& x, const std::vector<double>& y,
40  std::vector<double>& xPeakValues, std::vector<double>& yPeakValues,
41  std::vector<Peak>* peaks = NULL);
42 
43  private:
44  size_t window_;
45 };
46 
47 
48 } // namespace analysis
49 } // namespace pwiz
50 
51 
52 #endif // _SIMPLEPEAKDETECTOR_HPP_