ProteoWizard
pwiz
analysis
peakdetect
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
27
#include "
pwiz/utility/misc/Export.hpp
"
28
#include "
pwiz/utility/math/OrderedPair.hpp
"
29
#include "
pwiz/data/misc/PeakData.hpp
"
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
///
40
class
PWIZ_API_DECL
PeakFitter
41
{
42
public
:
43
44
typedef
pwiz::data::peakdata::Peak
Peak
;
45
46
virtual
void
fitPeak(
const
math::OrderedPairContainerRef
& pairs,
47
size_t
index,
48
Peak
& result)
const
= 0;
49
50
void
fitPeaks(
const
math::OrderedPairContainerRef
& pairs,
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
///
61
class
PWIZ_API_DECL
PeakFitter_Parabola
:
public
PeakFitter
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
:
81
Config
config_
;
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:83
pwiz::data::peakdata::Peak
Definition:
PeakData.hpp:52
pwiz::analysis::PeakFitter_Parabola::Config
Definition:
PeakFitter.hpp:65
pwiz
Definition:
ChromatogramList_Filter.hpp:36
PWIZ_API_DECL
#define PWIZ_API_DECL
Definition:
Export.hpp:32
Export.hpp
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:40
pwiz::analysis::Peak
represents some generic metadata about a peak detected in a signal
Definition:
PeakDetector.hpp:37
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:61
pwiz::analysis::PeakFitter::Peak
pwiz::data::peakdata::Peak Peak
Definition:
PeakFitter.hpp:44
Generated by
1.8.17