WPOCT Software Developer's Kit (SDK)
SDK For using Wasatch Photonics OCT Spectrometers
Static Public Member Functions | Static Protected Member Functions | Static Protected Attributes | List of all members
Statistics Class Reference

Helper class to perform basic statistics. More...

#include <Statistics.h>

Static Public Member Functions

template<typename T >
static float variance (int start, int offset, const T *in, int len)
 
template<typename T >
static void histogramIt (const T *data_in, int len, int num_bins, T _min, T *&data_out)
 
template<typename T >
static void saveHistogramToFile (const T *out_data, int len)
 
template<typename T >
static void cdfIt (const T *in_data, int len, int num_bins, float _min, T *&cdf_out)
 
template<typename T , typename F >
static void minMaxData (const T *data_out, int width, int height, F &minVal, F &maxVal, int trim=0)
 Determine the max and min values for a matrix (image) and trim the top - this is needed to ignore the over-saturated bar at the top of the image.
 
template<typename T , typename F >
static void minMaxData (std::vector< T > *data_out, int w, int h, F &minVal, F &maxVal, int trim=0)
 Same as above but with data in an array. More...
 
template<typename T >
static void minMaxData (const T *data_in, int len, T &maxVal, T &minVal)
 this is just a standard max-min. More...
 
static void minMaxDataTrim (const unsigned short *data_out, int w, int h, int trim, double &minVal, double &maxVal)
 
static void minMaxDataAvg (const unsigned short *data_out, int w, int h, int trim, double &minVal, double &maxVal)
 
template<typename T , typename F >
static void avgMatrixToLine (const T *in, int startRow, int stopRow, int w, F *&out)
 
static void movingFilterLine (float *&in, int len, int filter)
 
static void movingFilterLine (const float *in, int len, int filter, float *&out)
 
static void gradientLine (float *&in, int len)
 
static void gradientLine (const float *in, int len, float *&out)
 
static void filterVector (std::vector< float > *sumOfVar)
 
template<typename T >
static T localMaxVal (std::vector< T > *in, int &myMaxIndex)
 
template<typename T >
static T localMaxVal (const T *in, int len, int &myMaxIndex)
 This is looking for a local max. More...
 
template<typename T >
static T maxVal (std::vector< T > *in, int &myMaxIndex)
 
static bool isOscilating (float *&in, int len, int posGradLimit)
 

Static Protected Member Functions

static void doInitArrayFire ()
 
static void doSetTrimMaskArray (int trimVal, int w, int h)
 

Static Protected Attributes

static bool isVerbose
 
static bool initArrayFire = false
 

Detailed Description

Helper class to perform basic statistics.

Member Function Documentation

◆ localMaxVal()

template<typename T >
static T Statistics::localMaxVal ( const T *  in,
int  len,
int &  myMaxIndex 
)
inlinestatic

This is looking for a local max.

I believe this is used in finding the max variance for dispersion optimization. When the system is not in focus, the algorithm will fail.

◆ minMaxData() [1/2]

template<typename T >
static void Statistics::minMaxData ( const T *  data_in,
int  len,
T &  maxVal,
T &  minVal 
)
inlinestatic

this is just a standard max-min.

No trim.

◆ minMaxData() [2/2]

template<typename T , typename F >
static void Statistics::minMaxData ( std::vector< T > *  data_out,
int  w,
int  h,
F &  minVal,
F &  maxVal,
int  trim = 0 
)
inlinestatic

Same as above but with data in an array.

just get data from vector and re-use above method.


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