Mercurial > repos > greg > diffusion_signal_reconstruction
comparison diffusion_signal_reconstruction.py @ 11:bca3ded6d5cc draft
Uploaded
author | greg |
---|---|
date | Thu, 30 Nov 2017 08:56:23 -0500 |
parents | 7bcc39c8ccfd |
children | 361bdd5fa8bc |
comparison
equal
deleted
inserted
replaced
10:7bcc39c8ccfd | 11:bca3ded6d5cc |
---|---|
52 | 52 |
53 # Get input data. | 53 # Get input data. |
54 # TODO: do not hard-code 'stanford_hardi' | 54 # TODO: do not hard-code 'stanford_hardi' |
55 input_dir = 'stanford_hardi' | 55 input_dir = 'stanford_hardi' |
56 os.mkdir(input_dir) | 56 os.mkdir(input_dir) |
57 for f in os.list_dir(args.input_extra_files_path): | 57 for f in os.listdir(args.input_extra_files_path): |
58 shutil.copy(os.path.join(args.input_extra_files_path, f), input_dir) | 58 shutil.copy(os.path.join(args.input_extra_files_path, f), input_dir) |
59 img, gtab = read_stanford_hardi() | 59 img, gtab = read_stanford_hardi() |
60 | 60 |
61 data = img.get_data() | 61 data = img.get_data() |
62 maskdata, mask = median_otsu(data, 3, 1, True, vol_idx=range(10, 50), dilate=2) | 62 maskdata, mask = median_otsu(data, 3, 1, True, vol_idx=range(10, 50), dilate=2) |