bids_bep16_conv.converters.dipy_bep16_dti

bids_bep16_conv.converters.dipy_bep16_dti(dwi_nii_gz, bval, bvec, mask, out_path, json_metadata=None)[source]

Restructure DIPY DTI outcomes following BIDS BEP16 conventions.

Parameters:
  • dwi_nii_gz (str) – The _dwi.nii(.gz) file of the preprocessed DWI used as input for DIPY.

  • bval (str) – The _dwi.bval file of the preprocessed DWI used as input for DIPY.

  • bvec (str) – The _dwi.bvec file of the preprocessed DWI used as input for DIPY.

  • mask (str) – The _mask.nii.gz file of the preprocessed DWI used as input for DIPY.

  • out_path (str) – Path to the files processed by DIPY, starting at the BIDS root directory.

  • json_metadata (str, optional) – Path to JSON metadata file containing metadata information required for BEP16. If no file is provided, the resulting json sidecar metadata files will contain values indicated in the respective DIPI DTI metadata template and need to be checked manually.

Examples

Apply the conversion to data processed by DIPY’s DTI CLI and previously preprocessed by QSIprep, both located in a respective derivatives directory. Here, no json metadata file is provided by the user and thus, the resulting json metadata sidecar files will contain values indicated in the respective DIPI DTI metadata template and need to be checked manually.

>>> dipy_bep16_dti('bids_root/derivatives/QSIprep/sub-01/dwi/sub-01_desc-preproc_dwi.nii.gz',
               'bids_root/derivatives/QSIprep/sub-01/dwi/sub-01_desc-preproc_dwi.bval',
               'bids_root/derivatives/QSIprep/sub-01/dwi/sub-01_desc-preproc_dwi.bvec',
               'bids_root/derivatives/dipy/sub-01/dwi/')

Apply the conversion to data processed by DIPY’s DTI CLI and previously preprocessed by QSIprep, both located in a respective derivatives directory. Here, a json metadata file is provided by the user and thus, the resulting json metadata sidecar files will be based on the respectively provided information. It’s stored at the top of the respective derivative directory, ie “dipy”.

>>> dipy_bep16_dti('bids_root/derivatives/QSIprep/sub-01/dwi/sub-01_desc-preproc_dwi.nii.gz',
               'bids_root/derivatives/QSIprep/sub-01/dwi/sub-01_desc-preproc_dwi.bval',
               'bids_root/derivatives/QSIprep/sub-01/dwi/sub-01_desc-preproc_dwi.bvec',
               'bids_root/derivatives/dipy/sub-01/dwi/'
               'bids_root/derivatives/dipy/analysis_metadata.json')