ProteoWizard
PeakFitter.hpp
Go to the documentation of this file.
1 //
2 // $Id$
3 //
4 //
5 // Original author: Darren Kessner <darren@proteowizard.org>
6 //
7 // Copyright 2009 Center for Applied Molecular Medicine
8 // University of Southern California, Los Angeles, CA
9 //
10 // Licensed under the Apache License, Version 2.0 (the "License");
11 // you may not use this file except in compliance with the License.
12 // You may obtain a copy of the License at
13 //
14 // http://www.apache.org/licenses/LICENSE-2.0
15 //
16 // Unless required by applicable law or agreed to in writing, software
17 // distributed under the License is distributed on an "AS IS" BASIS,
18 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 // See the License for the specific language governing permissions and
20 // limitations under the License.
21 //
22 
23 #ifndef _PEAKFITTER_HPP_
24 #define _PEAKFITTER_HPP_
25 
26 
30 #include <vector>
31 
32 
33 namespace pwiz {
34 namespace analysis {
35 
36 
37 ///
38 /// interface for fitting peaks in an array of ordered pairs
39 ///
41 {
42  public:
43 
45 
46  virtual void fitPeak(const math::OrderedPairContainerRef& pairs,
47  size_t index,
48  Peak& result) const = 0;
49 
51  std::vector<size_t>& indices,
52  std::vector<Peak>& result) const;
53 
54  virtual ~PeakFitter(){}
55 };
56 
57 
58 ///
59 /// PeakFitter implementation based on fitting a parabola
60 ///
62 {
63  public:
64 
65  struct Config
66  {
67  size_t windowRadius;
68 
69  Config(size_t _windowRadius = 1)
70  : windowRadius(_windowRadius)
71  {}
72  };
73 
74  PeakFitter_Parabola(const Config& config = Config());
75 
76  virtual void fitPeak(const math::OrderedPairContainerRef& pairs,
77  size_t index,
78  Peak& result) const;
79 
80  private:
82 };
83 
84 
85 } // namespace analysis
86 } // namespace pwiz
87 
88 
89 #endif // _PEAKFITTER_HPP_
90 
pwiz::analysis::PeakFitter_Parabola::Config::Config
Config(size_t _windowRadius=1)
Definition: PeakFitter.hpp:69
pwiz::math::OrderedPairContainerRef
wrapper class for accessing contiguous data as a container of OrderedPairs; note that it does not own...
Definition: OrderedPair.hpp:84
pwiz::data::peakdata::Peak
Definition: PeakData.hpp:53
pwiz::analysis::PeakFitter_Parabola::Config
Definition: PeakFitter.hpp:66
pwiz
Definition: ChromatogramList_Filter.hpp:36
PWIZ_API_DECL
#define PWIZ_API_DECL
Definition: Export.hpp:32
pwiz::analysis::PeakFitter::fitPeak
virtual void fitPeak(const math::OrderedPairContainerRef &pairs, size_t index, Peak &result) const =0
Export.hpp
pwiz::analysis::PeakFitter::fitPeaks
void fitPeaks(const math::OrderedPairContainerRef &pairs, std::vector< size_t > &indices, std::vector< Peak > &result) const
OrderedPair.hpp
PeakData.hpp
pwiz::analysis::PeakFitter::~PeakFitter
virtual ~PeakFitter()
Definition: PeakFitter.hpp:54
pwiz::analysis::PeakFitter_Parabola::Config::windowRadius
size_t windowRadius
Definition: PeakFitter.hpp:67
pwiz::analysis::PeakFitter
interface for fitting peaks in an array of ordered pairs
Definition: PeakFitter.hpp:41
pwiz::analysis::PeakFitter_Parabola::PeakFitter_Parabola
PeakFitter_Parabola(const Config &config=Config())
pwiz::analysis::PeakFitter_Parabola::fitPeak
virtual void fitPeak(const math::OrderedPairContainerRef &pairs, size_t index, Peak &result) const
pwiz::analysis::PeakFitter_Parabola::config_
Config config_
Definition: PeakFitter.hpp:81
pwiz::analysis::PeakFitter_Parabola
PeakFitter implementation based on fitting a parabola.
Definition: PeakFitter.hpp:62
pwiz::analysis::PeakFitter::Peak
pwiz::data::peakdata::Peak Peak
Definition: PeakFitter.hpp:44