mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-11 12:27:14 +02:00
added and fixed gotthard 25um file and zmq photon finder
This commit is contained in:
@ -1,18 +1,22 @@
|
||||
|
||||
CBFLIBDIR=/afs/psi.ch/project/sls_det_software/CBFlib-0.9.5
|
||||
LIBRARYCBF=$(CBFLIBDIR)/lib/*.o ../tiffIO.cpp
|
||||
ZMQLIB=../../slsReceiverSoftware/include
|
||||
INCDIR=-I.. -I../../slsReceiverSoftware/include -I$(CBFLIBDIR)/include/ -I. -I../interpolations -I../dataStructures
|
||||
LIBHDF5=-L$(CBFLIBDIR)/lib/ -lhdf5
|
||||
LDFLAG= -L/usr/lib64/ -lpthread
|
||||
#-L../../bin
|
||||
MAIN=gotthard25umOnTheFlyAnalysis.C
|
||||
MAIN=gotthard25umZmqAnalysis.C
|
||||
|
||||
#DESTDIR?=../bin
|
||||
|
||||
all: gotthard25umOnTheFlyAnalysis
|
||||
all: gotthard25umOnTheFlyAnalysis gotthard25umZmq
|
||||
|
||||
gotthard25umOnTheFlyAnalysis: $(MAIN) $(INCS) clean
|
||||
g++ -o gotthard25umOnTheFlyAnalysis $(MAIN) -lm -ltiff -lstdc++ $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DSAVE_ALL
|
||||
g++ -o gotthard25umOnTheAnalysis $(MAIN) -lm -ltiff -lstdc++ $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF)
|
||||
|
||||
gotthard25umZmq: $(MAIN) $(INCS) clean
|
||||
g++ -o gotthard25umZmq $(MAIN) -lm -ltiff -lstdc++ $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DZMQ -L$(ZMQLIB) -lzmq
|
||||
|
||||
clean:
|
||||
rm -f gotthard25umOnTheFlyAnalysis
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include "singlePhotonDetector.h"
|
||||
//#include "interpolatingDetector.h"
|
||||
//#include "linearInterpolation.h"
|
||||
//#include "multiThreadedAnalogDetector.h"
|
||||
#include "multiThreadedAnalogDetector.h"
|
||||
|
||||
#include <ctime>
|
||||
|
||||
@ -27,9 +27,60 @@
|
||||
|
||||
|
||||
void *gotthardProcessFrame() {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (argc < 3 ) {
|
||||
cprintf(RED, "Help: ./trial [receive socket ip] [receive starting port number] [send_socket ip] [send starting port number]\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
// receive parameters
|
||||
bool send = false;
|
||||
char* socketip=argv[1];
|
||||
uint32_t portnum = atoi(argv[2]);
|
||||
int size = 32*2*5000;//atoi(argv[3]);
|
||||
|
||||
// send parameters if any
|
||||
char* socketip2 = 0;
|
||||
uint32_t portnum2 = 0;
|
||||
if (argc > 3) {
|
||||
send = true;
|
||||
socketip2 = argv[3];
|
||||
portnum2 = atoi(argv[4]);
|
||||
}
|
||||
cout << "\nrx socket ip : " << socketip <<
|
||||
"\nrx port num : " << portnum ;
|
||||
if (send) {
|
||||
cout << "\nsd socket ip : " << socketip2 <<
|
||||
"\nsd port num : " << portnum2;
|
||||
}
|
||||
cout << endl;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
char fname0[10000], fname1[10000];
|
||||
char fformat[10000];
|
||||
strcpy(fformat,"/external_pool/gotthard_data/datadir_gotthardI/bchip074075/20170731/Xray/xray_15kV_200uA_5us_d%d_f000000040000_0.raw");
|
||||
int fifosize=1000;
|
||||
strcpy(fformat,"/external_pool/gotthard_data/datadir_gotthardI/bchip074075/20170731/Xray/xray_15kV_200uA_5us_d%d_f000000000000_0.raw");
|
||||
sprintf(fname0,fformat,0,0);
|
||||
sprintf(fname1,fformat,1,1);
|
||||
|
||||
@ -65,9 +116,20 @@ void *gotthardProcessFrame() {
|
||||
|
||||
filter->setFrameMode(eFrame);
|
||||
|
||||
char buff[2*(48+1280*2)];
|
||||
char *buff0=buff;
|
||||
char *buff1=buff+48+1280*2;
|
||||
char *buff;//[2*(48+1280*2)];
|
||||
|
||||
|
||||
char *buff0;
|
||||
char *buff1;
|
||||
|
||||
|
||||
multiThreadedAnalogDetector *mt=new multiThreadedAnalogDetector(filter,nthreads,fifosize);
|
||||
mt->setFrameMode(eFrame);
|
||||
mt->StartThreads();
|
||||
mt->popFree(buff);
|
||||
buff0=buff;
|
||||
buff1=buff+48+1280*2;
|
||||
|
||||
|
||||
int photons[1280*2];
|
||||
|
||||
@ -75,33 +137,16 @@ void *gotthardProcessFrame() {
|
||||
int ok=0;
|
||||
ifstream filebin0,filebin1;
|
||||
std::time_t end_time;
|
||||
|
||||
int16_t dout[1280*2];
|
||||
int iFrame=-1;
|
||||
int np=-1;
|
||||
// typedef struct {
|
||||
// uint64_t frameNumber; /**< is the frame number */
|
||||
// uint32_t expLength; /**< is the subframe number (32 bit eiger) or real time exposure time in 100ns (others) */
|
||||
// uint32_t packetNumber; /**< is the packet number */
|
||||
// uint64_t bunchId; /**< is the bunch id from beamline */
|
||||
// uint64_t timestamp; /**< is the time stamp with 10 MHz clock */
|
||||
// uint16_t modId; /**< is the unique module id (unique even for left, right, top, bottom) */
|
||||
// uint16_t xCoord; /**< is the x coordinate in the complete detector system */
|
||||
// uint16_t yCoord; /**< is the y coordinate in the complete detector system */
|
||||
// uint16_t zCoord; /**< is the z coordinate in the complete detector system */
|
||||
// uint32_t debug; /**< is for debugging purposes */
|
||||
// uint16_t roundRNumber; /**< is the round robin set number */
|
||||
// uint8_t detType; /**< is the detector type see :: detectorType */
|
||||
// uint8_t version; /**< is the version number of this structure format */
|
||||
// } sls_detector_header;
|
||||
|
||||
|
||||
// multiThreadedDetector *mt=new multiThreadedDetector(filter,nthreads,100);
|
||||
nph=0;
|
||||
nph1=0;
|
||||
//int np;
|
||||
int iph;
|
||||
int data_ready=1;
|
||||
|
||||
int *image;
|
||||
|
||||
// filter->setROI(0,512,0,1);
|
||||
|
||||
@ -117,39 +162,49 @@ void *gotthardProcessFrame() {
|
||||
nf=0;
|
||||
iFrame=-1;
|
||||
while ((decoder->readNextFrame(filebin0, iFrame, np, buff0)) && (decoder->readNextFrame(filebin1, iFrame, np, buff1))) {
|
||||
filter->processData(buff, photons);
|
||||
cout << nf << " " << decoder->getFrameNumber(buff0) << " " << decoder->getFrameNumber(buff1) << " " << filter->getPhFrame() << " " << filter->getPhTot() << endl;
|
||||
//filter->processData(buff, photons);
|
||||
// cout << nf << " " << decoder->getFrameNumber(buff0) << " " << decoder->getFrameNumber(buff1) << " " << filter->getPhFrame() << " " << filter->getPhTot() << endl;
|
||||
// for (int i=0; i<1280*2; i++) {
|
||||
// filter->addToPedestal(buff,i,0);
|
||||
// dout[i]=filter->subtractPedestal(buff,i,0);
|
||||
// if (nf>10 && i<512)
|
||||
// if (i%2)
|
||||
// cout << nf << " " << i << " " << filter->getPedestal(i,0) << " " << det->getValue(buff,i,0) << " " << decoder->getValue(buff1,1280-1-i/2,0)<< " " << dout[i] << endl;
|
||||
// else
|
||||
// cout << nf << " " << i << " " << filter->getPedestal(i,0) << " " << det->getValue(buff,i,0) << " " << decoder->getValue(buff0,i/2,0)<< " " << dout[i] << endl;
|
||||
|
||||
// }
|
||||
mt->pushData(buff);
|
||||
mt->nextThread();
|
||||
mt->popFree(buff);
|
||||
buff0=buff;
|
||||
buff1=buff+48+1280*2;
|
||||
|
||||
nf++;
|
||||
}
|
||||
|
||||
// cout << id << " " << nf << endl;
|
||||
if (nf%1000==0) {
|
||||
std::time(&end_time);
|
||||
cout << std::ctime(&end_time) << " " << nf << endl;
|
||||
if (nf%10000==0) {
|
||||
while (mt->isBusy()) {;}
|
||||
image=filter->getImage();
|
||||
if (image) {
|
||||
cout << nf << "*****************" << endl;
|
||||
for (int i=0; i<512; i++) {
|
||||
cout << image[i] << "\t";
|
||||
}
|
||||
cout << endl;
|
||||
}
|
||||
filter->clearImage();
|
||||
std::time(&end_time);
|
||||
cout << std::ctime(&end_time) << " " << nf << endl;
|
||||
}
|
||||
iFrame=-1;
|
||||
}
|
||||
|
||||
//delete [] buff;
|
||||
iFrame=-1;
|
||||
|
||||
|
||||
filebin0.close();
|
||||
filebin1.close();
|
||||
}
|
||||
else
|
||||
cout << "Could not open file " << fname0<< " or " << fname1 << endl;
|
||||
|
||||
|
||||
//mt->StopThreads();
|
||||
|
||||
// char tit[10000];
|
||||
//sprintf(tit,"/scratch/int_image_mt%d.tiff",nthreads);
|
||||
|
||||
//mt->writeInterpolatedImage(tit);
|
||||
// delete [] etah;
|
||||
|
||||
// delete interp;
|
||||
//delete decoder;
|
||||
//cout << "Read " << nf << " frames" << endl;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,386 @@
|
||||
#include "sls_receiver_defs.h"
|
||||
//#ifdef ZMQ
|
||||
#include "ZmqSocket.h"
|
||||
//#endif
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
#include <fstream>
|
||||
#include <stdio.h>
|
||||
//#include <deque>
|
||||
//#include <list>
|
||||
//#include <queue>
|
||||
#include <fstream>
|
||||
#include <cstring>
|
||||
|
||||
#include "gotthardModuleDataNew.h"
|
||||
#include "gotthardDoubleModuleDataNew.h"
|
||||
|
||||
#include "singlePhotonDetector.h"
|
||||
//#include "interpolatingDetector.h"
|
||||
//#include "linearInterpolation.h"
|
||||
#include "multiThreadedAnalogDetector.h"
|
||||
|
||||
#include <ctime>
|
||||
|
||||
#define NC 1280
|
||||
#define NR 1
|
||||
|
||||
#include "tiffIO.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define SLS_DETECTOR_JSON_HEADER_VERSION 0x2
|
||||
int main(int argc, char *argv[]){
|
||||
//void *gotthardProcessFrame() {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
int fifosize=1000;
|
||||
int nthreads=3;
|
||||
int nph, nph1;
|
||||
int etabins=550;
|
||||
double etamin=-1, etamax=2;
|
||||
int nsubpix=1;
|
||||
float *etah=new float[etabins*etabins];
|
||||
int *heta, *himage;
|
||||
int offset=48;
|
||||
#ifdef ZMQ
|
||||
offset=0;
|
||||
#endif
|
||||
#ifndef ZMQ
|
||||
offset=48;
|
||||
#endif
|
||||
|
||||
|
||||
gotthardModuleDataNew *decoder=new gotthardModuleDataNew();
|
||||
gotthardDoubleModuleDataNew *det=new gotthardDoubleModuleDataNew(offset);
|
||||
singlePhotonDetector *filter=new singlePhotonDetector(det,3, 5, 1, 0, 1000, 200);
|
||||
filter->setROI(0,512,0,1);
|
||||
char *buff;//[2*(48+1280*2)];
|
||||
char *buff0;
|
||||
char *buff1;
|
||||
multiThreadedAnalogDetector *mt=new multiThreadedAnalogDetector(filter,nthreads,fifosize);
|
||||
mt->setFrameMode(eFrame);
|
||||
mt->StartThreads();
|
||||
mt->popFree(buff);
|
||||
buff0=buff;
|
||||
buff1=buff+48+1280*2;
|
||||
int photons[1280*2];
|
||||
int nf=0;
|
||||
int ok=0;
|
||||
std::time_t end_time;
|
||||
//int16_t dout[1280*2];
|
||||
int iFrame=-1;
|
||||
int np=-1;
|
||||
nph=0;
|
||||
nph1=0;
|
||||
//int np;
|
||||
int iph;
|
||||
int data_ready=1;
|
||||
int *image;
|
||||
|
||||
|
||||
|
||||
int length;
|
||||
int nnx, nny,nns;
|
||||
int nix, niy,nis;
|
||||
// infinite loop
|
||||
int ix, iy, isx, isy;
|
||||
|
||||
filter->getImageSize(nnx, nny,nns);
|
||||
int16_t *dout=new int16_t [nnx*nny];
|
||||
|
||||
|
||||
|
||||
#ifdef ZMQ
|
||||
if (argc < 3 ) {
|
||||
cprintf(RED, "Help: %s [receive socket ip] [receive starting port number] [send_socket ip] [send starting port number]\n",argv[0]);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
// receive parameters
|
||||
bool send = false;
|
||||
char* socketip=argv[1];
|
||||
uint32_t portnum = atoi(argv[2]);
|
||||
int size = nnx*nny*2;
|
||||
|
||||
// send parameters if any
|
||||
char* socketip2 = 0;
|
||||
uint32_t portnum2 = 0;
|
||||
if (argc > 3) {
|
||||
send = true;
|
||||
socketip2 = argv[3];
|
||||
portnum2 = atoi(argv[4]);
|
||||
}
|
||||
cout << "\nrx socket ip : " << socketip <<
|
||||
"\nrx port num : " << portnum ;
|
||||
if (send) {
|
||||
cout << "\nsd socket ip : " << socketip2 <<
|
||||
"\nsd port num : " << portnum2;
|
||||
}
|
||||
cout << endl;
|
||||
|
||||
|
||||
|
||||
// receive socket
|
||||
ZmqSocket* zmqsocket0 = new ZmqSocket(socketip,portnum);
|
||||
if (zmqsocket0->IsError()) {
|
||||
cprintf(RED, "Error: Could not create Zmq socket on port %d with ip %s\n", portnum, socketip);
|
||||
delete zmqsocket0;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
ZmqSocket* zmqsocket1 = new ZmqSocket(socketip,portnum+1);
|
||||
if (zmqsocket1->IsError()) {
|
||||
cprintf(RED, "Error: Could not create Zmq socket on port %d with ip %s\n", portnum+1, socketip);
|
||||
delete zmqsocket1;
|
||||
delete zmqsocket0;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
zmqsocket0->Connect();
|
||||
printf("Zmq Client 0 at %s\n", zmqsocket0->GetZmqServerAddress());
|
||||
zmqsocket1->Connect();
|
||||
printf("Zmq Client 1 at %s\n", zmqsocket1->GetZmqServerAddress());
|
||||
|
||||
// send socket
|
||||
ZmqSocket* zmqsocket2 = 0;
|
||||
ZmqSocket* zmqsocket3 = 0;
|
||||
if (send) {
|
||||
zmqsocket2 = new ZmqSocket(portnum2, socketip2);
|
||||
if (zmqsocket2->IsError()) {
|
||||
bprintf(RED, "Error: Could not create Zmq socket server on port %d and ip %s\n", portnum2, socketip2);
|
||||
delete zmqsocket2;
|
||||
delete zmqsocket1;
|
||||
delete zmqsocket0;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
zmqsocket3 = new ZmqSocket(portnum2+1, socketip2);
|
||||
if (zmqsocket3->IsError()) {
|
||||
bprintf(RED, "Error: Could not create Zmq socket server on port %d and ip %s\n", portnum2+1, socketip2);
|
||||
delete zmqsocket3;
|
||||
delete zmqsocket2;
|
||||
delete zmqsocket1;
|
||||
delete zmqsocket0;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
zmqsocket2->Connect();
|
||||
printf("Zmq Server 0 started at %s\n", zmqsocket2->GetZmqServerAddress());
|
||||
zmqsocket3->Connect();
|
||||
printf("Zmq Server 1 started at %s\n", zmqsocket3->GetZmqServerAddress());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
uint64_t acqIndex1 = -1;
|
||||
uint64_t frameIndex1 = -1;
|
||||
uint32_t subframeIndex1 = -1;
|
||||
uint64_t fileindex1 = -1;
|
||||
string filename1 = "";
|
||||
|
||||
uint64_t acqIndex0 = -1;
|
||||
uint64_t frameIndex0 = -1;
|
||||
uint32_t subframeIndex0 = -1;
|
||||
uint64_t fileindex0 = -1;
|
||||
string filename0 = "";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
char ofname[10000];
|
||||
FILE *fout=NULL;
|
||||
for (int i=0; i<nnx; i++)
|
||||
dout[i]=0;
|
||||
char fname0[10000], fname1[10000];
|
||||
int irun;
|
||||
|
||||
#ifndef ZMQ
|
||||
|
||||
char ff[10000];
|
||||
if (argc < 6 ) {
|
||||
cprintf(RED, "Help: %s [indir] [fformat] [runmin] [runmax] [out file format]\n",argv[0]);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
char *indir=argv[1];
|
||||
char *fformat=argv[2];
|
||||
int runmin=atoi(argv[3]);
|
||||
int runmax=atoi(argv[4]);
|
||||
char *outdir=argv[5];
|
||||
sprintf(ff,"%s/%s",indir,fformat);
|
||||
|
||||
// strcpy(fformat,"/external_pool/gotthard_data/datadir_gotthardI/bchip074075/20170731/Xray/xray_15kV_200uA_5us_d%d_f000000000000_0.raw");
|
||||
// sprintf(fname0,fformat,0,0);
|
||||
// sprintf(fname1,fformat,1,1);
|
||||
|
||||
ifstream filebin0,filebin1;
|
||||
for (irun=runmin; irun<runmax; irun++) {
|
||||
|
||||
sprintf(fname0,ff,0,irun);
|
||||
sprintf(fname1,ff,1,irun);
|
||||
sprintf(ofname,outdir,irun);
|
||||
|
||||
filebin0.open((const char *)(fname0), ios::in | ios::binary);
|
||||
filebin1.open((const char *)(fname1), ios::in | ios::binary);
|
||||
if (filebin0.is_open() && filebin1.is_open()) {
|
||||
cout << "Opened file " << fname0<< endl;
|
||||
cout << "Opened file " << fname1<< endl;
|
||||
nf=0;
|
||||
iFrame=-1;
|
||||
while ((decoder->readNextFrame(filebin0, iFrame, np, buff0)) && (decoder->readNextFrame(filebin1, iFrame, np, buff1))) {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef ZMQ
|
||||
|
||||
while(1) {
|
||||
if ((!zmqsocket0->ReceiveHeader(0, acqIndex0, frameIndex0, subframeIndex0, filename0, fileindex0)) && (!zmqsocket1->ReceiveHeader(0, acqIndex1, frameIndex1, subframeIndex1, filename1, fileindex1))){
|
||||
|
||||
|
||||
|
||||
while (mt->isBusy()) {;}
|
||||
image=filter->getImage();
|
||||
if (image) {
|
||||
fout=fopen(ofname,"w");
|
||||
//cout << nf << "*****************" << endl;
|
||||
for (int i=0; i<512; i++) {
|
||||
fprintf(fout,"%d %d\n",i,image[i]);
|
||||
dout[i]=image[i];
|
||||
}
|
||||
fclose(fout);;
|
||||
}
|
||||
|
||||
|
||||
if (send) {
|
||||
strcpy(fname0,filename0.c_str());
|
||||
strcpy(fname1,filename1.c_str());
|
||||
// zmqsocket2->SendHeaderData(0, false, SLS_DETECTOR_JSON_HEADER_VERSION,16,fileindex,400,400,400*400, acqIndex,frameIndex,fname, acqIndex, 0,0,0,0,0,0,0,0,0,0,0,1);
|
||||
zmqsocket2->SendHeaderData(0, false, SLS_DETECTOR_JSON_HEADER_VERSION,0,0,0,0,0, 0,0,fname0, 0, 0,0,0,0,0,0,0,0,0,0,0,1);
|
||||
zmqsocket3->SendHeaderData(0, false, SLS_DETECTOR_JSON_HEADER_VERSION,0,0,0,0,0, 0,0,fname1, 0, 0,0,0,0,0,0,0,0,0,0,0,1);
|
||||
|
||||
zmqsocket2->SendData((char*)dout,size/2);
|
||||
zmqsocket3->SendData(((char*)dout)+size/2,size/2);
|
||||
// cprintf(GREEN, "Sent Data\n");
|
||||
|
||||
|
||||
zmqsocket2->SendHeaderData(0, true, SLS_DETECTOR_JSON_HEADER_VERSION);
|
||||
zmqsocket3->SendHeaderData(0, true, SLS_DETECTOR_JSON_HEADER_VERSION);
|
||||
|
||||
cprintf(RED, "Received %d frames\n", nf);
|
||||
|
||||
}
|
||||
|
||||
|
||||
filter->clearImage();
|
||||
// std::time(&end_time);
|
||||
// cout << std::ctime(&end_time) << " " << nf << endl;
|
||||
|
||||
|
||||
|
||||
|
||||
continue;
|
||||
}
|
||||
if (acqIndex0!=acqIndex1)
|
||||
cout << "different acquisition indexes " << acqIndex0 << " and " << acqIndex1 << endl;
|
||||
if (frameIndex0!=frameIndex1)
|
||||
cout << "different frame indexes " << frameIndex0 << " and " << frameIndex1 << endl;
|
||||
|
||||
|
||||
|
||||
length = zmqsocket0->ReceiveData(0, buff0, size/2);
|
||||
length += zmqsocket0->ReceiveData(0, buff1, size/2);
|
||||
irun=fileindex0;
|
||||
sprintf(ofname,"%s_%d.ph",filename0.c_str(),fileindex0);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
mt->pushData(buff);
|
||||
mt->nextThread();
|
||||
mt->popFree(buff);
|
||||
buff0=buff;
|
||||
buff1=buff+48+1280*2;
|
||||
|
||||
nf++;
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef ZMQ
|
||||
|
||||
|
||||
while (mt->isBusy()) {;}
|
||||
image=filter->getImage();
|
||||
if (image) {
|
||||
fout=fopen(ofname,"w");
|
||||
//cout << nf << "*****************" << endl;
|
||||
for (int i=0; i<512; i++) {
|
||||
fprintf(fout,"%d %d\n",i,image[i]);
|
||||
}
|
||||
fclose(fout);;
|
||||
}
|
||||
filter->clearImage();
|
||||
|
||||
|
||||
|
||||
iFrame=-1;
|
||||
}
|
||||
|
||||
filebin0.close();
|
||||
filebin1.close();
|
||||
}
|
||||
else
|
||||
cout << "Could not open file " << fname0<< " or " << fname1 << endl;
|
||||
#endif
|
||||
|
||||
}
|
||||
return NULL;
|
||||
|
||||
|
||||
|
||||
}
|
Reference in New Issue
Block a user