- Notifications
You must be signed in to change notification settings - Fork145
Fix get_3d_peaks when using mask#455
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Open
aperezlebel wants to merge1 commit intonipy:mainChoose a base branch fromaperezlebel:fix-mask-3d-peaks
base:main
Could not load branches
Branch not found:{{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline, and old review comments may become outdated.
Open
Uh oh!
There was an error while loading.Please reload this page.
Conversation
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
xyz must be of shape n*3 to be used by wgraph_from_3d_grid, hence the use of the 3D mask array instead of the 1D ravelled mask array in np.where
Ok ! Bien vu - le mieux serait de simuler les cartes d’activation et defaire tourner le pipelinePrends du temps avec ta famille demain!JB …On Thu, Aug 22, 2019 at 12:36 PM Alexandre PEREZ ***@***.***> wrote: Issue The get_3d_peaks function from nipy.labs.statistical_mapping throws an error when using it with a mask. Minimal reproductible example from nilearn import datasets, masking, imagefrom nipy.labs.statistical_mapping import get_3d_peaks template = datasets.load_mni152_template() mask = masking.compute_gray_matter_mask(template) imgs = datasets.fetch_neurovault_motor_task() img = image.resample_to_img(imgs.images[0], template) get_3d_peaks(img, mask=mask) Error Traceback (most recent call last): File "minimal.py", line 10, in <module> get_3d_peaks(img, mask=mask) File ".../venv/lib/python3.7/site-packages/nipy/labs/statistical_mapping.py", line 199, in get_3d_peaks ff = field_from_graph_and_data(wgraph_from_3d_grid(xyz, k=18), data) File ".../venv/lib/python3.7/site-packages/nipy/algorithms/graph/graph.py", line 527, in wgraph_from_3d_grid raise ValueError('xyz should have shape n * 3') ValueError: xyz should have shape n * 3 Versions nipy==0.4.2 nilearn==0.5.2 Fix xyz must be of shape n*3 to be used by wgraph_from_3d_grid, hence the use of the 3D mask array instead of the 1D ravelled mask array in np.where. ------------------------------ You can view, comment on, or merge this pull request online at:#455 Commit Summary - Fix get_3d_peaks when using mask File Changes - *M* nipy/labs/statistical_mapping.py <https://github.com/nipy/nipy/pull/455/files#diff-0> (2) Patch Links: -https://github.com/nipy/nipy/pull/455.patch -https://github.com/nipy/nipy/pull/455.diff — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#455?email_source=notifications&email_token=AACDE2HUZR4HW2YBFRIGYQDQF26A3A5CNFSM4IOXAHX2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HG2YWJA>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AACDE2EK2BIFP4GC7CWOK3LQF26A3ANCNFSM4IOXAHXQ> . |
Hi, any news ? |
I'm very very sorry to be so slow here - but can you think of a test for this fix? I will honestly get to this very quickly, if you do still have interest. |
No problem! I am not working on this anymore but I can try to have a look in the following weeks. |
That would be kind. I'm very sorry for the delay. |
Sign up for freeto 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.
Issue
The
get_3d_peaks
function fromnipy.labs.statistical_mapping
throws an error when using it with a mask.Minimal reproductible example
Error
Versions
Fix
xyz
must be of shape n*3 to be used bywgraph_from_3d_grid
, hence the use of the 3D mask array instead of the 1D ravelled mask array innp.where
.