File: plot_to_montage.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 (33 lines) | stat: -rw-r--r-- 749 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
"""
======================
Make a multiview image
======================

Make one image from multiple views.

"""
print __doc__

from surfer import Brain

sub = 'fsaverage'
hemi = 'lh'
surf = 'inflated'

brain = Brain(sub, hemi, surf)

###############################################################################
# Save a set of images as a montage
brain.save_montage('/tmp/fsaverage_h_montage.png',
                   ['l', 'v', 'm'], orientation='v')
brain.close()

###############################################################################
# View created image
import Image
import pylab as pl
image = Image.open('/tmp/fsaverage_h_montage.png')
fig = pl.figure(figsize=(5, 3))
pl.imshow(image, origin='lower')
pl.xticks(())
pl.yticks(())