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