31 lines
939 B
C++
31 lines
939 B
C++
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
|
|
// SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
#ifndef JUNGFRAUJOCH_ROIMAP_H
|
|
#define JUNGFRAUJOCH_ROIMAP_H
|
|
|
|
#include <map>
|
|
#include <vector>
|
|
#include <cstdint>
|
|
#include <optional>
|
|
|
|
#include "DetectorSetup.h"
|
|
#include "ROIDefinition.h"
|
|
#include "DiffractionGeometry.h"
|
|
|
|
class ROIMap {
|
|
ROIDefinition rois;
|
|
|
|
static constexpr const size_t roi_limit = 16;
|
|
public:
|
|
void SetROI(const ROIDefinition& input);
|
|
[[nodiscard]] std::vector<uint16_t> GetROIMap(const DiffractionGeometry &geom, size_t width, size_t height) const;
|
|
[[nodiscard]] std::map<std::string, uint16_t> GetROINameMap() const;
|
|
[[nodiscard]] const ROIDefinition& GetROIDefinition() const;
|
|
[[nodiscard]] bool empty() const;
|
|
[[nodiscard]] size_t size() const;
|
|
[[nodiscard]] std::vector<ROIConfig> ExportMetadata() const;
|
|
};
|
|
|
|
#endif //JUNGFRAUJOCH_ROIMAP_H
|