Changeset 18621 for trunk/FACT++/drive/FilterLed.h
- Timestamp:
- 09/18/16 14:46:35 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/drive/FilterLed.h
r18618 r18621 2 2 #define CAOS_FilterLed 3 3 4 #ifndef __CINT__ 5 #include <TROOT.h> 6 #endif 7 8 typedef unsigned char byte; 4 #include <stdint.h> 5 #include <vector> 9 6 10 7 class Led; 11 class Leds;12 8 class Ring; 13 9 14 10 class FilterLed 15 11 { 16 byte*fImg;12 uint8_t *fImg; 17 13 int fW; 18 14 int fH; … … 21 17 float fCut; 22 18 23 Float_t FindCluster(int &cnt, float *sum, UInt_t x, UInt_t y,24 UInt_t x0, UInt_t y0, UInt_t x1, UInt_t y1) const;19 float FindCluster(int &cnt, float *sum, uint32_t x, uint32_t y, 20 uint32_t x0, uint32_t y0, uint32_t x1, uint32_t y1) const; 25 21 26 void GetMinMax(const int offset, byte *min, byte*max) const;22 void GetMinMax(const int offset, uint8_t *min, uint8_t *max) const; 27 23 int GetMeanPosition(const int x, const int y, const int boxx, const int boxy) const; 28 24 int GetMeanPosition(const int x, const int y, const int boxx, const int boxy, … … 40 36 41 37 public: 42 FilterLed( byte *img, int w, int h, double cut=2.5)43 : fImg(img),fW(w), fH(h), fBoxX(w), fBoxY(h), fCut(cut)38 FilterLed(uint8_t *img, int w, int h, double cut=2.5) : fImg(img), 39 fW(w), fH(h), fBoxX(w), fBoxY(h), fCut(cut) 44 40 { 45 41 } 46 42 47 FilterLed( byte *img, int w, int h, int boxx, int boxy, double cut=2.5)48 : fImg(img),fW(w), fH(h), fBoxX(boxx), fBoxY(boxy), fCut(cut)43 FilterLed(uint8_t *img, int w, int h, int boxx, int boxy, double cut=2.5) : fImg(img), 44 fW(w), fH(h), fBoxX(boxx), fBoxY(boxy), fCut(cut) 49 45 { 50 46 } … … 53 49 void SetBox(int box) { fBoxX = fBoxY = box; } 54 50 void SetBox(int boxx, int boxy) { fBoxX = boxx; fBoxY = boxy; } 55 void SetCut(float cut) { fCut = cut; } 56 void FindStar(Leds &leds, int xc, int yc, bool circle=false) const; 57 58 void Execute(Leds &leds, int xc, int yc, double &bright) const; 59 void Execute(Leds &leds, int xc, int yc) const; 60 void Execute(Leds &leds) const { Execute(leds, fW/2, fH/2); } 61 void ExecuteAndMark(Leds &leds, int xc, int yc) const; 62 void ExecuteAndMark(Leds &leds, int xc, int yc, double &bright) const; 63 void ExecuteAndMark(Leds &leds) const { ExecuteAndMark(leds, fW/2, fH/2); } 64 void Execute(int xc, int yc) const; 65 void Execute() const { Execute(fW/2, fH/2); } 51 void SetCut(float cut) { fCut = cut; } 52 void FindStar(std::vector<Led> &leds, int xc, int yc, bool circle=false) const; 53 54 void Execute(std::vector<Led> &leds, int xc, int yc, double &bright) const; 55 void Execute(std::vector<Led> &leds, int xc, int yc) const; 56 void Execute(std::vector<Led> &leds) const { Execute(leds, fW/2, fH/2); } 57 66 58 void MarkPoint(const Led &led) const; 67 void MarkPoint( Float_t x, Float_t y, Float_t mag) const;59 void MarkPoint(float x, float y, float mag) const; 68 60 void Stretch() const; 69 void DrawCircle(float cx, float cy, float r, byte col=0x40) const;70 void DrawCircle(float r, byte col=0x40) const { DrawCircle(fW/2, fH/2, r, col); }71 void DrawCircle(const Ring &c, byte col=0x40) const;72 void DrawCircle(const Ring &c, double r, byte col) const;73 void DrawHexagon(float cx, float cy, float r, byte col=0x40) const;74 void DrawHexagon(const Ring &c, double r, byte col) const;75 61 76 ClassDef(FilterLed, 0) 62 void DrawCircle(float cx, float cy, float r, uint8_t col=0x40) const; 63 void DrawCircle(float r, uint8_t col=0x40) const { DrawCircle(fW/2, fH/2, r, col); } 64 void DrawCircle(const Ring &c, uint8_t col=0x40) const; 65 void DrawCircle(const Ring &c, double r, uint8_t col) const; 66 void DrawHexagon(float cx, float cy, float r, uint8_t col=0x40) const; 67 void DrawHexagon(const Ring &c, double r, uint8_t col) const; 77 68 }; 78 69
Note:
See TracChangeset
for help on using the changeset viewer.