jfjoch_viewer: ROI can be configured more flexibly

This commit is contained in:
2025-11-05 13:40:12 +01:00
parent a0840f860d
commit 1e255a3ada
12 changed files with 278 additions and 1 deletions
+16
View File
@@ -728,3 +728,19 @@ void JFJochViewerImage::ShowImageMenu(QMouseEvent *event) {
}
}
}
void JFJochViewerImage::SetROIBox(QRect box) {
roi_type = RoiType::RoiBox;
roi_box = box;
roiStartPos = roi_box.topLeft();
roiEndPos = roi_box.bottomRight();
Redraw();
}
void JFJochViewerImage::SetROICircle(double x, double y, double radius) {
roi_type = RoiType::RoiCircle;
roi_box = QRectF(x - radius, y - radius, 2 * radius, 2 * radius).normalized();
roiStartPos = roi_box.topLeft();
roiEndPos = roi_box.bottomRight();
Redraw();
}