SoDaRadio-5.0.3-master:8901fb5
Public Member Functions | Private Member Functions | Private Attributes | List of all members
SoDa::MedianFilter3< T > Class Template Reference

3 point Median Filter class – templatized (!) More...

#include <MedianFilter.hxx>

Public Member Functions

 MedianFilter3 ()
 constructor no parameters More...
 
unsigned int apply (T *inbuf, T *outbuf, unsigned int len, float outgain=1.0)
 Apply the 3 sample median filter to an input vector. More...
 

Private Member Functions

findMedian (T v)
 find the median of the supplied value vs. More...
 

Private Attributes

a
 storage for the value-before-last More...
 
b
 storage for the previous value More...
 

Detailed Description

template<typename T>
class SoDa::MedianFilter3< T >

3 point Median Filter class – templatized (!)

Definition at line 49 of file MedianFilter.hxx.

Constructor & Destructor Documentation

◆ MedianFilter3()

template<typename T>
SoDa::MedianFilter3< T >::MedianFilter3 ( )
inline

constructor no parameters

Definition at line 55 of file MedianFilter.hxx.

Member Function Documentation

◆ apply()

template<typename T>
unsigned int SoDa::MedianFilter3< T >::apply ( T *  inbuf,
T *  outbuf,
unsigned int  len,
float  outgain = 1.0 
)
inline

Apply the 3 sample median filter to an input vector.

Parameters
inbufthe input buffer
outbufthe output buffer – the two buffers may overlap, though inbuf must be <= outbuf
lenthe length of the input and output buffers
outgainboost the output, if necessary

Definition at line 68 of file MedianFilter.hxx.

◆ findMedian()

template<typename T>
T SoDa::MedianFilter3< T >::findMedian ( v)
inlineprivate

find the median of the supplied value vs.

the previous two supplied values

Parameters
vthe "new" value in the sequence
Returns
the median value of the last 3 values in a sequence

Definition at line 84 of file MedianFilter.hxx.

Referenced by SoDa::MedianFilter3< float >::apply().

Member Data Documentation

◆ a

template<typename T>
T SoDa::MedianFilter3< T >::a
private

storage for the value-before-last

Definition at line 100 of file MedianFilter.hxx.

Referenced by SoDa::MedianFilter3< float >::findMedian(), and SoDa::MedianFilter3< float >::MedianFilter3().

◆ b

template<typename T>
T SoDa::MedianFilter3< T >::b
private

storage for the previous value

Definition at line 101 of file MedianFilter.hxx.

Referenced by SoDa::MedianFilter3< float >::findMedian(), and SoDa::MedianFilter3< float >::MedianFilter3().


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