Menu

[r144]: / trunk / htdocs / screenshots / mri_demo.py  Maximize  Restore  History

Download this file

15 lines (12 with data), 367 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
from matplotlib.matlab import *
# data are 256x256 16 bit integers
dfile = '../../examples/data/s1045.ima'
im = fromstring(file(dfile).read(), Int16).astype(Float)
im.shape = 256, 256
# flip upside down
im = array([im[i] for i in arange(255,-1,-1)])
pcolor(im, shading='flat')
axis('off')
savefig('mri_demo_small', dpi=50)
savefig('mri_demo_large', dpi=100)
show()
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.