11 #define PATTERN_SIZE 9
28 std::vector<int>
tmp (128, 0);
29 std::vector<std::vector<int>> lya (4, tmp), stra (4, tmp), ranka_t (4, tmp), ranka (4, tmp);
30 std::vector<PhiMemoryImage> Merged = Eout.
zone;
33 for(
int zone=0;zone<4;zone++){
37 for(
int b=0;
b<128;
b++){
44 bool zona[8] = {
false};
54 for(
int yy=0;yy != 8;yy++){
56 zona[yy] = patt[
y][yy] & Merged[zone][yy];
61 if(zona[0] || zona[1]){ly[
y] += 4;}
62 if(zona[2] || zona[3]){ly[
y] += 2;}
63 if(zona[4] || zona[5] || zona[6] || zona[7]){ly[
y] += 1;}
66 if( (ly[
y] != 0) && (ly[
y] != 1) && (ly[
y] != 2) && (ly[
y] != 4) ){
70 if((srt[
y] & 1) != 0){qu[
y] += 2;}
71 if((srt[y] & 2) != 0){qu[
y] += 8;}
72 if((srt[y] & 4) != 0){qu[
y] += 32;}
73 if((ly[y] & 1) != 0){qu[
y] += 1;}
74 if((ly[y] & 2) != 0){qu[
y] += 4;}
75 if((ly[y] & 4) != 0){qu[
y] += 16;}
84 if(qu[
a] > ranka_t[zone][
b]){
86 ranka_t[zone][
b] = qu[
a];
88 stra[zone][
b] = srt[
a];
105 for(
int zone=0;zone<4;zone++){
107 for(
int k=0;
k<128;
k++){
109 int qr = (
k==0) ? qr=0 : ranka_t[zone][
k-1];
110 int ql = (
k==127) ? ql=0 :ranka_t[zone][
k+1];
111 int qc = ranka_t[zone][
k];
113 if((qc <= ql) || (qc < qr)){qc = 0;}
140 std::vector<PatternOutput>
output (3,tmp);
157 for(
int zz=0;zz<4;zz++){
158 for(
int z = 0;
z<128;
z++){
void PrintQuality(QualityOutput out)
PhiMemoryImage patterns[9]
PhiMemoryImage pattern2(0x10000, 0, 0x8000, 0, 0xc000, 0, 0xc000, 0)
PatternOutput DetectPatterns(ZonesOutput Eout)
PhiMemoryImage pattern5(0x3000, 0, 0x8000, 0, 0x78000, 0, 0x78000, 0)
std::vector< PatternOutput > Patterns(std::vector< ZonesOutput > Zones)
std::vector< PhiMemoryImage > zone
PhiMemoryImage pattern4(0x60000, 0, 0x8000, 0, 0xe000, 0, 0xe000, 0)
std::vector< ConvertedHit > convertedhits
PhiMemoryImage pattern7(0xf00, 0, 0x8000, 0, 0x7f8000, 0, 0x7f8000, 0)
PhiMemoryImage pattern8(0x7f800000, 0, 0x8000, 0, 0xff00, 0, 0xff00, 0)
PhiMemoryImage pattern6(0x780000, 0, 0x8000, 0, 0xff00, 0, 0xff00, 0)
std::vector< std::vector< double > > tmp
PhiMemoryImage pattern3(0x4000, 0, 0x8000, 0, 0x18000, 0, 0x18000, 0)
PhiMemoryImage pattern1(0x8000, 0, 0x8000, 0, 0x8000, 0, 0x8000, 0)
PhiMemoryImage pattern9(0xff, 0, 0x8000, 0, 0x7f8000, 0, 0x7f8000, 0)
std::vector< ZonesOutput > Zones(std::vector< std::vector< ConvertedHit >> Hits)
std::vector< ConvertedHit > hits