jfjoch_viewer: ROI can be configured more flexibly
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user