1 | #ifndef CAOSFILTER_H
|
---|
2 | #define CAOSFILTER_H
|
---|
3 |
|
---|
4 | #ifndef __CINT__
|
---|
5 | #include <TROOT.h>
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | typedef unsigned char byte;
|
---|
9 |
|
---|
10 | class Leds;
|
---|
11 |
|
---|
12 | class CaosFilter
|
---|
13 | {
|
---|
14 | static void DrawBox(const int x1, const int y1,
|
---|
15 | const int x2, const int y2,
|
---|
16 | byte *buffer, const int col);
|
---|
17 |
|
---|
18 | static void MarkPoint(const int x, const int y,
|
---|
19 | byte *buffer, const int col);
|
---|
20 |
|
---|
21 | static void GetStat(const byte *buffer, const int offset,
|
---|
22 | double *mean, double *sdev);
|
---|
23 |
|
---|
24 | static int GetMeanPosition(const byte *bitmap,
|
---|
25 | const int x, const int y,
|
---|
26 | const int box);
|
---|
27 |
|
---|
28 | static int GetMeanPosition(const byte *bitmap, const int x, const int y,
|
---|
29 | const int box, Float_t &mx, Float_t &my);
|
---|
30 |
|
---|
31 | static bool CalcCenter(Float_t *px, Float_t *py, Float_t &cx, Float_t &cy, Float_t &R);
|
---|
32 |
|
---|
33 | static void InterpolCenter(int &m, Float_t *x, Float_t *y, Float_t &px, Float_t &py,
|
---|
34 | Float_t &pr, Float_t &sx, Float_t &sy, Float_t &sr);
|
---|
35 |
|
---|
36 | static void CalcRings(int &m, Float_t *x, Float_t *y, Float_t &px, Float_t &py,
|
---|
37 | Float_t &pr, float *v, float *w);
|
---|
38 |
|
---|
39 | static int FilterLeds(float *xw, float *yw, float *xl, float *yl);
|
---|
40 |
|
---|
41 |
|
---|
42 | public:
|
---|
43 | static void Execute(byte *img, float *xw, float *yw, float *xl, float *yl,
|
---|
44 | float &prx, float &pry, float &pr, float *v, float *w);
|
---|
45 |
|
---|
46 | static void Execute(byte *img, Leds &leds, Double_t conv);
|
---|
47 |
|
---|
48 | static void FilterLeds(Leds &leds);
|
---|
49 | static void RemoveTwins(Leds &leds, Double_t radius);
|
---|
50 |
|
---|
51 | ClassDef(CaosFilter, 0)
|
---|
52 | };
|
---|
53 |
|
---|
54 | #endif
|
---|