dclb
June 27, 2023, 2:57pm
1
I would like to be able to adjust the effect size intensity being plotted by z scores using nilearn (using plot_stat_map or something similar). I am hoping to do something similar to what is done in fsleyes described here: https://twitter.com/ten_photos/status/1670507166283845632
Any help would be much appreciated
2 Likes
am even tempted to say that this could potentially be a feature of nilearn
1 Like
dclb
June 30, 2023, 12:18am
4
Thank you for suggesting this
FYI this is now work in progress in Nilearn and should be part of the next release
nilearn:main
← Remi-Gau:enh/3789
opened 08:22AM - 13 Feb 25 UTC
<!---
This is a suggested pull request template for nilearn.
It's designed to … capture information we've found to be useful in reviewing pull requests.
If there is other information that would be helpful to include, please don't hesitate to add it!
Please make sure your pull request also follows the
[contribution guidelines](https://nilearn.github.io/stable/development.html#contribution-guidelines) that
will be enforced during the review process.
-->
<!-- Please indicate after the # which issue you're closing with this PR.
This is helpful for the maintainers AND will magically close the issue when this
pull request is merged!
If the PR closes multiple issues, includes "closes" before each one is listed.
https://help.github.com/articles/closing-issues-using-keywords -->
- Closes #3789
- Clsoes https://github.com/nilearn/nilearn/issues/5149
<!-- Please give a brief overview of what has changed in the PR.
If you're not sure what to write, consider it a note to the maintainers to indicate
what they should be looking for when they review the pull request. -->
Changes proposed in this pull request:
- most volume image plotting should now be able to use transparency and transparency_range
- transparency can be a number or niimg like to do some voxel wise alpha masking
- transparency_range allows to determine the 'vmin' and 'vmax' to threshold that alpha image
- add explicitly transparency and transparency_range to the documented API of plot_glass_brain, plot_img, plot_stat_map.
- other plotting functions can still pass them via their kwargs: consider removing
- not sure about adding it to plot_glass_brain: it may be confusing the plot even more...
## updated examples
## TODO
- [x] document transparency_range in all the doc strings
- [x] update changelog
- [ ] adapt colorbar to show transparency range
- [ ] add tests for plot_glass_brain, plot_stat_map
dclb
February 17, 2025, 9:02pm
6
thanks for the heads up! that’s very exciting to hear