mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-21 19:30:03 +02:00
bugfix from earlier commit: dr in readfromreceiver commented out
This commit is contained in:
parent
247d40f5a6
commit
f4b922165f
@ -486,19 +486,16 @@ void DetectorImpl::readFrameFromReceiver() {
|
|||||||
if (image == nullptr) {
|
if (image == nullptr) {
|
||||||
// allocate
|
// allocate
|
||||||
size = doc["size"].GetUint();
|
size = doc["size"].GetUint();
|
||||||
//std::cout << "SIZE: "<< size << std::endl;
|
|
||||||
multisize = size * zmqSocket.size();
|
multisize = size * zmqSocket.size();
|
||||||
image = new char[size];
|
image = new char[size];
|
||||||
multiframe = new char[multisize];
|
multiframe = new char[multisize];
|
||||||
memset(multiframe, 0xFF, multisize);
|
memset(multiframe, 0xFF, multisize);
|
||||||
// dynamic range
|
// dynamic range
|
||||||
// dynamicRange = doc["bitmode"].GetUint();
|
dynamicRange = doc["bitmode"].GetUint();
|
||||||
bytesPerPixel = (float)dynamicRange / 8;
|
bytesPerPixel = (float)dynamicRange / 8;
|
||||||
// std::cout << "DR: "<< dynamicRange << std::endl;
|
|
||||||
// shape
|
// shape
|
||||||
nPixelsX = doc["shape"][0].GetUint();
|
nPixelsX = doc["shape"][0].GetUint();
|
||||||
nPixelsY = doc["shape"][1].GetUint();
|
nPixelsY = doc["shape"][1].GetUint();
|
||||||
// std::cout << "shape: "<< nPixelsX << " "<< nPixelsY << std::endl;
|
|
||||||
// detector shape
|
// detector shape
|
||||||
nX = doc["detshape"][0].GetUint();
|
nX = doc["detshape"][0].GetUint();
|
||||||
nY = doc["detshape"][1].GetUint();
|
nY = doc["detshape"][1].GetUint();
|
||||||
@ -562,11 +559,9 @@ void DetectorImpl::readFrameFromReceiver() {
|
|||||||
uint32_t rowoffset = nX * singledetrowoffset;
|
uint32_t rowoffset = nX * singledetrowoffset;
|
||||||
if (multi_shm()->multiDetectorType == CHIPTESTBOARD) {
|
if (multi_shm()->multiDetectorType == CHIPTESTBOARD) {
|
||||||
singledetrowoffset = size;
|
singledetrowoffset = size;
|
||||||
nPixelsY=1;
|
nPixelsY = 1; // TODO: nDetPixelsY is not updated.
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
FILE_LOG(logDEBUG1)
|
FILE_LOG(logDEBUG1)
|
||||||
<< "Multi Image Info:"
|
<< "Multi Image Info:"
|
||||||
"\n\txoffset: "
|
"\n\txoffset: "
|
||||||
@ -585,7 +580,6 @@ void DetectorImpl::readFrameFromReceiver() {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (uint32_t i = 0; i < nPixelsY; ++i) {
|
for (uint32_t i = 0; i < nPixelsY; ++i) {
|
||||||
|
|
||||||
memcpy((multiframe) + ((yoffset + i) * rowoffset) +
|
memcpy((multiframe) + ((yoffset + i) * rowoffset) +
|
||||||
xoffset,
|
xoffset,
|
||||||
image + (i * singledetrowoffset),
|
image + (i * singledetrowoffset),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user