-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Issue: Add preview pane with visual interface to improve crop UX
Summary
-
Add preview pane that can show one or more visual interfaces for viewing input scan images and determining 3D reconstruction region limits.
-
Proposed cropping interfaces
- View 1: Side view axial rotation via adjustable slider from perspective of the detector with crop window overlay. No other view is required to set crop parameters for X, Y, and Z axis.
- View 2: Top view resizable translucent circular FOV mask overlay. May require a preliminary low resolution 3D reconstruction. Requires a secondary view to define z axis cropping.
-
Proposing that the visual interface can set any of the following 3D reconstruction volume limiting parameters:
- X, Y and Z sample count (set_numX, set_numY, set_numZ)
- Circular FOV mask (set_diameterFOV)
- XYZ offset (set_offsetX, set_offsetY, set_offsetZ)
What to implement:
-
Preview pane to hold side and top views
-
Side view:
- Image display + crop overlay (drag/resize rectangle) + input image slider.
- Mapped x,y,w,h (px) readout
- Example for side view crop UI
-
Top view:
- Produce a small, fast reconstruction (downsampled) to obtain a top view image.
- Able to select one of the following crop overlays
- Resizable translucent circular FOV mask overlay
- Circular mask diameter (mm) readout.
- Drag/resize rectangle
-
Checkbox settings:
- Select which volume limiting parameters to update when crop is applied. Chose between the following
- X sample count and offset
- Y sample count and offset
- Z sample count and offset
- Circular FOV mask (set_diameterFOV) and offset (set_offsetX, set_offsetY)
- Select which volume limiting parameters to update when crop is applied. Chose between the following
-
Buttons: Apply Crop.
-
On Apply Crop:
- Map crop overlay to selected volume limiting parameters.
Why:
- Improves user confidence and reduces errors by letting operators visually select the 3D reconstruction region rather than guessing numeric grid and offset values.
- Speeds workflow: a visual crop maps directly to LEAP's setters (set_numX/Y/Z, set_offsetX/Y/Z, set_diameterFOV), removing manual conversion.
- Reduces compute and/or memory waste by encouraging tight grid bounds or FOV masks before a full reconstruction is completed.
- Low-risk: reuses existing parameter setters. No changes to core LEAP reconstruction implementation required.
Acceptance criteria
-
UI elements
- A preview pane exists in leapctrails/leapctrails.py with two sub-views: Side view (image slider + rectangular crop overlay) and Top view (small downsampled reconstruction + resizable circular FOV overlay).
- Checkboxes are present to select which parameters to update on apply: X count, Y count, Z count, circular FOV.
- An Apply Crop button is present and enabled when at least one parameter checkbox is selected.
-
Side view behavior
- The side view shows input projections and supports dragging/resizing a rectangular overlay.
- A numeric readout displays:
- mapped x,y,w,h in detector pixels
- circular FOV diameter and offset computed from the vertical crop lines
- XYZ sample counts and offsets
-
Top view behavior
- The top view shows a quick low-resolution reconstruction (downsampled) of the scan volume sufficient to place a circular mask.
- If selected, a translucent circular overlay is resizable and displays current diameter in mm. Alternatively, show standard drag/resizable crop rectangle overlay.
-
Mapping & wiring
- On Apply Crop, the UI maps the selected overlays to the corresponding LEAP API calls:
- Rectangle crop
- Computed numX/numY/numZ and offsetX/offsetY/offsetZ where checkboxes selected.
- Computed FOV mask set_diameterFOV(d_mm) and set_offsetX/Y() in place of numX/numY if checkbox selected.
- Circle mask crop
- call set_diameterFOV(d_mm) and set_offsetX/Y() to center the FOV.
- Rectangle crop
- Implementation must use existing methods to set params
- On Apply Crop, the UI maps the selected overlays to the corresponding LEAP API calls:
Files / entry points to change (where to implement)
- leapctrails/leapctrails.py — add preview readout, toggle, crop UI elements, and wiring for Apply.
- leapctrails/ct_volume_page.py — use existing push_numX/push_numY/push_numZ/ set_diameterFOV and offset push methods to set limits.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels