Skip to content

GUI fixes: Add escape drawing, disable right-click drag, disable double left-click#1428

Open
mrariden wants to merge 12 commits intomainfrom
gui_click_esc_fixes
Open

GUI fixes: Add escape drawing, disable right-click drag, disable double left-click#1428
mrariden wants to merge 12 commits intomainfrom
gui_click_esc_fixes

Conversation

@mrariden
Copy link
Copy Markdown
Collaborator

@mrariden mrariden commented Apr 3, 2026

  • Add escape drawing by hitting escape key.

  • Disable unused right-click and drag to zoom behavior. This is not needed because other zoom controls exist and right-click to drag occasionally gets in the way of annotation.

  • Disable double left-click to reset the view. This was especially painful when looking at orthoviews in the 3D gui and quickly clicking around to see the orthoviews update.

  • Update docs to describe escape draw behavior

  • GUI testing protocol

  • tests passing

@mrariden
Copy link
Copy Markdown
Collaborator Author

mrariden commented Apr 3, 2026

This would be a good opportunity to de-duplicate the keyPressEvent code that is present in both gui.py and gui3d.py. I would pass the events that can be handled by the parent class up the hierarchy, so the 3D key press code is specific to the 3D GUI.

Done in another PR

@mrariden mrariden requested a review from carsen-stringer April 3, 2026 21:48
@mrariden
Copy link
Copy Markdown
Collaborator Author

mrariden commented Apr 29, 2026

Tests passing on

  • Mac
  • Ubuntu

GUI manual testing:

Image loading

  • Drop image into GUI
  • Load from menu
  • Right/left arrow keys to load next image in folder

Network

  • 'run CPSAM' button works
  • Adjusting parameters & hit return to re-run dynamics
    • Diameter
    • Flow threshold
    • cell probability threshold
    • normalization percentiles
    • niter dynamics
  • User models work

GUI: display

  • Image colors work with drop down and arrow key up/down
  • Display data cycles through flows/cellprob/image/restored with drop down and pg up/down
  • Auto adjust saturation checkbox and sliders work

GUI: mouse/ROIs

  • Right click and draw cell
  • Command/ctrl and click to delete cell
  • Left click and drag to pan
  • Scroll to zoom
  • Number of ROIs updates correctly when add/delete cell
  • Masks/outline can be turned on/off with checkbox and (Z & X)
  • Delete multiple ROIs using region selection works
  • Esc to escape drawing

GUI: menus

  • All File > saving functions work
  • All Edit > functions work
  • Models >
    • Add model and remove model works
    • Train new model, adjusting training params/name works
  • Help menu items appear when clicked

Filtering

  • Sharpen and smooth radius appear correct and make a 'restored' viewer image
  • tile_norm blocksize normalizes images per block
  • Smoothing in 3D works

@mrariden
Copy link
Copy Markdown
Collaborator Author

GUI status is good for merging, there are unrelated issues that should be fixed in other PRs:

  1. Filter button doesn't work when you click it twice. You need to remove the filter and then apply it with different settings.
  2. Click 'auto adjust' saturation doesn't immediately snap to auto adjust.
  3. User trained models are incorrect in drop down

@mrariden
Copy link
Copy Markdown
Collaborator Author

mrariden commented May 8, 2026

Still need to replace the reset view functionality with a new key

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant