libpappsomspp
Library for mass spectrometry
|
Go to the documentation of this file.
29 #include "../../trace/trace.h"
31 #include "../../exception/exceptionoutofrange.h"
36 : m_halfWindowSize(half_window_size)
41 : m_halfWindowSize(other.m_halfWindowSize)
63 qDebug() << __FILE__ <<
" " << __FUNCTION__ <<
" " << __LINE__ <<
" "
67 Trace old_trace(data_points);
68 auto it = old_trace.begin();
70 auto it_target = data_points.begin();
73 std::size_t loop_begin = 0;
98 while(it != old_trace.end())
110 qDebug() << __FILE__ <<
" " << __FUNCTION__ <<
" " << __LINE__;
133 std::vector<DataPoint>::const_iterator begin,
134 std::vector<DataPoint>::const_iterator end)
const
137 qDebug() << __FILE__ <<
" " << __FUNCTION__ <<
" " << __LINE__;
160 std::vector<DataPoint>::const_iterator begin,
161 std::vector<DataPoint>::const_iterator end)
const
193 std::vector<DataPoint>::const_iterator begin,
194 std::vector<DataPoint>::const_iterator end)
const
206 : m_filterMax(half_window_size), m_filterMin(half_window_size)
210 : m_filterMax(other.m_filterMax), m_filterMin(other.m_filterMin)
226 qDebug() << __FILE__ <<
" " << __FUNCTION__ <<
" " << __LINE__;
229 qDebug() << __FILE__ <<
" " << __FUNCTION__ <<
" " << __LINE__;
240 : m_filterMin(half_window_size), m_filterMax(half_window_size)
244 : m_filterMin(other.m_filterMin), m_filterMax(other.m_filterMax)
260 qDebug() << __FILE__ <<
" " << __FUNCTION__ <<
" " << __LINE__;
263 qDebug() << __FILE__ <<
" " << __FUNCTION__ <<
" " << __LINE__;
273 : m_halfWindowSize(half_window_size)
277 : m_halfWindowSize(other.m_halfWindowSize)
299 Trace old_trace(data_points);
300 auto it = old_trace.begin();
301 auto it_target = data_points.begin();
302 auto itw = old_trace.begin();
307 while((it != old_trace.end()) &&
354 std::vector<DataPoint>::const_iterator begin,
355 std::vector<DataPoint>::const_iterator end)
const
386 std::vector<DataPoint>::const_iterator begin,
387 std::vector<DataPoint>::const_iterator end)
const
394 std::size_t median_half_window_size, std::size_t minmax_half_window_size)
395 : m_filterMorphoMedian(median_half_window_size),
396 m_filterMorphoMinMax(minmax_half_window_size)
402 : m_filterMorphoMedian(other.m_filterMorphoMedian),
403 m_filterMorphoMinMax(other.m_filterMorphoMinMax)
FilterMorphoMinMax(std::size_t half_window_size)
FilterMorphoMax m_filterMax
FilterMorphoWindowBase(std::size_t half_window_size)
FilterMorphoMean(std::size_t half_window_size)
double getWindowValue(std::vector< DataPoint >::const_iterator begin, std::vector< DataPoint >::const_iterator end) const override
virtual double getWindowValue(std::vector< DataPoint >::const_iterator begin, std::vector< DataPoint >::const_iterator end) const =0
FilterMorphoMaxMin(std::size_t half_window_size)
Trace & filter(Trace &data_points) const override
FilterMorphoMin & operator=(const FilterMorphoMin &other)
FilterMorphoMax & operator=(const FilterMorphoMax &other)
FilterMorphoMaxMin & operator=(const FilterMorphoMaxMin &other)
base class that apply a signal treatment based on a window
FilterMorphoSum(std::size_t half_window_size)
FilterMorphoMedian m_filterMorphoMedian
FilterMorphoAntiSpike(std::size_t half_window_size)
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
FilterMorphoSum & operator=(const FilterMorphoSum &other)
double getWindowValue(std::vector< DataPoint >::const_iterator begin, std::vector< DataPoint >::const_iterator end) const override
FilterMorphoBackground & operator=(const FilterMorphoBackground &other)
virtual Trace & filter(Trace &data_points) const override
transform the trace into its minimum over a window
transform the trace into its maximum over a window
double getWindowValue(std::vector< DataPoint >::const_iterator begin, std::vector< DataPoint >::const_iterator end) const override
std::size_t getHalfWindowSize() const
double getWindowValue(std::vector< DataPoint >::const_iterator begin, std::vector< DataPoint >::const_iterator end) const override
FilterMorphoMax m_filterMax
FilterMorphoMinMax & operator=(const FilterMorphoMinMax &other)
Trace & filter(Trace &data_points) const override
A simple container of DataPoint instances.
double sumYTrace(std::vector< DataPoint >::const_iterator begin, std::vector< DataPoint >::const_iterator end, double init)
calculate the sum of y value of a trace
virtual std::size_t getHalfWindowSize() const
std::size_t getMaxHalfEdgeWindows() const
FilterMorphoMinMax m_filterMorphoMinMax
std::size_t getMinHalfEdgeWindows() const
FilterMorphoMin(std::size_t half_window_size)
std::size_t m_halfWindowSize
std::vector< DataPoint >::const_iterator maxYDataPoint(std::vector< DataPoint >::const_iterator begin, std::vector< DataPoint >::const_iterator end)
Trace & filter(Trace &data_points) const override
FilterMorphoMin m_filterMin
FilterMorphoMean & operator=(const FilterMorphoMean &other)
FilterMorphoMax(std::size_t half_window_size)
std::size_t getMinMaxHalfEdgeWindows() const
std::size_t m_halfWindowSize
mean filter apply mean of y values inside the window : this results in a kind of smoothing
std::vector< DataPoint >::iterator findDifferentYvalue(std::vector< DataPoint >::iterator begin, std::vector< DataPoint >::iterator end, const double &y_value)
find the first element in which Y is different of value
transform the trace with the minimum of the maximum equivalent of the dilate filter for pictures
FilterMorphoBackground(std::size_t median_half_window_size, std::size_t minmax_half_window_size)
std::size_t getMaxMinHalfEdgeWindows() const
Trace & filter(Trace &data_points) const override
FilterMorphoWindowBase & operator=(const FilterMorphoWindowBase &other)
double medianYTrace(std::vector< DataPoint >::const_iterator begin, std::vector< DataPoint >::const_iterator end)
calculate the median of y value of a trace
const FilterMorphoMedian & getFilterMorphoMedian() const
double meanYTrace(std::vector< DataPoint >::const_iterator begin, std::vector< DataPoint >::const_iterator end)
calculate the mean of y value of a trace
std::size_t getMeanHalfEdgeWindows() const
std::vector< DataPoint >::const_iterator minYDataPoint(std::vector< DataPoint >::const_iterator begin, std::vector< DataPoint >::const_iterator end)
FilterMorphoAntiSpike & operator=(const FilterMorphoAntiSpike &other)
transform the trace with the maximum of the minimum equivalent of the erode filter for pictures
compute background of a trace compute background noise on a trace
const FilterMorphoMinMax & getFilterMorphoMinMax() const
anti spike filter set to zero alone values inside the window
FilterMorphoMin m_filterMin