dicomifier.nifti.diffusion#

Extract diffusion-related information from JSON meta-data and convert it to other formats. Unless otherwise specified, all b-values extracted from meta-data are expressed in \(s/m^2\) (i.e. SI units).

dicomifier.nifti.diffusion.from_ge_private(data)#

Extract diffusion gradient direction and b-value from GE-specific elements (0019,xxbb, 0019,xxbc, 0019,xxbd, and 0043,xx39).

dicomifier.nifti.diffusion.from_siemens_csa(data)#

Extract diffusion gradient direction and b-value from Siemens-specific elements (CSA Image Header Info (0029,xx10)).

dicomifier.nifti.diffusion.from_standard(data)#

Extract diffusion gradient direction and b-value from standard DICOM elements (MR Diffusion Sequence).

dicomifier.nifti.diffusion.to_fsl(scheme, transform, bvecs_fd, bvals_fd)#

Save a diffusion scheme in FSL bvecs+bvals format. A reference transform is required as the bvecs are store in image coordinates, not in patient coordinates. This transform must correspond to an image-to-patient transform, e.g. what is stored in the affine member of nibabel images.

dicomifier.nifti.diffusion.to_mrtrix(scheme, fd)#

Save a diffusion scheme in MRtrix format to a file-like object.