Subversion Repositories f9daq

Rev

Rev 195 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. /********************************************************************\
  2.  
  3.   Name:         averager.h
  4.   Created by:   Stefan Ritt
  5.  
  6.   Contents:     Robust averager
  7.  
  8.   $Id: averager.h 21220 2013-12-20 13:47:43Z ritt $
  9.  
  10. \********************************************************************/
  11.  
  12. class Averager {
  13.    int fNx, fNy, fNz, fDim;
  14.    float *fArray;
  15.    unsigned short *fN;
  16.    
  17. public:
  18.    Averager(int nx, int ny, int nz, int dim);
  19.    ~Averager();
  20.    
  21.    void Add(int x, int y, int z, float value);
  22.    void Reset();
  23.    double Average(int x, int y, int z);
  24.    double Median(int x, int y, int z);
  25.    double RobustAverage(double range, int x, int y, int z);
  26.    int SaveNormalizedDistribution(const char *filename, int x, float range);
  27.  
  28. };
  29.