bids_bep16_conv.converters.fsl_bep16_dti¶
- bids_bep16_conv.converters.fsl_bep16_dti(dwi_nii_gz, bval, bvec, mask, out_path, json_metadata=None)[source]¶
Restructure FSL DTI outcomes following BIDS BEP16 conventions.
- Parameters:
dwi_nii_gz (str) – The _dwi.nii(.gz) file of the preprocessed DWI used as input for MRTRIX.
bval (str) – The _dwi.bval file of the preprocessed DWI used as input for MRTRIX.
bvec (str) – The _dwi.bvec file of the preprocessed DWI used as input for MRTRIX.
mask (str) – The _mask.nii.gz file of the preprocessed DWI used as input for MRTRIX.
out_path (str) – Path to the files processed by FSL, 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 FSL DTI metadata template and need to be checked manually.
Examples
Apply the conversion to data processed by FSL’s dtifit 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 FSL DTI metadata template and need to be checked manually.
>>> fsl_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 FSL’s dtifit 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 “fsl”.
>>> fsl_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')