Viewer: the region of interest belongs to the diffraction view alone
Drawing an ROI only means something where there are detector counts to accumulate. Gate the gesture on a virtual AllowROI(), true only for JFJochDiffractionImage: shift-drag, the resize handles, the hover cursor and the "Clear ROI" context entry now do nothing in the azimuthal, grid-scan and calibration views, which cannot report anything about a box anyway. The statistics move out of the base class into the diffraction view and read the int32 image directly, so no float copy of the detector image is built for them either. With the labels already converted, image_fp is now untouched by the diffraction view, and the lazy EnsurePixelValues machinery it needed is gone. image_fp stays as the base's representation for the views whose data really is float: the azimuthal profile, the grid-scan 1/sigma^2 map, and the calibration viewer's eight source types. Removed with it: the ROI readouts in the calibration and 2D azimuthal windows, which were the only two consumers of roiCalculated -- the diffraction view emitted it and nothing listened. Nothing surfaces ROI statistics now; the pixel-mask case wants rectangles counting excluded pixels and deserves its own design. JFJochViewerROIResult is still used by the side-panel ROI list, so the widget stays. Verified in the GUI: shift-drag in the diffraction view still draws the box, turns it into a named ROI and runs the statistics; fit-view panel remains pixel-identical to the pre-series baseline. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -23,7 +23,6 @@ void JFJochAzIntImage::Clear() {
|
||||
void JFJochAzIntImage::imageLoaded(std::shared_ptr<const JFJochReaderImage> in_image) {
|
||||
if (!in_image) {
|
||||
Clear();
|
||||
CalcROI();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -71,7 +70,6 @@ void JFJochAzIntImage::imageLoaded(std::shared_ptr<const JFJochReaderImage> in_i
|
||||
// Render the image and redraw using base class functionality
|
||||
RenderImage();
|
||||
Redraw();
|
||||
CalcROI();
|
||||
} else {
|
||||
Clear();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user