source: trunk/Mars/mimage/MImgCleanStd.h@ 13802

Last change on this file since 13802 was 9369, checked in by tbretz, 16 years ago
*** empty log message ***
File size: 3.5 KB
Line 
1#ifndef MARS_MImgCleanStd
2#define MARS_MImgCleanStd
3
4#ifndef MARS_MGTask
5#include "MGTask.h"
6#endif
7
8class MGeomCam;
9class MGeom;
10class MSignalCam;
11class MPedPhotCam;
12class MArrivalTime;
13class MCameraData;
14//class MRawRunHeader;
15
16class MGGroupFrame;
17
18class MImgCleanStd : public MGTask
19{
20public:
21 typedef enum {
22 kStandard,
23 kScaled,
24 kDemocratic,
25 kProbability,
26 kAbsolute,
27 kTime,
28 } CleaningMethod_t;
29
30private:
31 static const TString gsNamePedPhotCam; // default name of the 'MPedPhotCam' container
32 static const TString gsNameGeomCam; // default name of the 'MGeomCam' container
33 static const TString gsNameSignalCam; // default name of the 'MSignalCam' container
34
35 const MGeomCam *fCam; //!
36 MSignalCam *fEvt; //!
37 MPedPhotCam *fPed; //!
38 MCameraData *fData; //!
39// MRawRunHeader *fHeader; //!
40
41 CleaningMethod_t fCleaningMethod;
42
43 Float_t fCleanLvl0;
44 Float_t fCleanLvl1;
45 Float_t fCleanLvl2;
46
47 Float_t fTimeLvl1;
48 Float_t fTimeLvl2;
49
50 UShort_t fCleanRings;
51 Bool_t fKeepIsolatedPixels;
52 Int_t fRecoverIsolatedPixels;
53 Int_t fPostCleanType;
54
55 TString fNamePedPhotCam; // name of the 'MPedPhotCam' container
56 TString fNameGeomCam; // name of the 'MGeomCam' container
57 TString fNameSignalCam; // name of the 'MSignalCam' container
58
59 // MImgCleanStd
60 Bool_t HasCoreNeighbors(const MGeom &gpix) const;
61 Bool_t HasUsedNeighbors(const MGeom &gpix) const;
62 void SetUsedNeighbors(const MGeom &gpix, Int_t r=1) const;
63 Int_t DoCleaning(Float_t &size) const;
64 void ResetCleaning() const;
65 Int_t RecoverIsolatedPixels(Float_t &size) const;
66 void CleanTime(Int_t n, Double_t lvl) const;
67
68 void CleanStepTime() const;
69
70 // MGTask, MTask, MParContainer
71 void CreateGuiElements(MGGroupFrame *f);
72 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
73
74 void StreamPrimitive(ostream &out) const;
75
76 Int_t PreProcess(MParList *pList);
77 Int_t Process();
78
79public:
80 MImgCleanStd(const Float_t lvl1=3.0, const Float_t lvl2=2.5,
81 const char *name=NULL, const char *title=NULL);
82 void Print(Option_t *o="") const;
83
84 Float_t GetCleanLvl0() const { return fCleanLvl0; }
85 Float_t GetCleanLvl1() const { return fCleanLvl1; }
86 Float_t GetCleanLvl2() const { return fCleanLvl2; }
87
88 Float_t GetTimeLvl1() const { return fTimeLvl1; }
89 Float_t GetTimeLvl2() const { return fTimeLvl2; }
90
91 void SetCleanLvl0(Float_t lvl) { fCleanLvl0=lvl; }
92 void SetCleanLvl1(Float_t lvl) { fCleanLvl1=lvl; }
93 void SetCleanLvl2(Float_t lvl) { fCleanLvl2=lvl; }
94
95 void SetTimeLvl1(Float_t lvl) { fTimeLvl1=lvl; }
96 void SetTimeLvl2(Float_t lvl) { fTimeLvl2=lvl; }
97
98 void SetCleanRings(UShort_t r) { fCleanRings=r; }
99 UShort_t GetCleanRings() const { return fCleanRings;}
100
101 void SetPostCleanType(Int_t t) { fPostCleanType=t; }
102
103 void SetMethod(CleaningMethod_t m) { fCleaningMethod = m; }
104 void SetKeepIsolatedPixels(Bool_t b=kTRUE) { fKeepIsolatedPixels=b; }
105 void SetRecoverIsolatedPixels(Int_t n=-1) { fRecoverIsolatedPixels=n; }
106
107 Bool_t ProcessMessage(Int_t msg, Int_t submsg, Long_t param1, Long_t param2);
108
109 void SetNamePedPhotCam(const char *name) { fNamePedPhotCam = name; }
110 void SetNameSignalCam(const char *name) { fNameSignalCam = name; }
111 void SetNameGeomCam(const char *name) { fNameGeomCam = name; }
112
113 ClassDef(MImgCleanStd, 4) // task doing the image cleaning
114};
115
116#endif
Note: See TracBrowser for help on using the repository browser.