All checks were successful
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 7m51s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 7m19s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 7m46s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 8m32s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 8m6s
Build Packages / build:rpm (rocky8) (push) Successful in 8m7s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 7m37s
Build Packages / Generate python client (push) Successful in 17s
Build Packages / Create release (push) Has been skipped
Build Packages / Build documentation (push) Successful in 32s
Build Packages / build:rpm (rocky9) (push) Successful in 9m6s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 6m53s
Build Packages / Unit tests (push) Successful in 1h9m39s
This is an UNSTABLE release. * jfjoch_viewer: Minor improvements to the viewer * jfjoch_broker: Change behavior for modular detectors: coordinates of 0-th pixel can be now arbitrary and detector will be cropped to the smallest rectangle limited by module coordinates Reviewed-on: #8 Co-authored-by: Filip Leonarski <filip.leonarski@psi.ch> Co-committed-by: Filip Leonarski <filip.leonarski@psi.ch>
41 lines
1.2 KiB
C++
41 lines
1.2 KiB
C++
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
|
|
// SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
#ifndef JUNGFRAUJOCH_DETECTORMODULEGEOMETRY_H
|
|
#define JUNGFRAUJOCH_DETECTORMODULEGEOMETRY_H
|
|
|
|
#include <cstdint>
|
|
#include <cstddef>
|
|
#include "Definitions.h"
|
|
|
|
class DetectorModuleGeometry {
|
|
public:
|
|
enum class Direction {Xneg, Xpos, Yneg, Ypos};
|
|
private:
|
|
int64_t x0;
|
|
int64_t y0;
|
|
|
|
constexpr static const int64_t fast_pixels = CONVERTED_MODULE_COLS;
|
|
constexpr static const int64_t slow_pixels = CONVERTED_MODULE_LINES;
|
|
|
|
Direction fast;
|
|
Direction slow;
|
|
public:
|
|
DetectorModuleGeometry(int64_t x0, int64_t y0, Direction fast, Direction slow);
|
|
[[nodiscard]] int64_t GetMaxX() const;
|
|
[[nodiscard]] int64_t GetMaxY() const;
|
|
[[nodiscard]] int64_t GetMinX() const;
|
|
[[nodiscard]] int64_t GetMinY() const;
|
|
|
|
[[nodiscard]] int64_t GetPixel0_X() const;
|
|
[[nodiscard]] int64_t GetPixel0_Y() const;
|
|
[[nodiscard]] Direction GetSlowAxis() const;
|
|
[[nodiscard]] Direction GetFastAxis() const;
|
|
|
|
void Translate(int64_t x, int64_t y);
|
|
void VerticalFlip(size_t detector_height);
|
|
};
|
|
|
|
|
|
#endif //JUNGFRAUJOCH_DETECTORMODULEGEOMETRY_H
|