comparison dmri.py @ 5:6fe81fec6cb9 draft

Uploaded
author greg
date Fri, 03 Nov 2017 13:03:44 -0400
parents 94f6b3e28c36
children 2b6708bc9391
comparison
equal deleted inserted replaced
4:70300d44deaa 5:6fe81fec6cb9
29 input_dir = 'input_dir' 29 input_dir = 'input_dir'
30 # Get input data. 30 # Get input data.
31 fetch_sherbrooke_3shell() 31 fetch_sherbrooke_3shell()
32 # MNove inputs to working directory. 32 # MNove inputs to working directory.
33 move_directory_files('/home/greg/.dipy', input_dir) 33 move_directory_files('/home/greg/.dipy', input_dir)
34 fdwi = join(input_dir, 'HARDI193.nii.gz') 34 fdwi = os.path.join(input_dir, 'HARDI193.nii.gz')
35 fbval = join(input_dir, 'HARDI193.bval') 35 fbval = os.path.join(input_dir, 'HARDI193.bval')
36 fbvec = join(input_dir, 'HARDI193.bvec') 36 fbvec = os.path.join(input_dir, 'HARDI193.bvec')
37 # Load the dMRI datasets. 37 # Load the dMRI datasets.
38 img = nibabel.load(fdwi) 38 img = nibabel.load(fdwi)
39 data = img.get_data() 39 data = img.get_data()
40 # data is a 4D array where the first 3 dimensions are the i, j, 40 # data is a 4D array where the first 3 dimensions are the i, j,
41 # k voxel coordinates and the last dimension is the number of 41 # k voxel coordinates and the last dimension is the number of