mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-11 04:17:15 +02:00
WIP
This commit is contained in:
@ -7,9 +7,13 @@ class SlsQtH1D;
|
||||
class SlsQt2DPlotLayout;
|
||||
class qCloneWidget;
|
||||
|
||||
class QGridLayout;
|
||||
class QGroupBox;
|
||||
class QwtSymbol;
|
||||
|
||||
/*
|
||||
#include "qwt_symbol.h"
|
||||
#include <QGridLayout>
|
||||
|
||||
#include <QGroupBox>
|
||||
#include <QString>
|
||||
#include <QTimer>
|
||||
@ -32,11 +36,13 @@ class qDrawPlot : public QWidget {
|
||||
/** Destructor */
|
||||
~qDrawPlot();
|
||||
|
||||
bool isRunning();
|
||||
bool GetIsRunning();
|
||||
// from measurement tabs
|
||||
int GetProgress();
|
||||
int64_t GetCurrentFrameIndex();
|
||||
int64_t GetCurrentMeasurementIndex();
|
||||
int GetNumMeasurements();
|
||||
void SetNumMeasurements(int val);
|
||||
// from plot tab
|
||||
void Select1dPlot(bool enable);
|
||||
void SetPlotTitlePrefix(QString title);
|
||||
@ -74,6 +80,7 @@ class qDrawPlot : public QWidget {
|
||||
void CloseClones();
|
||||
void SaveClones();
|
||||
void SavePlot();
|
||||
void SetStopSignal();
|
||||
|
||||
|
||||
private slots:
|
||||
@ -93,19 +100,19 @@ class qDrawPlot : public QWidget {
|
||||
int LockLastImageArray();
|
||||
int UnlockLastImageArray();
|
||||
void SetStyle(SlsQtH1D *h);
|
||||
void GetStatistics(double &min, double &max, double &sum, double *array, int size);
|
||||
void GetStatistics(double &min, double &max, double &sum);
|
||||
void DetachHists();
|
||||
void UpdateXYRange();
|
||||
static void GetProgressCallBack(double currentProgress, void *this_pointer);
|
||||
static void GetAcquisitionFinishedCallBack(double currentProgress, int detectorStatus, void *this_pointer);
|
||||
static void GetMeasurementFinishedCallBack(int currentMeasurementIndex, void *this_pointer);
|
||||
static void GetDataCallBack(detectorData *data, uint64_t frameIndex, uint32_t subFrameIndex, void *this_pointer);
|
||||
void AcquisitionFinished(double currentProgress, int detectorStatus);
|
||||
void MeasurementFinished(int currentMeasurementIndex);
|
||||
void GetData(detectorData *data, uint64_t frameIndex, uint32_t subFrameIndex);
|
||||
void toDoublePixelData(double *dest, char *source, int size, int databytes, int dr, double *gaindest = NULL);
|
||||
void UpdatePlot();
|
||||
|
||||
void Update1dPlot(double* rawData);
|
||||
void Update2dPlot(double* rawData, double* gainData);
|
||||
void Update1dXYRange();
|
||||
void Update2dXYRange();
|
||||
|
||||
static const int NUM_PEDESTAL_FRAMES = 20;
|
||||
multiSlsDetector *myDet;
|
||||
slsDetectorDefs::detectorType detType;
|
||||
@ -123,7 +130,7 @@ class qDrawPlot : public QWidget {
|
||||
bool isRunning{false};
|
||||
|
||||
// titles
|
||||
QString plotTitle_prefix{""};
|
||||
QString plotTitlePrefix{""};
|
||||
QLabel *lblFrameIndexTitle1d{nullptr};
|
||||
QString xTitle1d{"Channel Number"};
|
||||
QString yTitle1d{"Counts"};
|
||||
@ -138,11 +145,11 @@ class qDrawPlot : public QWidget {
|
||||
unsigned int nHists{1};
|
||||
double *datax1d{nullptr};
|
||||
std::vector<double *> datay1d;
|
||||
double *data2d{nullptr};
|
||||
double *data2d;
|
||||
|
||||
//options
|
||||
bool plotEnable{true};
|
||||
bool binary{false};
|
||||
bool isPlot{true};
|
||||
bool isBinary{false};
|
||||
int binaryFrom{0};
|
||||
int binaryTo{0};
|
||||
int persistency{0};
|
||||
@ -151,12 +158,12 @@ class qDrawPlot : public QWidget {
|
||||
bool isMarkers{false};
|
||||
QwtSymbol *marker{nullptr};
|
||||
QwtSymbol *noMarker{nullptr};
|
||||
bool pedestal{false};
|
||||
bool isPedestal{false};
|
||||
double *pedestalVals{nullptr};
|
||||
double *tempPedestalVals{nullptr};
|
||||
int pedestalCount{0};
|
||||
bool startPedestalCal{false};
|
||||
bool accumulate{false};
|
||||
bool resetPedestal{false};
|
||||
bool isAccumulate{false};
|
||||
bool resetAccumulate{false};
|
||||
QWidget *widgetStatistics{nullptr};
|
||||
QLabel *lblMinDisp{nullptr};
|
||||
@ -166,23 +173,18 @@ class qDrawPlot : public QWidget {
|
||||
std::vector<qCloneWidget *> cloneWidgets;
|
||||
QString fileSavePath{"/tmp"};
|
||||
QString fileSaveName{"Image"};
|
||||
double *gainImage{nullptr};
|
||||
bool gainDataExtracted{false};
|
||||
bool gainDataEnable{false};
|
||||
|
||||
unsigned int nPixelsX{0};
|
||||
unsigned int nPixelsY{0};
|
||||
double minPixelsY{0};
|
||||
double maxPixelsY{0};
|
||||
double startPixel{0};
|
||||
double endPixel{0};
|
||||
double pixelWidth{0};
|
||||
bool isGainDataExtracted{false};
|
||||
bool hasGainData{false};
|
||||
|
||||
int progress{0};
|
||||
int64_t currentMeasurement{0};
|
||||
int64_t currentFrame{0};
|
||||
pthread_mutex_t lastImageCompleteMutex;
|
||||
bool hasStopped{false};
|
||||
int numMeasurements{0};
|
||||
|
||||
unsigned int nPixelsX{0};
|
||||
unsigned int nPixelsY{0};
|
||||
const static int npixelsx_jctb = 400;
|
||||
int npixelsy_jctb{0};
|
||||
};
|
||||
|
Reference in New Issue
Block a user