|
pappsomspp
Library for mass spectrometry
|
Go to the documentation of this file.
29 #include "../../trace/trace.h"
31 #include "../../exception/exceptionoutofrange.h"
36 : m_half_window_size(half_window_size)
41 : m_half_window_size(other.m_half_window_size)
53 qDebug() << __FILE__ <<
" " << __FUNCTION__ <<
" " << __LINE__ <<
" "
57 Trace old_trace(data_points);
58 auto it = old_trace.begin();
60 auto it_target = data_points.begin();
63 std::size_t loop_begin = 0;
88 while(it != old_trace.end())
100 qDebug() << __FILE__ <<
" " << __FUNCTION__ <<
" " << __LINE__;
114 std::vector<DataPoint>::const_iterator begin,
115 std::vector<DataPoint>::const_iterator end)
const
118 qDebug() << __FILE__ <<
" " << __FUNCTION__ <<
" " << __LINE__;
132 std::vector<DataPoint>::const_iterator begin,
133 std::vector<DataPoint>::const_iterator end)
const
158 std::vector<DataPoint>::const_iterator begin,
159 std::vector<DataPoint>::const_iterator end)
const
171 : m_filter_max(half_window_size), m_filter_min(half_window_size)
175 : m_filter_max(other.m_filter_max), m_filter_min(other.m_filter_min)
181 qDebug() << __FILE__ <<
" " << __FUNCTION__ <<
" " << __LINE__;
184 qDebug() << __FILE__ <<
" " << __FUNCTION__ <<
" " << __LINE__;
195 : m_filter_min(half_window_size), m_filter_max(half_window_size)
199 : m_filter_min(other.m_filter_min), m_filter_max(other.m_filter_max)
205 qDebug() << __FILE__ <<
" " << __FUNCTION__ <<
" " << __LINE__;
208 qDebug() << __FILE__ <<
" " << __FUNCTION__ <<
" " << __LINE__;
218 : m_half_window_size(half_window_size)
222 : m_half_window_size(other.m_half_window_size)
236 Trace old_trace(data_points);
237 auto it = old_trace.begin();
238 auto it_target = data_points.begin();
239 auto itw = old_trace.begin();
244 while((it != old_trace.end()) &&
282 std::vector<DataPoint>::const_iterator begin,
283 std::vector<DataPoint>::const_iterator end)
const
305 std::vector<DataPoint>::const_iterator begin,
306 std::vector<DataPoint>::const_iterator end)
const
313 std::size_t median_half_window_size, std::size_t minmax_half_window_size)
314 : m_filter_morpho_median(median_half_window_size),
315 m_filter_morpho_minmax(minmax_half_window_size)
321 : m_filter_morpho_median(other.m_filter_morpho_median),
322 m_filter_morpho_minmax(other.m_filter_morpho_minmax)
FilterMorphoMinMax(std::size_t half_window_size)
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
base class that apply a signal treatment based on a window
FilterMorphoMax m_filter_max
FilterMorphoSum(std::size_t half_window_size)
FilterMorphoAntiSpike(std::size_t half_window_size)
double getWindowValue(std::vector< DataPoint >::const_iterator begin, std::vector< DataPoint >::const_iterator end) const override
FilterMorphoMinMax m_filter_morpho_minmax
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
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
std::size_t getMinHalfEdgeWindows() const
FilterMorphoMin(std::size_t half_window_size)
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_filter_min
FilterMorphoMax(std::size_t half_window_size)
std::size_t getMinMaxHalfEdgeWindows() const
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
FilterMorphoMedian m_filter_morpho_median
transform the trace with the minimum of the maximum equivalent of the dilate filter for pictures
std::size_t m_half_window_size
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
std::size_t m_half_window_size
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
FilterMorphoMax m_filter_max
FilterMorphoMin m_filter_min
std::vector< DataPoint >::const_iterator minYDataPoint(std::vector< DataPoint >::const_iterator begin, std::vector< DataPoint >::const_iterator end)
find the element with the smallest Y value (intensity)
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