Mercurial > repos > greg > drmi
comparison dmri.py @ 19:3938c3299e7b draft
Uploaded
author | greg |
---|---|
date | Fri, 03 Nov 2017 14:48:47 -0400 |
parents | f15d37b5efea |
children | 53671fcb9507 |
comparison
equal
deleted
inserted
replaced
18:f15d37b5efea | 19:3938c3299e7b |
---|---|
42 gtab = gradient_table(bvals, bvecs) | 42 gtab = gradient_table(bvals, bvecs) |
43 # gtab can be used to tell what part of the data is the S0 | 43 # gtab can be used to tell what part of the data is the S0 |
44 # volumes (volumes which correspond to b-values of 0). | 44 # volumes (volumes which correspond to b-values of 0). |
45 S0s = data[:, :, :, gtab.b0s_mask] | 45 S0s = data[:, :, :, gtab.b0s_mask] |
46 # Save this in a new Nifti file. | 46 # Save this in a new Nifti file. |
47 nib.save(nib.Nifti1Image(S0s, img.affine), 'HARDI193_S0.nii') | 47 nibabel.save(nibabel.Nifti1Image(S0s, img.affine), 'output.nii') |
48 shutil.move('HARDI193_S0.nii', args.output_nifti1) | 48 shutil.move('output.nii', args.output_nifti1) |