Commit Graph

7 Commits

Author SHA1 Message Date
leonarski_f e60b42ea83 viewer: white, compact, right-aligned ROI numeric fields
The ROI bound editors now have a white background, a capped width and
right-aligned text, which reads better for numeric entry.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 16:01:13 +02:00
leonarski_f abc1d1c079 viewer: add/subtract the selected ROI to/from the user mask
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Failing after 3m45s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Failing after 3m44s
Build Packages / build:rpm (rocky8_nocuda) (push) Failing after 3m50s
Build Packages / build:rpm (rocky8_sls9) (push) Failing after 3m45s
Build Packages / build:rpm (rocky8) (push) Failing after 3m46s
Build Packages / build:rpm (rocky9_nocuda) (push) Failing after 4m0s
Build Packages / build:rpm (rocky9_sls9) (push) Failing after 3m56s
Build Packages / build:rpm (ubuntu2204) (push) Failing after 3m5s
Build Packages / build:rpm (ubuntu2404) (push) Failing after 3m7s
Build Packages / build:rpm (rocky9) (push) Failing after 3m12s
Build Packages / Create release (push) Skipped
Build Packages / Build documentation (push) Failing after 21s
Build Packages / Generate python client (push) Successful in 31s
Build Packages / XDS test (durin plugin) (push) Successful in 5m53s
Build Packages / XDS test (neggia plugin) (push) Successful in 6m12s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 6m54s
Build Packages / DIALS test (push) Successful in 8m46s
Build Packages / Unit tests (push) Successful in 48m22s
Restore the ROI-to-mask action on the new list: "Add to mask" and
"Subtract from mask" buttons rasterise the selected ROI into the user
mask (set or clear), through the same UpdateUserMask_i path. The ROI is
evaluated with per-pixel resolution and phi from the geometry, so box,
circle and azimuthal (sector) ROIs all map correctly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 15:08:59 +02:00
leonarski_f b2c60dfbd0 viewer: download/upload ROIs to the broker
Add Download and "Upload to server" buttons to the ROI panel. The HTTP
reader gains GetROIDefinitions (GET /config/roi) and UploadROIDefinitions
(PUT /config/roi), converting between ROIDefinition and the generated
Roi_definitions model (including the optional azimuthal phi sector), the
same shapes OpenAPIConvert uses on the server. Download applies the
fetched ROIs through SetROIDefinition; upload pushes the current ones.
Both are no-ops unless the viewer is connected to a broker.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 14:47:10 +02:00
leonarski_f 1d015145a4 viewer: numeric editing of the selected ROI's bounds
The ROI panel now shows editable numeric fields for the selected ROI,
labelled by type: box min/max X/Y, circle centre/radius, or azimuthal
Q-range and phi sector. Editing a field rebuilds that ROI and commits it
through the same SetROIDefinition path, so all three types can be created
(via +) and dialled in by typing, not only by dragging.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 14:24:57 +02:00
leonarski_f d9dfd36413 viewer: click to select an ROI, with live move and a hand cursor
Clicking a box/circle on the image now selects it (syncing the side-panel
combobox) and grabs it for moving, with a closed-hand cursor during the
drag. The move recomputes ROI statistics live rather than only on release,
throttled to at most one in-flight recompute so the worker is not flooded.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 13:56:09 +02:00
leonarski_f e49a908862 viewer: ROI panel refinements — persist edits, combobox, compact toggles
- Edited ROIs now override the file's for every subsequently loaded image
  and survive settings changes, until a new file is opened (previously a
  delete/add was lost on the next image). Tracked via an roi_override_ that
  is re-applied to curr_experiment and to each loaded image's dataset.
- The ROI selector is a compact combobox instead of a list widget.
- "Show labels" and "Translucent fill" share one row to save space.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 13:56:09 +02:00
leonarski_f 2f8d486b51 viewer: ROI list panel — select, add, rename, delete, per-ROI results
Add JFJochViewerROIList to the side panel: a list of the dataset's ROIs
with selection, add (box/circle/azimuthal), rename and delete, plus a
statistics readout (sum/mean/std/max/valid/masked/centre-of-mass) for the
selected ROI, taken from the analysis output for the current image. Edits
emit a full ROIDefinition, routed to the worker's SetROIDefinition.

Per-ROI statistics now live in this panel rather than the canvas labels;
the diffraction image's labels show only the ROI name, and the ad-hoc
ROIIntegrationCPU computation there is removed in favour of the analysis
pipeline. The result widget now reports std dev instead of variance.

The single-ROI scratch panel remains for now and will be retired once the
interactive canvas editing replaces it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 13:56:09 +02:00