Add alpha transparency parameter to 3D heatmaps#115
Open
AdityaGupta716 wants to merge 1 commit intobrainglobe:mainfrom
Open
Add alpha transparency parameter to 3D heatmaps#115AdityaGupta716 wants to merge 1 commit intobrainglobe:mainfrom
AdityaGupta716 wants to merge 1 commit intobrainglobe:mainfrom
Conversation
Author
|
@adamltyson Hi, — this pr adds alpha as a parameter supporting both a global float and a per-region dict mapping region acronyms to individual values. Happy to get feedback! EDIT -- The issue showed a single global alpha value. I also added per-region dict support (e.g. alpha={"HIP": 0.3, "TH": 0.8}) since the original image.sc thread had users asking for region-specific transparency control. let me know if you'd like to scope it down to global float only. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #115 +/- ##
==========================================
- Coverage 69.63% 68.91% -0.72%
==========================================
Files 5 5
Lines 326 341 +15
==========================================
+ Hits 227 235 +8
- Misses 99 106 +7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
65ec89e to
e6ef82a
Compare
98fc4ff to
f52760a
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #101
Summary
Adds an
alphaparameter toHeatmap.__init__()so users can controlbrain region transparency in 3D format directly, without manually
accessing brainrender actors.
Usage
Global alpha (all regions):
Per-region alpha:
Changes
brainglobe_heatmap/heatmaps.py— newalphaparameter with validationtests/test_unit/test_alpha.py— unit and integration testsexamples/heatmap_3d_alpha.py— new exampleNotes
Noneby default — fully backwards compatible