-
Notifications
You must be signed in to change notification settings - Fork 94
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
Use nearest-neighbors interpolation in plot_component
#1098
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1098 +/- ##
=======================================
Coverage 89.91% 89.91%
=======================================
Files 26 26
Lines 3621 3621
Branches 629 629
=======================================
Hits 3256 3256
Misses 214 214
Partials 151 151 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the three times vmin
is set to the 2nd percentile, you would not need to set resampling_interpolation="nearest"
and "continuous" will result in nicer looking images.
For the one situation where vmin
isn't set, setting vmin=np.min(stat_img.get_fdata())
might give slightly nicer visualizations, but setting interpolation to "nearest" is also fine.
plot_stat_map
callsplot_component
Good point. I dropped the change for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I also realized my suggestion for adding vmin
to stat_map figures is a bit more complex, since there are positive & negative values. It is solvable, but this solution is fine.
Yeah we'd need to use |
I'd like to make a release with this change before we merging #1064. @handwerkerd any objections? |
Closes #1095.
Changes proposed in this pull request:
plot_component
'splot_stat_map
call. This should stop non-diagonal images from being resampled to have low, non-zero values outside of the brain.