-
Notifications
You must be signed in to change notification settings - Fork 11
Closed
Closed
Copy link
Labels
bugSomething isn't workingSomething isn't working
Description
Separate plot windows don't use same aspect ratio configuration as integrated plot
Description
When using non-uniform coordinates on images, the aspect ratio is correctly configured in the integrated plot handler (aspect ratio is unlocked to allow proper display). However, this configuration was not being applied to separate plotting windows such as:
- "View in a new window" feature
- ROI Editor dialogs
- ROI Grid Editor
- Profile extraction dialogs
- Image background selection dialog
This caused images with non-uniform coordinates to display incorrectly in these separate windows.
Root Cause
The ImagePlotHandler.get_plot_options() method was not including the aspect_ratio and lock_aspect_ratio settings from the current plot configuration. These settings are dynamically determined based on whether the displayed images use uniform or non-uniform coordinates.
Solution
- Updated
ImagePlotHandler.get_plot_options()to include the current aspect ratio and lock status from the plot - Updated
ImageBackgroundDialogto accept plot options as a parameter - Updated callers (
compute_offset_correction,create_roi_grid) to pass plot options to the dialogs
Files Changed
datalab/gui/plothandler.py- Added aspect ratio settings toget_plot_options()datalab/widgets/imagebackground.py- Addedoptionsparameter to constructordatalab/gui/processor/image.py- Pass plot options toImageBackgroundDialogandImageGridROIEditor
Testing
- All existing image tests pass
- Tested with non-uniform coordinate images in separate windows
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working