Mercurial > repos > greg > drmi
comparison dmri.py @ 33:b4c65a54aa7d draft
Uploaded
| author | greg |
|---|---|
| date | Thu, 30 Nov 2017 09:53:30 -0500 |
| parents | 221c1fe8be2c |
| children | 013144510199 |
comparison
equal
deleted
inserted
replaced
| 32:221c1fe8be2c | 33:b4c65a54aa7d |
|---|---|
| 42 fbval = os.path.join(input_dir, 'HARDI150.bval') | 42 fbval = os.path.join(input_dir, 'HARDI150.bval') |
| 43 fbvec = os.path.join(input_dir, 'HARDI150.bvec') | 43 fbvec = os.path.join(input_dir, 'HARDI150.bvec') |
| 44 img = nibabel.load(fdwi) | 44 img = nibabel.load(fdwi) |
| 45 else: | 45 else: |
| 46 img, gtab, labels = read_stanford_labels() | 46 img, gtab, labels = read_stanford_labels() |
| 47 fdwi = os.path.join(input_dir, 'HARDI150.nii.gz') | |
| 48 fbval = os.path.join(input_dir, 'HARDI150.bval') | |
| 49 fbvec = os.path.join(input_dir, 'HARDI150.bvec') | |
| 50 | |
| 47 data = img.get_data() | 51 data = img.get_data() |
| 48 # data is a 4D array where the first 3 dimensions are the i, j, | 52 # data is a 4D array where the first 3 dimensions are the i, j, |
| 49 # k voxel coordinates and the last dimension is the number of | 53 # k voxel coordinates and the last dimension is the number of |
| 50 # non-weighted (S0s) and diffusion-weighted volumes. | 54 # non-weighted (S0s) and diffusion-weighted volumes. |
| 51 # Visualize the results using matplotlib. | 55 # Visualize the results using matplotlib. |
