libpappsomspp
Library for mass spectrometry
tracepeak.h
Go to the documentation of this file.
1
/*******************************************************************************
2
* Copyright (c) 2015 Olivier Langella <Olivier.Langella@moulon.inra.fr>.
3
*
4
* This file is part of the PAPPSOms++ library.
5
*
6
* PAPPSOms++ is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation, either version 3 of the License, or
9
* (at your option) any later version.
10
*
11
* PAPPSOms++ is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with PAPPSOms++. If not, see <http://www.gnu.org/licenses/>.
18
*
19
* Contributors:
20
* Olivier Langella <Olivier.Langella@moulon.inra.fr> - initial API and
21
*implementation
22
******************************************************************************/
23
24
#pragma once
25
26
27
#include "../../exportinmportconfig.h"
28
#include "../../trace/trace.h"
29
#include "../../types.h"
30
31
namespace
pappso
32
{
33
34
class
TracePeak;
35
typedef
std::shared_ptr<const TracePeak>
TracePeakCstSPtr
;
36
37
/** @/brief Xic Peak stores peak boudaries detected from a Xic
38
* */
39
class
PMSPP_LIB_DECL
TracePeak
40
{
41
protected
:
42
pappso_double
m_area = 0;
43
DataPoint m_max;
44
DataPoint m_left;
45
DataPoint m_right;
46
47
public
:
48
TracePeak();
49
/** @brief construct a peak given a trace, begin and end x coordinate
50
*/
51
TracePeak(std::vector<DataPoint>::const_iterator it_begin,
52
std::vector<DataPoint>::const_iterator it_end);
53
TracePeak(
const
TracePeak &other);
54
~TracePeak();
55
56
57
TracePeakCstSPtr
makeTracePeakCstSPtr()
const
;
58
59
DataPoint
&getMaxXicElement();
60
const
DataPoint
&
61
getMaxXicElement()
const
62
{
63
return
m_max;
64
};
65
void
setMaxXicElement(
const
DataPoint
&max);
66
67
DataPoint
&getLeftBoundary();
68
const
DataPoint
&
69
getLeftBoundary()
const
70
{
71
return
m_left;
72
};
73
void
setLeftBoundary(
const
DataPoint
&left);
74
75
DataPoint
&getRightBoundary();
76
const
DataPoint
&getRightBoundary()
const
;
77
void
setRightBoundary(
const
DataPoint
&right);
78
pappso_double
getArea()
const
;
79
void
setArea(
pappso_double
area);
80
81
bool
containsRt(
pappso::pappso_double
rt)
const
;
82
83
84
bool
85
operator==
(
const
TracePeak
&other)
const
86
{
87
return
((m_area == other.
m_area
) && (m_max == other.
m_max
) &&
88
(m_left == other.
m_left
) && (m_right == other.
m_right
));
89
};
90
};
91
92
93
}
// namespace pappso
pappso::TracePeakCstSPtr
std::shared_ptr< const TracePeak > TracePeakCstSPtr
Definition:
tracepeak.h:55
pappso::pappso_double
double pappso_double
A type definition for doubles.
Definition:
types.h:69
PMSPP_LIB_DECL
#define PMSPP_LIB_DECL
Definition:
exportinmportconfig.h:14
pappso
Definition:
aa.cpp:38
pappso::operator==
bool operator==(Aa const &l, Aa const &r)
Definition:
aa.cpp:300
pappso::DataPoint
Definition:
datapoint.h:20
pappso::TracePeak::m_area
pappso_double m_area
Definition:
tracepeak.h:63
pappso::TracePeak
Definition:
tracepeak.h:60
pappso::TracePeak::m_right
DataPoint m_right
Definition:
tracepeak.h:66
pappso::TracePeak::m_left
DataPoint m_left
Definition:
tracepeak.h:65
pappso::TracePeak::m_max
DataPoint m_max
Definition:
tracepeak.h:64
pappsomspp
processing
detection
tracepeak.h
Generated on Thu Jul 9 2020 07:26:14 for libpappsomspp by
1.8.17