Mercurial > repos > greg > drmi
diff dmri.py @ 11:173c5c07b2f9 draft
Uploaded
author | greg |
---|---|
date | Fri, 03 Nov 2017 13:51:40 -0400 |
parents | 5014ba48e15e |
children | 1467f96db74a |
line wrap: on
line diff
--- a/dmri.py Fri Nov 03 13:46:21 2017 -0400 +++ b/dmri.py Fri Nov 03 13:51:40 2017 -0400 @@ -5,6 +5,7 @@ import shutil from dipy.data import fetch_sherbrooke_3shell +from matplotlib import pyplot parser = argparse.ArgumentParser() parser.add_argument('--input', dest='input', help='Input dataset') @@ -26,10 +27,10 @@ # non-weighted (S0s) and diffusion-weighted volumes. # Visualize the results using matplotlib. axial_middle = data.shape[2] // 2 -plt.figure('Showing the datasets') -plt.subplot(1, 2, 1).set_axis_off() -plt.imshow(data[:, :, axial_middle, 0].T, cmap='gray', origin='lower') -plt.subplot(1, 2, 2).set_axis_off() -plt.imshow(data[:, :, axial_middle, 10].T, cmap='gray', origin='lower') -plt.show() -plt.savefig(args.output, bbox_inches='tight') +pyplot.figure('Showing the datasets') +pyplot.subplot(1, 2, 1).set_axis_off() +pyplot.imshow(data[:, :, axial_middle, 0].T, cmap='gray', origin='lower') +pyplot.subplot(1, 2, 2).set_axis_off() +pyplot.imshow(data[:, :, axial_middle, 10].T, cmap='gray', origin='lower') +pyplot.show() +pyplot.savefig(args.output, bbox_inches='tight')