wip, fails with master and virtual
All checks were successful
Build on RHEL9 / build (push) Successful in 2m48s
Build on RHEL8 / build (push) Successful in 4m48s

This commit is contained in:
2025-06-25 16:42:33 +02:00
parent 23f8981346
commit 707bf023c6
6 changed files with 158 additions and 114 deletions

View File

@@ -230,6 +230,12 @@ class slsDetectorDefs {
ROI(int xmin, int xmax) : xmin(xmin), xmax(xmax){};
ROI(int xmin, int xmax, int ymin, int ymax)
: xmin(xmin), xmax(xmax), ymin(ymin), ymax(ymax){};
constexpr int width() const {
return (xmax - xmin + 1);
}
constexpr int height() const {
return (ymax - ymin + 1);
}
constexpr std::array<int, 4> getIntArray() const {
return std::array<int, 4>({xmin, xmax, ymin, ymax});
}
@@ -246,6 +252,10 @@ class slsDetectorDefs {
ymin = 0;
ymax = 0;
}
constexpr bool overlap(const ROI & other) const {
return ((xmin <= other.xmax && xmax >= other.xmin) &&
(ymin <= other.ymax && ymax >= other.ymin));
}
constexpr bool operator==(const ROI &other) const {
return ((xmin == other.xmin) && (xmax == other.xmax) &&
(ymin == other.ymin) && (ymax == other.ymax));