added ctbGui

This commit is contained in:
2019-05-28 17:15:59 +02:00
parent f7aedf7711
commit a008c2b2c8
22 changed files with 7290 additions and 2 deletions

View File

@ -25,7 +25,29 @@ class detectorData {
npoints(np), npy(ny), cvalues(cval), databytes(dbytes),
dynamicRange(dr), dgainvalues(NULL), fileIndex(file_ind) {
strcpy(fileName,fname);
};
};
int64_t getChannel(int i) {
int off=dynamicRange/8;
if (off==1) {
char val=*(cvalues+i);
return val;
}
if (off==2) {
int16_t val=*((int16_t*)(cvalues+i*off));
return val;
}
if (off==4) {
int32_t val=*((int32_t*)(cvalues+i*off));
return val;
}
if (off==8) {
int64_t val=*((int64_t*)(cvalues+i*off));
return val;
}
return -1;
}
/**
@short The destructor

View File

@ -3326,7 +3326,10 @@ void multiSlsDetector::readFrameFromReceiver() {
uint32_t xoffset = coordX * nPixelsX * bytesPerPixel;
uint32_t yoffset = coordY * nPixelsY;
uint32_t singledetrowoffset = nPixelsX * bytesPerPixel;
uint32_t rowoffset = nX * singledetrowoffset;
uint32_t rowoffset = nX * singledetrowoffset;
if (getDetectorTypeAsEnum() == CHIPTESTBOARD) {
singledetrowoffset=size;
}
FILE_LOG(logDEBUG1) << "Multi Image Info:"
"\n\txoffset: "
<< xoffset << "\n\tyoffset: " << yoffset
@ -3340,7 +3343,11 @@ void multiSlsDetector::readFrameFromReceiver() {
(char *)image + (i * singledetrowoffset), singledetrowoffset);
}
} else {
for (uint32_t i = 0; i < nPixelsY; ++i) {
std::cout << i << " " << ((yoffset + i) * rowoffset) + xoffset << " " << (i * singledetrowoffset) << " " << singledetrowoffset << std::endl;
memcpy(((char *)multiframe) + ((yoffset + i) * rowoffset) + xoffset,
(char *)image + (i * singledetrowoffset), singledetrowoffset);
}
@ -3362,6 +3369,7 @@ void multiSlsDetector::readFrameFromReceiver() {
}
// normal pixels
else {
// std::cout << "creating detectorData" << std::endl;
thisData = new detectorData(getCurrentProgress(), currentFileName.c_str(), nCompletePixelsX,
nCompletePixelsY, multiframe, multisize, dynamicRange,
currentFileIndex);