Visualize Glass Brain


In [1]:
%matplotlib inline

1. Upload all statistical maps into the data folder

The data folder can be found in the same folder as this notebook. Just drag and drop your NIfTI file into the data folder and press the upload button.

2. Specify relevant visualization parameters


In [2]:
stats_file = '../test_data/ALL_N95_Mean_cope2_thresh_zstat1.nii.gz'
view =  'ortho'
colormap = 'RdBu_r'
threshold = '2.3'
black_bg

3. Run the visualization script


In [13]:
%run ../scripts/mni_glass_brain.py --cbar --display_mode $view --cmap $colormap --thr_abs $threshold $stats_file


C:\Program Files\Anaconda3\envs\kwturing\lib\site-packages\matplotlib\cbook.py:136: MatplotlibDeprecationWarning: The axisbg attribute was deprecated in version 2.0. Use facecolor instead.
  warnings.warn(message, mplDeprecation, stacklevel=1)
C:\Program Files\Anaconda3\envs\kwturing\lib\site-packages\nilearn\plotting\glass_brain.py:164: MatplotlibDeprecationWarning: The get_axis_bgcolor function was deprecated in version 2.0. Use get_facecolor instead.
  black_bg = colors.colorConverter.to_rgba(ax.get_axis_bgcolor()) \
C:\Program Files\Anaconda3\envs\kwturing\lib\site-packages\matplotlib\artist.py:879: MatplotlibDeprecationWarning: The set_axis_bgcolor function was deprecated in version 2.0. Use set_facecolor instead.
  return func(v)

4. Look at your data


In [14]:
from IPython.display import Image, display
from glob import glob as gg
outputs = gg('../test_data/*ortho.png')

for o in outputs:
    a = Image(filename=o)
    display(a)



In [9]:
plotting.plot_glass_brain??

In [ ]: