-
Notifications
You must be signed in to change notification settings - Fork 138
Widget for drawing Regions of Interest (ROIs) as napari Shapes #617
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
92 commits
Select commit
Hold shift + click to select a range
eadab7d
added empty ROI widget
niksirbi ae445fc
added a basic ROI table connected to a shapes layer
niksirbi ce6aa1b
Basic Model/View implementation of an ROI table
niksirbi 7f92b48
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] b6c7c6e
display auto-assigned ROI names as text
niksirbi 13ccf15
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 607193f
deal with some pre-commit issues
niksirbi 57223ad
clarify when and how ROI names are updated
niksirbi 331cf2b
handle multiple ROI layers, each with its own table
niksirbi 8ad14c5
reorganised roi_widget.py in a more logical structure
niksirbi 3b68834
use groupboxes and tooltips
niksirbi 8fd1360
select napari shape when correspodning table row is selected
niksirbi 1fd13de
ability to edit ROI names in table
niksirbi a70a048
tweaked lables for layer dropdown, button and tooltip
niksirbi a0bf5bf
handle case whare shapes are created before proper layer name is given
niksirbi 2995d76
Define a class for ROI styles
niksirbi ea56e47
reorganised code in rois_widget.py
niksirbi fbcf41b
assign a color style to each ROIs layer
niksirbi 3f92be3
reworded tooltip for layer controls
niksirbi ef1c886
clarify difference between boxes and rois layer styles
niksirbi be8b2bf
Fix bug in RoisStyle.color_all_shapes that set layer.text to None
niksirbi 51e61f5
Fix AttributeError when disconnecting signals from deleted layer
niksirbi 7abbc01
Fix memory leaks from uncleaned signal connections
niksirbi 2107bd1
Fix auto-naming for multiple shapes added simultaneously
niksirbi 09dd6de
Use metadata and case-insensitive matching for ROI layer detection
niksirbi 8dc842d
Fix handling of empty/None names in _auto_assign_roi_names
niksirbi 09d7269
Remove redundant max_layers parameter
niksirbi 5cfaccb
Add comment explaining ValueError suppression in name parsing
niksirbi 99a7c8d
Use deterministic hash for ROI layer color assignment
niksirbi bc8f010
Add tests for RoisStyle color methods achieving 100% coverage
niksirbi 106f743
Add contextual tooltips to ROIs table view
niksirbi dfa0348
Use sequential colors for default ROI layer names
niksirbi 4fdc508
Fix ValidationError when adding empty shapes layer
niksirbi b21cd51
Harmonise docstrings across rois_widget.py file
niksirbi cc77cb4
Move _update_roi_names to module-level function
niksirbi 3055915
first draft of tests for roi widget
niksirbi f5801d9
WIP refactoring tests
niksirbi 041df13
Refactor ROIs widget tests: flatten classes and use parametrization
niksirbi 6a63d0c
remove overly defensive trimming
niksirbi 14766e7
Enforce unique ROI names within each layer
niksirbi f932310
Use "Un-named" as the default ROI name in the widget
niksirbi 16de977
Rename ROI to Region in napari widget
niksirbi c355eb9
Handle copy-paste via set_data event and preserve copied names
niksirbi 81862b0
Fix test_add_empty_shapes_layer to cover max_frame_idx < 0 branch
niksirbi afdfde6
Improve test coverage for RegionsWidget and mark unreachable code
niksirbi 63e41eb
Apply testing suggestions from code review
niksirbi 85403c5
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 52a5eab
fix pre-commit issues in tests
niksirbi 7de2d12
Simplify test fixtures and fix bugs in test_regions_widget
niksirbi 00b1ad6
Remove unreachable invalid-index guard in color_current_shape
niksirbi 387d459
Improve color manage hash tests
niksirbi 94541a0
Rename color_current_shape and color_all_shapes for clarity
niksirbi a27128b
remove feature details from module-level and class-level docstrings
niksirbi 0b057a5
Define DROPDOWN_PLACEHOLDER constant and update placeholder text
niksirbi df0b77a
rename methods for UI layout setup
niksirbi 39e2003
Combine tooltip tests into one parametrized test
niksirbi 0153987
Combine stale index tests into one parametrized test
niksirbi a1d5372
clarify that 'model' refers to table model in test names
niksirbi f85c3c7
Claridy some test fixture docstrings
niksirbi 02781a3
Reuse regions_widget fixture in regions_widget_with_layer
niksirbi 4ccdc67
Filter empty layers upfront in _update_frame_slider_range
niksirbi 0d20f60
Added clarifying comments to test_auto_assign_names_pads_missing_name…
niksirbi 51ce0e5
Refactor test_table_model_data_returns_correct_values
niksirbi edd2873
Assert prior state in test_table_model_with_stale_index
niksirbi ffd962b
removed parameter types in docstring following rebase
niksirbi c2ea24b
Add bidirectional shape-table row selection sync in RegionsWidget
niksirbi 46d9478
Sync dropdown and table when region layer selected in napari layer list
niksirbi e8ea69e
Can no longer create a 'movement regions layer' through renaming
niksirbi b6d993e
Auto-assign unique names to regions
niksirbi 1c9fab9
text visibility is off by default
niksirbi 15c23fd
Simplify colour management for regions layers
niksirbi 232ba5c
WIP tether text colour to edge colour
niksirbi 2e8cde7
Refactored tests for the draw-delete-redraw workflow on shapes
niksirbi 6331e26
remove redundant methods and comments
niksirbi 4bbe922
Add tests for invalid index guards in table model
niksirbi f51ffb7
Apply layer opacity in set_color_all_shapes
niksirbi 93d1c40
fix sonarcloud issues
niksirbi 759153c
Adde napari plugin development guidelines including model/view
niksirbi 9700767
make layer and regions names lowercase
niksirbi e9471fb
Draft user guide for regions widget
niksirbi e2b7858
Added new widget screenshots and updated existing GUI screenshots
niksirbi 066742b
Fix drawn shapes inheriting name from selected shape
niksirbi 40e351f
use 'regions layer' (plural) in user guide
niksirbi 7d94e35
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] fc3a86f
Apply suggestions from code review
niksirbi 53a78be
clarify terminology about regions layers
niksirbi 8e4c170
add links to qt6 classes
niksirbi 8b2fc5b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 16f4051
update regions screenshots in GUI guide
niksirbi c6f1d94
use underscores to uniquify region names
niksirbi e946e09
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 3c2c303
fix link to movement/napari folder on github
niksirbi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.