Loading...
Searching...
No Matches
pappso::TraceDetectionMoulon Class Reference

`#include <tracedetectionmoulon.h>`

Inheritance diagram for pappso::TraceDetectionMoulon:

## Public Member Functions

| TraceDetectionMoulon (unsigned int smoothing_half_window_length, pappso_double tic_start, pappso_double tic_stop)
| TraceDetectionMoulon (const TraceDetectionMoulon &other)
virtual | ~TraceDetectionMoulon ()
void | setFilterMorphoMean (const FilterMorphoMean &smooth)
void | setTicStart (double tic_start)
void | setTicStop (double tic_stop)
unsigned int | getSmoothingHalfEdgeWindows () const
pappso_double | getTicStart () const
pappso_double | getTicStop () const
void | detect (const Trace &xic, TraceDetectionSinkInterface &sink, bool remove_peak_base) const override
| detect peaks on a trace

## Private Attributes

FilterMorphoMean | m_xicFilterSmoothing
pappso_double | m_ticStart
pappso_double | m_ticStop

## Detailed Description

Definition at line 34 of file tracedetectionmoulon.h.

## Constructor & Destructor Documentation

## TraceDetectionMoulon() [1/2]

pappso::TraceDetectionMoulon::TraceDetectionMoulon | ( | unsigned int | smoothing_half_window_length,
|  | pappso_double | tic_start,
|  | pappso_double | tic_stop )

Definition at line 28 of file tracedetectionmoulon.cpp.

: m_xicFilterSmoothing(smoothing_half_window_length)
{
m_ticStart = tic_start;
m_ticStop = tic_stop;
}
pappso::TraceDetectionMoulon::m_xicFilterSmoothing
FilterMorphoMean m_xicFilterSmoothing
Definition tracedetectionmoulon.h:58
pappso::TraceDetectionMoulon::m_ticStop
pappso_double m_ticStop
Definition tracedetectionmoulon.h:60
pappso::TraceDetectionMoulon::m_ticStart
pappso_double m_ticStart
Definition tracedetectionmoulon.h:59

References m_ticStart, m_ticStop, and m_xicFilterSmoothing.

Referenced by TraceDetectionMoulon().

## TraceDetectionMoulon() [2/2]

pappso::TraceDetectionMoulon::TraceDetectionMoulon | ( | const TraceDetectionMoulon & | other | ) |

Definition at line 37 of file tracedetectionmoulon.cpp.

: m_xicFilterSmoothing(other.m_xicFilterSmoothing)
{
m_ticStart = other.m_ticStart;
m_ticStop = other.m_ticStop;
}

References TraceDetectionMoulon(), m_ticStart, m_ticStop, and m_xicFilterSmoothing.

## ~TraceDetectionMoulon()

pappso::TraceDetectionMoulon::~TraceDetectionMoulon | ( |  | ) |

virtual

Definition at line 44 of file tracedetectionmoulon.cpp.

{
}

## Member Function Documentation

## detect()

void pappso::TraceDetectionMoulon::detect | ( | const Trace & | trace,
|  | TraceDetectionSinkInterface & | sink,
|  | bool | remove_peak_base ) const

override virtual

detect peaks on a trace

Parameters

  trace | the trace to detect peaks on
  sink | the object to store peaks or stream it
  remove_peak_base | if true, removes the area under the base of the peak

Implements pappso::TraceDetectionInterface.

Definition at line 85 of file tracedetectionmoulon.cpp.

{
Trace xic_smoothed(xic);
m_xicFilterSmoothing.filter(xic_smoothed);
// detect peaks :
bool banked(false);
unsigned int nb_tic_start(0);
std::vector<DataPoint>::const_iterator it_smoothed;
std::vector<DataPoint>::const_iterator it, it_begin;
// TracePeak *p_current_peak = nullptr;
for(it_smoothed = xic_smoothed.begin(), it = xic.begin(); it_smoothed != xic_smoothed.end();
++it_smoothed, ++it)
{
if((nb_tic_start == 0) && (it_begin != xic.end()) && (banked == false))
{
// delete(p_current_peak);
// p_current_peak = nullptr;
it_begin = xic.end();
}
if(it_smoothed->y >= m_ticStart)
{
nb_tic_start++;
if(it_begin == xic.end())
{
// p_current_peak = new TracePeak;
// p_current_peak->setLeftBoundary(*it_smoothed);
it_begin = it;
banked = false;
}
if((nb_tic_start == 2) && (banked == false))
{
banked = true;
}
}
else
{
nb_tic_start = 0;
}
if(it_smoothed->y <= m_ticStop)
{
if(it_begin != xic.end())
{
if(banked)
{
TracePeak peak(it_begin, it + 1, remove_peak_base);
sink.setTracePeak(peak);
}
banked = false;
}
}
}
}

References m_ticStart, m_ticStop, m_xicFilterSmoothing, and pappso::TraceDetectionSinkInterface::setTracePeak().

## getSmoothingHalfEdgeWindows()

unsigned int pappso::TraceDetectionMoulon::getSmoothingHalfEdgeWindows | ( |  | ) | const

Definition at line 67 of file tracedetectionmoulon.cpp.

{
return m_xicFilterSmoothing.getHalfWindowSize();
}

References m_xicFilterSmoothing.

## getTicStart()

pappso_double pappso::TraceDetectionMoulon::getTicStart | ( |  | ) | const

Definition at line 73 of file tracedetectionmoulon.cpp.

{
return m_ticStart;
}

References m_ticStart.

## getTicStop()

pappso_double pappso::TraceDetectionMoulon::getTicStop | ( |  | ) | const

Definition at line 79 of file tracedetectionmoulon.cpp.

{
return m_ticStop;
}

References m_ticStop.

## setFilterMorphoMean()

void pappso::TraceDetectionMoulon::setFilterMorphoMean | ( | const FilterMorphoMean & | smooth | ) |

Definition at line 50 of file tracedetectionmoulon.cpp.

{
m_xicFilterSmoothing = smooth;
}

References m_xicFilterSmoothing.

## setTicStart()

void pappso::TraceDetectionMoulon::setTicStart | ( | double | tic_start | ) |

Definition at line 56 of file tracedetectionmoulon.cpp.

{
m_ticStart = tic_start;
}

References m_ticStart.

## setTicStop()

void pappso::TraceDetectionMoulon::setTicStop | ( | double | tic_stop | ) |

Definition at line 61 of file tracedetectionmoulon.cpp.

{
m_ticStop = tic_stop;
}

References m_ticStop.

## Member Data Documentation

## m_ticStart

pappso_double pappso::TraceDetectionMoulon::m_ticStart

private

Definition at line 59 of file tracedetectionmoulon.h.

Referenced by TraceDetectionMoulon(), TraceDetectionMoulon(), detect(), getTicStart(), and setTicStart().

## m_ticStop

pappso_double pappso::TraceDetectionMoulon::m_ticStop

private

Definition at line 60 of file tracedetectionmoulon.h.

Referenced by TraceDetectionMoulon(), TraceDetectionMoulon(), detect(), getTicStop(), and setTicStop().

## m_xicFilterSmoothing

FilterMorphoMean pappso::TraceDetectionMoulon::m_xicFilterSmoothing

private

Definition at line 58 of file tracedetectionmoulon.h.

Referenced by TraceDetectionMoulon(), TraceDetectionMoulon(), detect(), getSmoothingHalfEdgeWindows(), and setFilterMorphoMean().

The documentation for this class was generated from the following files:

- pappsomspp/core/processing/detection/tracedetectionmoulon.h
- pappsomspp/core/processing/detection/tracedetectionmoulon.cpp