Skip to content
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

download nilearn volumetric data (a stats mao), resample to surf, plot #50

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sheyma
Copy link

@sheyma sheyma commented Sep 17, 2019

Hi Etienne,

this snippet 1) downloads a nifti file from nilearn data set, 2) resamples it on visbrain BrainObj, and 3) plots it in a thresholded fashion .

Nifti can be thought as a statistical map. I plotted values under a threshold (blues) and over another threshold (reds). This figure is displayed after running it:

volToStats_map

Ideally, my purpose was to plot a single colorbar, where areas outside threshold is gray. Like here:
volToStats_map_ideal

But I could not come up with an idea to merge the two colorbars into a single one. Let me know it that would be possible with visbrain!

@codecov
Copy link

codecov bot commented Sep 17, 2019

Codecov Report

Merging #50 into master will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #50      +/-   ##
=========================================
+ Coverage   86.09%   86.1%   +0.01%     
=========================================
  Files         133     133              
  Lines       19496   19496              
  Branches     1514    1514              
=========================================
+ Hits        16786   16788       +2     
+ Misses       2141    2140       -1     
+ Partials      569     568       -1
Impacted Files Coverage Δ
visbrain/utils/mesh.py 93.68% <0%> (+2.1%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e81c5cb...e747054. Read the comment docs.

@EtienneCmb
Copy link
Owner

Hi @sheyma ,

Thanks, this is a really nice PR. I do agree with you that visbrain should be more flexible with colormap definition. I'll try to think about it.

About your PR, could you please format your example i.e. :

  • Rename the file : it should start with plot_* (e.g. plot_fmri_stats_map.py)
  • Add a title + description : see this example

Thank you again !

@sheyma
Copy link
Author

sheyma commented Sep 18, 2019

Hi,
the pull request is updated. Hope that looks fine now.
For sure, this is still a very primitive example of stats mapping. Let's try to build a cool colorbar option here, so that user is much more flexible.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants