ProteoWizard
PeakDetector.hpp
Go to the documentation of this file.
1//
2// $Id$
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 _PEAKDETECTOR_HPP_
24#define _PEAKDETECTOR_HPP_
25
26
28#include "boost/shared_ptr.hpp"
29#include <vector>
30
31
32namespace pwiz {
33namespace analysis {
34
35
36/// represents some generic metadata about a peak detected in a signal
38{
39 double x; /// x value of a signal peak (or centroid)
40 double y; /// y value of a signal peak (or centroid), aka intensity/abundance/amplitude
41 double start; // x value where the peak's profile starts
42 double stop; // x value where the peak's profile stops
43 double area; // area under the profile between start and stop
44};
45
46
48{
49 /// find peaks in the signal profile described by the x and y vectors
50 virtual void detect(const std::vector<double>& x, const std::vector<double>& y,
51 std::vector<double>& xPeakValues, std::vector<double>& yPeakValues,
52 std::vector<Peak>* peaks = NULL) = 0;
53
54 virtual ~PeakDetector() {}
55};
56
57typedef boost::shared_ptr<PeakDetector> PeakDetectorPtr;
58
59
60} // namespace analysis
61} // namespace pwiz
62
63
64#endif // _PEAKDETECTOR_HPP_
#define PWIZ_API_DECL
Definition Export.hpp:32
KernelTraitsBase< Kernel >::space_type::abscissa_type x
KernelTraitsBase< Kernel >::space_type::ordinate_type y
boost::shared_ptr< PeakDetector > PeakDetectorPtr
virtual void detect(const std::vector< double > &x, const std::vector< double > &y, std::vector< double > &xPeakValues, std::vector< double > &yPeakValues, std::vector< Peak > *peaks=NULL)=0
find peaks in the signal profile described by the x and y vectors
represents some generic metadata about a peak detected in a signal
double start
y value of a signal peak (or centroid), aka intensity/abundance/amplitude
double y
x value of a signal peak (or centroid)