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

Toggle mask boundaries #1653

Merged
merged 14 commits into from
Mar 1, 2024
Merged

Toggle mask boundaries #1653

merged 14 commits into from
Mar 1, 2024

Conversation

bnmajor
Copy link
Collaborator

@bnmajor bnmajor commented Jan 24, 2024

This branch allows users to view a boundary of a masked region (polygon/rectangle/ellipse) instead of/in addition to masking the actual data.

Based on previous discussion and the open issue, the last remaining tasks for this branch are:

  • Add support for setting boundary styling
    - [ ] Do not use intensities in Azimuthal lineout if boundary is visible (even if image values are not being masked)(comment)

Fixes #1373

@pep8speaks
Copy link

pep8speaks commented Jan 24, 2024

Hello @bnmajor! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2024-03-01 19:52:53 UTC

@bnmajor bnmajor mentioned this pull request Jan 24, 2024
@bnmajor bnmajor force-pushed the toggle-mask-boundaries branch from 8ab6c43 to d81d1ea Compare January 24, 2024 16:37
@bnmajor bnmajor marked this pull request as draft January 24, 2024 16:46
@bnmajor bnmajor force-pushed the toggle-mask-boundaries branch from 66fbe14 to 7899cfb Compare February 16, 2024 15:14
@bnmajor
Copy link
Collaborator Author

bnmajor commented Feb 16, 2024

After further discussion with @psavery and @saransh13 this branch has few further updates:

  • The MaskManger UI has been updated to be easier to understand
    toggle_mask_bounds
    updated to be easier to understand
  • Any time that we create/update the polar image we now create/update two: one that represents the image to display, one that represents the data to use computationally
  • In places where we retrieve the image for display (stereo plot, polar plot, azimuthal lineout) we grab the display image. Everywhere else we grab the "old" image data (now the computational image).
  • Image differences:
    • Computation: Applies all masks to intensity values - "visible" and "boundary"
    • Presentation: Only applies "visible" masks to intensity values. Draws applied boundaries.

Include a column to support toggling mask boundaries for applicable masks.

Signed-off-by: Brianna Major <[email protected]>
@bnmajor bnmajor force-pushed the toggle-mask-boundaries branch from 7899cfb to b84e7f5 Compare February 16, 2024 15:27
One copy is used internally for computations and applies all masks - "visible"
and "boundary". The other is the display image and is used for the generated
images (polar, stereo, azimuthal lineout). The display image only applies the
"visible" masks and "boundary" masks are only drawn on top of the image.

Signed-off-by: Brianna Major <[email protected]>
@bnmajor bnmajor force-pushed the toggle-mask-boundaries branch from b84e7f5 to 99cafe6 Compare February 26, 2024 19:55
@bnmajor bnmajor marked this pull request as ready for review February 28, 2024 14:29
@bnmajor bnmajor force-pushed the toggle-mask-boundaries branch from 8fae574 to b8a91c9 Compare February 28, 2024 14:45
psavery added 3 commits March 1, 2024 11:47
It doesn't apply anyways to the raw view.

Signed-off-by: Patrick Avery <[email protected]>
Signed-off-by: Patrick Avery <[email protected]>
@psavery psavery force-pushed the toggle-mask-boundaries branch from 457d9b1 to 1a20650 Compare March 1, 2024 19:11
bnmajor and others added 3 commits March 1, 2024 14:41
They were only applying the visible masks before. Now they are applying
both visible and boundary masks.

Signed-off-by: Patrick Avery <[email protected]>
@psavery psavery merged commit fc8b793 into HEXRD:master Mar 1, 2024
9 checks passed
@psavery psavery deleted the toggle-mask-boundaries branch March 1, 2024 20:22
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.

Display (toggle) outlines of masked region
3 participants