Guest User

Untitled

a guest
Jan 18th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. import scipy
  2. import scipy.io
  3. import matplotlib.pyplot as plt
  4. import numpy
  5.  
  6. def openFile(name):``
  7. return scipy.io.loadmat(name)
  8.  
  9. def showPlot(mat, key):
  10. plt.imshow(mat[key],cmap='gray', interpolation='nearest', vmin=None, vmax=255)
  11. plt.axis('off')
  12. plt.show()
  13.  
  14.  
  15. name = 'skull_stripped.mat'
  16. key = 'skull_stripped'
  17. mat = openFile(name)
  18. showPlot(mat,key)
Add Comment
Please, Sign In to add comment