mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-12 21:07:13 +02:00
Rx roi (#428)
* roi structure expanded to have ymin and ymax * compile with 'detector roi' * wip * wip, rx_roi, rx_clearroi * wip rxroi * rxroi wip * wip rxroi * merge fix * wip * rx_roi works, impl wip, test * tests in, impl left * wip, rxroi impl * wip, rxroi impl * wip * setrx_Roi works, getrx_roi, wip * rx_roi impl done * wip, rxroi * wip, getrx_roi rxr ports * fix ports * wip * wip * fix positions on server side * wip * numports wip * wip * jungfrau top inner interface row increment * x, y detpos, wip * removed eiger row indices flipping in gui (bottom flipping maintained) * wip * wip, jungfrau numinterfaces2 * jungfrau virtual works * eiger, jungfrau, g2 virtual server works * eiger positions fix, wip * binaries in * minor printout * binaries in * merge fix * merge fix * removing getposition * setrxroi wip * set upto port * get messed, wip * roi multi to module works, wip * wip * roi dont return -1 * added rxroi metadata in master file * added rxroifromshm, not yet in detector * rx roi in gui with box, also for gap pixels (gappixels for jungfrau mess) * fix for segfault in gui with detaching roi box in gui * wip * m3 gui: slave timing modes should be discarded when squashing * fixed m3 virtual data, and fixed counters in gui asthetics * m3 roi works * wip, g2 * wip * handling g225um boards, and showing roi for gainplot as well * udpate python functions * fix for 1d and a2d roi written * fixed actual roi written to file * no virtual hdf5 when handling rx roi * test * minor * binarie in
This commit is contained in:
@ -28,17 +28,18 @@ class DataProcessor : private virtual slsDetectorDefs, public ThreadObject {
|
||||
|
||||
public:
|
||||
DataProcessor(int index, detectorType detectorType, Fifo *fifo,
|
||||
bool *activated, bool *dataStreamEnable,
|
||||
uint32_t *streamingFrequency, uint32_t *streamingTimerInMs,
|
||||
uint32_t *streamingStartFnum, bool *framePadding,
|
||||
std::vector<int> *ctbDbitList, int *ctbDbitOffset,
|
||||
int *ctbAnalogDataBytes);
|
||||
bool *dataStreamEnable, uint32_t *streamingFrequency,
|
||||
uint32_t *streamingTimerInMs, uint32_t *streamingStartFnum,
|
||||
bool *framePadding, std::vector<int> *ctbDbitList,
|
||||
int *ctbDbitOffset, int *ctbAnalogDataBytes);
|
||||
|
||||
~DataProcessor() override;
|
||||
|
||||
bool GetStartedFlag() const;
|
||||
|
||||
void SetFifo(Fifo *f);
|
||||
void SetActivate(bool enable);
|
||||
void SetReceiverROI(ROI roi);
|
||||
void ResetParametersforNewAcquisition();
|
||||
void SetGeneralData(GeneralData *generalData);
|
||||
|
||||
@ -85,7 +86,8 @@ class DataProcessor : private virtual slsDetectorDefs, public ThreadObject {
|
||||
char *, size_t, void *),
|
||||
void *arg);
|
||||
|
||||
/** params: sls_receiver_header pointer, pointer to data, reference to image size */
|
||||
/** params: sls_receiver_header pointer, pointer to data, reference to image
|
||||
* size */
|
||||
void registerCallBackRawDataModifyReady(void (*func)(sls_receiver_header *,
|
||||
char *, size_t &,
|
||||
void *),
|
||||
@ -110,9 +112,8 @@ class DataProcessor : private virtual slsDetectorDefs, public ThreadObject {
|
||||
/**
|
||||
* Process an image popped from fifo,
|
||||
* write to file if fw enabled & update parameters
|
||||
* @returns frame number
|
||||
*/
|
||||
uint64_t ProcessAnImage(char *buf);
|
||||
void ProcessAnImage(char *buf);
|
||||
|
||||
/**
|
||||
* Calls CheckTimer and CheckCount for streaming frequency and timer
|
||||
@ -143,19 +144,24 @@ class DataProcessor : private virtual slsDetectorDefs, public ThreadObject {
|
||||
*/
|
||||
void RearrangeDbitData(char *buf);
|
||||
|
||||
void CropImage(char *buf);
|
||||
|
||||
static const std::string typeName_;
|
||||
|
||||
const GeneralData *generalData_{nullptr};
|
||||
Fifo *fifo_;
|
||||
detectorType detectorType_;
|
||||
bool *dataStreamEnable_;
|
||||
bool *activated_;
|
||||
bool activated_{false};
|
||||
ROI receiverRoi_{};
|
||||
bool receiverRoiEnabled_{false};
|
||||
std::unique_ptr<char[]> completeImageToStreamBeforeCropping;
|
||||
/** if 0, sending random images with a timer */
|
||||
uint32_t *streamingFrequency_;
|
||||
uint32_t *streamingTimerInMs_;
|
||||
uint32_t *streamingStartFnum_;
|
||||
uint32_t currentFreqCount_{0};
|
||||
struct timespec timerbegin_{};
|
||||
struct timespec timerbegin_ {};
|
||||
bool *framePadding_;
|
||||
std::vector<int> *ctbDbitList_;
|
||||
int *ctbDbitOffset_;
|
||||
@ -164,7 +170,6 @@ class DataProcessor : private virtual slsDetectorDefs, public ThreadObject {
|
||||
std::atomic<uint64_t> firstIndex_{0};
|
||||
|
||||
// for statistics
|
||||
/** Number of frames caught */
|
||||
uint64_t numFramesCaught_{0};
|
||||
|
||||
/** Frame Number of latest processed frame number */
|
||||
@ -173,6 +178,8 @@ class DataProcessor : private virtual slsDetectorDefs, public ThreadObject {
|
||||
/** first streamer frame to add frame index in fifo header */
|
||||
bool firstStreamerFrame_{false};
|
||||
|
||||
bool streamCurrentFrame_{false};
|
||||
|
||||
File *dataFile_{nullptr};
|
||||
|
||||
// call back
|
||||
|
Reference in New Issue
Block a user