libpappsomspp
Library for mass spectrometry
Toggle main menu visibility
Loading...
Searching...
No Matches
filterceilingamplitudepercentage.h
Go to the documentation of this file.
1
/* BEGIN software license
2
*
3
* msXpertSuite - mass spectrometry software suite
4
* -----------------------------------------------
5
* Copyright(C) 2009,...,2021 Filippo Rusconi
6
*
7
* http://www.msxpertsuite.org
8
*
9
* This file is part of the msXpertSuite project.
10
*
11
* The msXpertSuite project is the successor of the massXpert project. This
12
* project now includes various independent modules:
13
*
14
* - massXpert, model polymer chemistries and simulate mass spectrometric data;
15
* - mineXpert, a powerful TIC chromatogram/mass spectrum viewer/miner;
16
*
17
* This program is free software: you can redistribute it and/or modify
18
* it under the terms of the GNU General Public License as published by
19
* the Free Software Foundation, either version 3 of the License, or
20
* (at your option) any later version.
21
*
22
* This program is distributed in the hope that it will be useful,
23
* but WITHOUT ANY WARRANTY; without even the implied warranty of
24
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25
* GNU General Public License for more details.
26
*
27
* You should have received a copy of the GNU General Public License
28
* along with this program. If not, see <http://www.gnu.org/licenses/>.
29
*
30
* END software license
31
*/
32
33
34
#pragma once
35
36
37
#include <QObject>
38
39
#include "
../../trace/trace.h
"
40
#include "
pappsomspp/export-import-config.h
"
41
#include "
filternameinterface.h
"
42
43
44
namespace
pappso
45
{
46
47
48
class
FilterCeilingAmplitudePercentage
;
49
50
typedef
std::shared_ptr<FilterCeilingAmplitudePercentage>
51
FilterCeilingAmplitudePercentageSPtr
;
52
typedef
std::shared_ptr<const FilterCeilingAmplitudePercentage>
53
FilterCeilingAmplitudePercentageCstSPtr
;
54
55
56
/**
57
* @brief Redefines the ceiling intensity of the Trace
58
*
59
* The amplitude of the trace is computed (maxValue - minValue)
60
* Its fraction is calculated = amplitude * (percentage / 100)
61
* The threshold value is computed as (minValue + fraction)
62
*
63
* When the values to be filtered are above that threshold they acquire that
64
* threshold value.
65
*
66
* When the values to be filtered are below that threshold they remain
67
* unchanged.
68
*
69
* This effectively re-ceilings the values to threshold.
70
*/
71
class
PMSPP_LIB_DECL
FilterCeilingAmplitudePercentage
72
:
public
FilterNameInterface
73
{
74
public
:
75
FilterCeilingAmplitudePercentage
(
double
percentage);
76
FilterCeilingAmplitudePercentage
(
const
QString ¶meters);
77
FilterCeilingAmplitudePercentage
(
78
const
FilterCeilingAmplitudePercentage
&other);
79
80
virtual
~FilterCeilingAmplitudePercentage
();
81
82
FilterCeilingAmplitudePercentage
&
83
operator=
(
const
FilterCeilingAmplitudePercentage
&other);
84
85
Trace
&
filter
(
Trace
&data_points)
const override
;
86
87
double
getPercentage
()
const
;
88
QString
name
()
const override
;
89
90
QString
toString
()
const override
;
91
92
protected
:
93
void
buildFilterFromString
(
const
QString &strBuildParams)
override
;
94
95
private
:
96
double
m_percentage
;
97
};
98
}
// namespace pappso
pappso::FilterCeilingAmplitudePercentage
Redefines the ceiling intensity of the Trace.
Definition
filterceilingamplitudepercentage.h:73
pappso::FilterCeilingAmplitudePercentage::filter
Trace & filter(Trace &data_points) const override
Definition
filterceilingamplitudepercentage.cpp:104
pappso::FilterCeilingAmplitudePercentage::FilterCeilingAmplitudePercentage
FilterCeilingAmplitudePercentage(double percentage)
Definition
filterceilingamplitudepercentage.cpp:49
pappso::FilterCeilingAmplitudePercentage::operator=
FilterCeilingAmplitudePercentage & operator=(const FilterCeilingAmplitudePercentage &other)
Definition
filterceilingamplitudepercentage.cpp:67
pappso::FilterCeilingAmplitudePercentage::getPercentage
double getPercentage() const
Definition
filterceilingamplitudepercentage.cpp:139
pappso::FilterCeilingAmplitudePercentage::buildFilterFromString
void buildFilterFromString(const QString &strBuildParams) override
build this filter using a string
Definition
filterceilingamplitudepercentage.cpp:85
pappso::FilterCeilingAmplitudePercentage::toString
QString toString() const override
Return a string with the textual representation of the configuration data.
Definition
filterceilingamplitudepercentage.cpp:147
pappso::FilterCeilingAmplitudePercentage::m_percentage
double m_percentage
Definition
filterceilingamplitudepercentage.h:96
pappso::FilterCeilingAmplitudePercentage::name
QString name() const override
Definition
filterceilingamplitudepercentage.cpp:154
pappso::FilterNameInterface
Interface that allows to build filter objects from strings.
Definition
filternameinterface.h:42
pappso::Trace
A simple container of DataPoint instances.
Definition
trace.h:152
export-import-config.h
PMSPP_LIB_DECL
#define PMSPP_LIB_DECL
Definition
export-import-config.h:14
filternameinterface.h
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition
aa.cpp:39
pappso::FilterCeilingAmplitudePercentageCstSPtr
std::shared_ptr< const FilterCeilingAmplitudePercentage > FilterCeilingAmplitudePercentageCstSPtr
Definition
filterceilingamplitudepercentage.h:53
pappso::FilterCeilingAmplitudePercentageSPtr
std::shared_ptr< FilterCeilingAmplitudePercentage > FilterCeilingAmplitudePercentageSPtr
Definition
filterceilingamplitudepercentage.h:51
trace.h
pappsomspp
core
processing
filters
filterceilingamplitudepercentage.h
Generated on
for libpappsomspp by
1.17.0