mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-02-10 15:08:40 +01:00
Merge branch 'developer' into dev/multirxr_proper_cleanup_on_ctrlc
This commit is contained in:
@@ -230,6 +230,8 @@ 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});
|
||||
}
|
||||
@@ -237,7 +239,8 @@ class slsDetectorDefs {
|
||||
return (xmin == -1 && xmax == -1 && ymin == -1 && ymax == -1);
|
||||
}
|
||||
constexpr bool noRoi() const {
|
||||
return (xmin == 0 && xmax == 0 && ymin == 0 && ymax == 0);
|
||||
return ((xmin == 0 && xmax == 0) &&
|
||||
((ymin == 0 && ymax == 0) || (ymin == -1 && ymax == -1)));
|
||||
}
|
||||
void setNoRoi() {
|
||||
xmin = 0;
|
||||
@@ -245,6 +248,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));
|
||||
|
||||
@@ -412,6 +412,7 @@ enum detFuncs {
|
||||
F_RECEIVER_SET_COLUMN,
|
||||
F_GET_RECEIVER_DBIT_REORDER,
|
||||
F_SET_RECEIVER_DBIT_REORDER,
|
||||
F_RECEIVER_GET_ROI_METADATA,
|
||||
|
||||
NUM_REC_FUNCTIONS
|
||||
};
|
||||
@@ -820,6 +821,7 @@ const char* getFunctionNameFromEnum(enum detFuncs func) {
|
||||
case F_RECEIVER_SET_COLUMN: return "F_RECEIVER_SET_COLUMN";
|
||||
case F_GET_RECEIVER_DBIT_REORDER: return "F_GET_RECEIVER_DBIT_REORDER";
|
||||
case F_SET_RECEIVER_DBIT_REORDER: return "F_SET_RECEIVER_DBIT_REORDER";
|
||||
case F_RECEIVER_GET_ROI_METADATA: return "F_RECEIVER_GET_ROI_METADATA";
|
||||
|
||||
case NUM_REC_FUNCTIONS: return "NUM_REC_FUNCTIONS";
|
||||
default: return "Unknown Function";
|
||||
|
||||
Reference in New Issue
Block a user