changeset 4:3b5e09c727f5 draft

Uploaded
author greg
date Tue, 28 Nov 2017 14:37:35 -0500
parents 51263bfe7b2c
children c55029873167
files create_streamlines.py
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/create_streamlines.py	Tue Nov 28 14:23:27 2017 -0500
+++ b/create_streamlines.py	Tue Nov 28 14:37:35 2017 -0500
@@ -61,14 +61,17 @@
 fvtk.add(r, cc_streamlines_actor)
 fvtk.add(r, cc_ROI_actor)
 # Save figures
-fvtk.record(r, n_frames=1, out_path=args.output_corpuscallosum_axial, size=(800, 800))
+fvtk.record(r, n_frames=1, out_path="corpuscallosum_axial.png", size=(800, 800))
+shutil.move("corpuscallosum_axial.png", args.output_corpuscallosum_axial)
 fvtk.camera(r, [-1, 0, 0], [0, 0, 0], viewup=[0, 0, 1])
-fvtk.record(r, n_frames=1, out_path=args.output_corpuscallosum_sagittal, size=(800, 800))
+fvtk.record(r, n_frames=1, out_path="corpuscallosum_sagittal.png", size=(800, 800))
+shutil.move("corpuscallosum_sagittal.png", args.output_corpuscallosum_sagittal)
 M, grouping = utils.connectivity_matrix(cc_streamlines, labels, affine=affine, return_mapping=True, mapping_as_streamlines=True)
 M[:3, :] = 0
 M[:, :3] = 0
 plt.imshow(np.log1p(M), interpolation='nearest')
-plt.savefig(args.output_connectivity)
+plt.savefig("connectivity.png")
+shutil.move("connectivity.png", args.output_connectivity)
 lr_superiorfrontal_track = grouping[11, 54]
 shape = labels.shape
 dm = utils.density_map(lr_superiorfrontal_track, shape, affine=affine)