-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnoisyMask.h
49 lines (35 loc) · 1.08 KB
/
noisyMask.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef NOISYMASK_H
#define NOISYMASK_H
#include <iostream>
#include <fstream>
#include <string>
const int cxDim = 512;
const int cyDim = 256;
using namespace std;
class NoisyMask
{
public:
NoisyMask(void);
void AddHit(int x, int y, double energy);
int Update();
void MaskBorder();
int SetThreshold(int thres){m_threshold = thres;return Update();};
void SetName(string name){m_noisyMaskFileName = name;};
int GetNGood(void){return m_nGood;};
bool IsGood(int x, int y){return m_pixelsBool[x][y];};
int GetNHits(int x, int y){return m_pixels[x][y];};
double GetEnergy (int x, int y){return m_pixelsEnergy[x][y];};
void CoutNoisyMask (void);
void CoutNoisyMaskRow (int myRow);
void SaveNoisyMask(void);
void LoadNoisyMask(void);
void Clear(void);
private:
int m_pixels[cxDim][cyDim];
bool m_pixelsBool[cxDim][cyDim];
double m_pixelsEnergy[cxDim][cyDim];
int m_threshold;
int m_nGood;
string m_noisyMaskFileName;
};
#endif