Moench working version

This commit is contained in:
2019-03-28 13:29:12 +01:00
parent 18ab437ae5
commit 52f74142b1
7 changed files with 107 additions and 66 deletions

View File

@ -324,8 +324,11 @@ public:
img=dets[ii]->getImage();
for (int i=0; i<nn; i++) {
if (ii==0)
image[i]=img[i];
else
// if (img[i]>0)
image[i]=img[i];
// else
// image[i]=0;
else //if (img[i]>0)
image[i]+=img[i];
//if (img[i]) cout << "det " << ii << " pix " << i << " val " << img[i] << " " << image[i] << endl;
}
@ -359,11 +362,14 @@ public:
float *gm=new float[nn];
if (gm) {
for (int ix=0; ix<nn; ix++) {
if (t)
gm[ix]=(image[ix])/t;
else
if (t) {
if (image[ix]<0)
gm[ix]=0;
else
gm[ix]=(image[ix])/t;
} else
gm[ix]=image[ix];
//if (image[ix]>0 && ix/nnx<350) cout << ix/nnx << " " << ix%nnx << " " << image[ix]<< " " << gm[ix] << endl;
}
//cout << "image " << nnx << " " << nny << endl;