File: plot_fmri_activation.py

package info (click to toggle)
pysurfer 0.3%2Bgit15-gae6cbb1-1.1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 2,032 kB
  • sloc: python: 1,947; makefile: 125
file content (40 lines) | stat: -rw-r--r-- 782 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
"""
Display fMRI Activation
=======================

Load a statistical overlay on the inflated surface.

"""

print __doc__

import os.path as op
from surfer import Brain

"""
Bring up the visualization
"""
brain = Brain("fsaverage", "lh", "inflated")

"""
Get a path to the overlay file.
"""
overlay_file = op.join("example_data", "lh.sig.nii.gz")

"""
Display the overlay on the surface using the defaults
to control thresholding and colorbar saturation.
These can be set through your config file.
"""
brain.add_overlay(overlay_file)

"""
You can then turn the overlay off.
"""
brain.overlays["sig"].remove()

"""
Now add the overlay again, but this time with set threshold
and showing only the positive activations
"""
brain.add_overlay(overlay_file, min=5, max=20, sign="pos")