Files
Jungfraujoch/frame_serialize/ImageMessage.h
Filip Leonarski 25359f0d60 CBOR: Adjust for DECTRIS stream2 compatibility:
* date/time tag
* initial tag self-described CBOR
* series ID
* fixes to typed array header in case of compression
2023-04-19 12:58:29 +02:00

40 lines
948 B
C++

// Copyright (2019-2022) Paul Scherrer Institute
// SPDX-License-Identifier: GPL-3.0-or-later
#ifndef JUNGFRAUJOCH_IMAGEMESSAGE_H
#define JUNGFRAUJOCH_IMAGEMESSAGE_H
#include <string>
#include <cstdint>
#include <map>
#include <vector>
#include "../compression/CompressionAlgorithmEnum.h"
struct CBORImage {
const uint8_t *data;
size_t size; // Including compression
size_t xpixel;
size_t ypixel;
size_t pixel_depth_bytes;
bool pixel_is_signed;
CompressionAlgorithm algorithm;
std::string channel;
};
struct DataMessage {
int64_t number = INT64_MIN;
CBORImage image;
std::vector<SpotToSave> spots;
std::vector<float> rad_int_profile;
uint64_t indexing_result; // 0 - not tried, 1 - tried and failed, 2 - tried and success
uint64_t bunch_id;
uint32_t jf_info;
uint64_t timestamp;
std::string series_unique_id;
uint64_t series_id;
};
#endif //JUNGFRAUJOCH_IMAGEMESSAGE_H