EtienneCmb / visbrain

A multi-purpose GPU-accelerated open-source suite for brain data visualization
http://visbrain.org
Other
242 stars 65 forks source link

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

Open sheyma opened 4 years ago

sheyma commented 4 years ago

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[bot] commented 4 years ago

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%) :arrow_up:

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 commented 4 years ago

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. :

Thank you again !

sheyma commented 4 years ago

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!