# HG changeset patch # User greg # Date 1511893857 18000 # Node ID 84a2e30b5404bc68a0e31859991bc5e777e3ef6c # Parent cbfa8c3367510f3c05202cacf9e43d11d15b5d0f Uploaded diff -r cbfa8c336751 -r 84a2e30b5404 linear_fascile_evaluation.py --- 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]]