changeset 1:84a2e30b5404 draft

Uploaded
author greg
date Tue, 28 Nov 2017 13:30:57 -0500
parents cbfa8c336751
children 5daa2541c7fa
files linear_fascile_evaluation.py
diffstat 1 files changed, 9 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/linear_fascile_evaluation.py	Tue Nov 28 13:18:32 2017 -0500
+++ b/linear_fascile_evaluation.py	Tue Nov 28 13:30:57 2017 -0500
@@ -11,6 +11,7 @@
 from dipy.viz.colormap import line_colors
 from dipy.viz import fvtk
 from mpl_toolkits.axes_grid1 import AxesGrid
+from dipy.data import read_stanford_labels, fetch_stanford_t1, read_stanford_t1
 
 parser = argparse.ArgumentParser()
 parser.add_argument('--candidates', dest='candidates', help='Candidates selection')
@@ -22,18 +23,14 @@
 
 args = parser.parse_args()
 
-if not op.exists(args.candidates):
-    from streamline_tools import *
-else:
-    # We'll need to know where the corpus callosum is from these variables:
-    from dipy.data import (read_stanford_labels, fetch_stanford_t1, read_stanford_t1)
-    hardi_img, gtab, labels_img = read_stanford_labels()
-    labels = labels_img.get_data()
-    cc_slice = labels == 2
-    fetch_stanford_t1()
-    t1 = read_stanford_t1()
-    t1_data = t1.get_data()
-    data = hardi_img.get_data()
+# We'll need to know where the corpus callosum is from these variables.
+hardi_img, gtab, labels_img = read_stanford_labels()
+labels = labels_img.get_data()
+cc_slice = labels == 2
+fetch_stanford_t1()
+t1 = read_stanford_t1()
+t1_data = t1.get_data()
+data = hardi_img.get_data()
 
 # Read the candidates from file in voxel space:
 candidate_sl = [s[0] for s in nib.trackvis.read(args.candidates, points_space='voxel')[0]]