29 unsigned int smoothing_half_window_length,
32 : m_xicFilterSmoothing(smoothing_half_window_length)
34 m_ticStart = tic_start;
38 TraceDetectionMoulon::TraceDetectionMoulon(
const TraceDetectionMoulon &other)
39 : m_xicFilterSmoothing(other.m_xicFilterSmoothing)
41 m_ticStart = other.m_ticStart;
42 m_ticStop = other.m_ticStop;
45 TraceDetectionMoulon::~TraceDetectionMoulon()
53 m_xicFilterSmoothing = smooth;
57 TraceDetectionMoulon::setTicStart(
double tic_start)
59 m_ticStart = tic_start;
62 TraceDetectionMoulon::setTicStop(
double tic_stop)
68 TraceDetectionMoulon::getSmoothingHalfEdgeWindows()
const
74 TraceDetectionMoulon::getTicStart()
const
80 TraceDetectionMoulon::getTicStop()
const
86 TraceDetectionMoulon::detect(
const Trace &xic,
90 Trace xic_smoothed(xic);
92 m_xicFilterSmoothing.filter(xic_smoothed);
96 unsigned int nb_tic_start(0);
98 std::vector<DataPoint>::const_iterator it_smoothed;
99 std::vector<DataPoint>::const_iterator it, it_begin;
103 for(it_smoothed = xic_smoothed.begin(), it = xic.begin();
104 it_smoothed != xic_smoothed.end();
108 if((nb_tic_start == 0) && (it_begin != xic.end()) && (banked ==
false))
112 it_begin = xic.end();
115 if(it_smoothed->y >= m_ticStart)
118 if(it_begin == xic.end())
125 if((nb_tic_start == 2) && (banked ==
false))
134 if(it_smoothed->y <= m_ticStop)
136 if(it_begin != xic.end())