mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-02-10 15:08:40 +01:00
wip, fails with master and virtual
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user