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

Refactor to Remove set_alpha Method and Consolidate Visibility Management Under set_roi_visibility_flags #2342

Open
ashmeigh opened this issue Oct 15, 2024 · 0 comments · May be fixed by #2345

Comments

@ashmeigh
Copy link
Collaborator

Current Behaviour

The current implementation includes both set_alpha and set_roi_visibility_flags for managing the visibility and transparency of ROIs. This issue proposes removing the set_alpha method and consolidating visibility management under set_roi_visibility_flags

The set_alpha method overlaps with set_roi_visibility_flags - ROIs invisible (setting alpha to 0 vs toggling visibility). It adds complexity, and there are two ways to achieve the same result.

Potential Concerns:

Loss of Transparency Control: If semi-transparent ROIs are useful in certain scenarios (setting alpha to 0.5 for partial visibility), removing set_alpha would eliminate this feature.

Pen and Color Management: set_alpha also updates the pen and hoverPen with the new alpha value. By removing it, colour updates will need to be managed elsewhere.

Proposed Solution

Remove set_alpha: Eliminate the set_alpha method, which currently manages ROI transparency by adjusting the alpha value of the pen.

Rely on set_roi_visibility_flags: Use set_roi_visibility_flags to manage visibility entirely, both for toggling visibility and updating handles.

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

Successfully merging a pull request may close this issue.

1 participant