mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-23 15:00:02 +02:00
Revert previous datatype change to int
This commit is contained in:
parent
0583a0703c
commit
d2dead070c
@ -336,7 +336,7 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
string fname;
|
||||
// int length;
|
||||
long long int *detimage = NULL;
|
||||
int *detimage = nullptr;
|
||||
int nnx, nny, nnsx, nnsy;
|
||||
// uint32_t imageSize = 0, nPixelsX = 0, nPixelsY = 0,
|
||||
// uint32_t dynamicRange = 0;
|
||||
|
@ -410,7 +410,7 @@ class multiThreadedAnalogDetector {
|
||||
dets[i]->newDataSet();
|
||||
};
|
||||
|
||||
virtual long long int *getImage(int &nnx, int &nny, int &ns, int &nsy) {
|
||||
virtual int *getImage(int &nnx, int &nny, int &ns, int &nsy) {
|
||||
//int *img;
|
||||
// int nnx, nny, ns;
|
||||
// int nnx, nny, ns;
|
||||
@ -419,7 +419,7 @@ class multiThreadedAnalogDetector {
|
||||
delete[] image;
|
||||
image = nullptr;
|
||||
}
|
||||
image = new long long int[nn];
|
||||
image = new int[nn];
|
||||
// int nn=dets[0]->getImageSize(nnx, nny, ns);
|
||||
// for (i=0; i<nn; i++) image[i]=0;
|
||||
|
||||
@ -430,11 +430,11 @@ class multiThreadedAnalogDetector {
|
||||
for (int i = 0; i < nn; i++) {
|
||||
if (ii == 0)
|
||||
// if (img[i]>0)
|
||||
image[i] = static_cast<long long int>(tmp_img[i]);
|
||||
image[i] = tmp_img[i];
|
||||
// else
|
||||
// image[i]=0;
|
||||
else // if (img[i]>0)
|
||||
image[i] += static_cast<long long int>(tmp_img[i]);
|
||||
image[i] += tmp_img[i];
|
||||
// if (img[i]) cout << "det " << ii << " pix " << i << " val
|
||||
// " << img[i] << " " << image[i] << endl;
|
||||
}
|
||||
@ -697,9 +697,9 @@ class multiThreadedAnalogDetector {
|
||||
threadedAnalogDetector *dets[MAXTHREADS];
|
||||
analogDetector<uint16_t> *dd[MAXTHREADS];
|
||||
int ithread;
|
||||
long long int *image;
|
||||
int *ff;
|
||||
double *ped;
|
||||
int* image;
|
||||
int* ff;
|
||||
double* ped;
|
||||
//pthread_mutex_t fmutex; //unused
|
||||
};
|
||||
|
||||
|
@ -66,11 +66,10 @@ class multiThreadedInterpolatingDetector
|
||||
return (dets[0])->getInterpolation();
|
||||
};
|
||||
|
||||
virtual long long int *getImage(int &nnx, int &nny, int &nsx, int &nsy) {
|
||||
virtual int *getImage(int &nnx, int &nny, int &nsx, int &nsy) {
|
||||
if (getInterpolation() == NULL)
|
||||
return multiThreadedAnalogDetector::getImage(nnx, nny, nsx, nsy);
|
||||
// if one interpolates, the whole image is stored in detector 0;
|
||||
int *img;
|
||||
// int nnx, nny, ns;
|
||||
// int nnx, nny, ns;
|
||||
int nn = dets[0]->getImageSize(nnx, nny, nsx, nsy);
|
||||
@ -78,10 +77,10 @@ class multiThreadedInterpolatingDetector
|
||||
delete image;
|
||||
image = NULL;
|
||||
}
|
||||
image = new long long int[nn];
|
||||
img = dets[0]->getImage();
|
||||
image = new int[nn];
|
||||
int* tmp_img = dets[0]->getImage();
|
||||
for (int i = 0; i < nn; i++) {
|
||||
image[i] = static_cast<long long int>(img[i]);
|
||||
image[i] = tmp_img[i];
|
||||
}
|
||||
return image;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user