Skip to content
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

2285 Crop Coordinates Operation Window: Restrict ROI MaxBounds and Handle Dialog Window Closure #2302

Merged
merged 7 commits into from
Aug 9, 2024

Conversation

JackEAllen
Copy link
Collaborator

Issue

Closes #2285

Description

Add a description of the changes made.

  • Prevent ROI from extending outside of Image stack bounds
  • Resolve dialog window closure persistence on parent, operations window closure.

Testing

Describe the tests that were used to verify your changes.

  • Update tests to reflect changes made to use image stack size in ROI initialiser instead of fixed values of 200
  • Manually tested trying to get ROI to be larger than image stack bounds
  • Self-validated no error messages are present post applying crop to stack and all stacks
  • Self-validated that closing the operations window when the crop-coordinates dialog window is open, also closes dialog crop-coordinate dialog window

Acceptance Criteria

How should the reviewer test your changes?

  • No ROI warning post crop
  • ROI can't be resized larger than image stack
  • ROI does not initialise post crop on a second crop outside ROI bounds
  • ROI dialog window closes if the parent operations window is closed
  • Tests pass

Documentation

How have you changed the documentation to reflect your changes? All changes should be noted in the appropriate file in docs/release_notes

docs/release_notes/next/fix-2285-crop-coord-stack-bounds

@JackEAllen JackEAllen self-assigned this Aug 2, 2024
@coveralls
Copy link

coveralls commented Aug 2, 2024

Coverage Status

coverage: 74.301% (-0.02%) from 74.316%
when pulling b074c81 on 2285_crop_coord_stack_bounds
into 79a43a1 on main.

@JackEAllen JackEAllen force-pushed the 2285_crop_coord_stack_bounds branch from dcf0f5a to a5fcf44 Compare August 5, 2024 08:53
@JackEAllen JackEAllen marked this pull request as ready for review August 5, 2024 09:19
Copy link
Collaborator

@samtygier-stfc samtygier-stfc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of small tweaks

mantidimaging/gui/windows/operations/view.py Outdated Show resolved Hide resolved
mantidimaging/gui/windows/operations/presenter.py Outdated Show resolved Hide resolved
@samtygier-stfc
Copy link
Collaborator

Also in mantidimaging/gui/test/gui_system_operations_test.py can 'Error applying filter for preview... be removed from ALLOWED_ERRORS now?

@JackEAllen JackEAllen force-pushed the 2285_crop_coord_stack_bounds branch from a5fcf44 to b074c81 Compare August 8, 2024 16:20
@samtygier-stfc
Copy link
Collaborator

All working well. Looks good.

@samtygier-stfc samtygier-stfc added this pull request to the merge queue Aug 9, 2024
Merged via the queue into main with commit ed6cdc8 Aug 9, 2024
8 checks passed
@samtygier-stfc samtygier-stfc deleted the 2285_crop_coord_stack_bounds branch August 9, 2024 08:20
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.

Operations Window: Crop Coordinates ROI Coordinates Can Be larger than Selected Stack
3 participants