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
[ENH] Set appropriate cut coordinates for NiftiLabelsMasker reports #4099
Conversation
👋 @ymzayek Thanks for creating a PR! Until this PR is ready for review, you can include the [WIP] tag in its title, or leave it as a github draft. Please make sure it is compliant with our contributing guidelines. In particular, be sure it checks the boxes listed below.
For new features:
For bug fixes:
We will review it as quick as possible, feel free to ping us with questions if needed. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4099 +/- ##
==========================================
- Coverage 91.84% 91.80% -0.05%
==========================================
Files 144 144
Lines 16223 16224 +1
Branches 3377 3377
==========================================
- Hits 14900 14894 -6
- Misses 781 790 +9
+ Partials 542 540 -2 Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
A quick example showing the same cut coords with an without passing func image: # %%
from nilearn.maskers import NiftiLabelsMasker
from nilearn import datasets
from nilearn.image import load_img
from nilearn._utils import data_gen
import numpy as np
data = datasets.fetch_development_fmri(n_subjects=1)
data = load_img(data["func"][0])
atlas = data_gen.generate_labeled_regions(
(13, 11, 12), affine=np.eye(4), n_regions=5
)
masker = NiftiLabelsMasker(atlas)
masker.fit()
report = masker.generate_report()
report
#%%
masker.fit(data)
report = masker.generate_report()
report |
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, thx.
d3efa2e
to
aa311b1
Compare
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.
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.
good with me
Thanks merging |
NiftiLabelsMasker
reports use appropriate cut coordinates #3116NiftiLabelsMasker
reports use appropriate cut coordinates #3116