qsiprep.workflows.dwi.pre_hmc module
Orchestrating the dwi-preprocessing workflow.
Orchestrating the dwi-preprocessing workflow
- qsiprep.workflows.dwi.pre_hmc.init_dwi_pre_hmc_wf(unit, orientation, source_file, do_biascorr, calculate_qc=True, name='pre_hmc_wf')[source]
Build a workflow that merges denoised dwi scans before head motion correction.
The member series arrive already conformed and denoised (see
init_dwi_series_denoise_wf()), one list entry per file inunit.dwi_filesand in the same order. The outputs from this workflow are a single dwi file and corresponding bvals, bvecs.In the general case, a single warped group will be sent to this workflow. However, since eddy expects a single 4D input file, two warped groups can be processed separately and merged into a 4D file. This happens when the unit has both phase encoding polarities (
unit.has_bidirectional_dwi). FSL’s eddy also requires data in LAS+ orientation.
(Source code, png, svg, pdf)
- Parameters:
unit (
PreprocUnit) – The DWI series to merge. When the unit has both phase encoding polarities, each polarity is merged separately.orientation (str) – ‘LPS’ or ‘LAS’, the orientation the series were conformed to
source_file (str) – Source file used to name the merged outputs when the unit has a single phase encoding polarity.
do_biascorr (bool) – Whether bias correction is applied to this output; used to write the methods boilerplate.
calculate_qc (bool, optional) – Whether to calculate model-free QC metrics for the merged series when the unit has a single phase encoding polarity. Default is True.
name (str, optional) – Name of workflow (default:
pre_hmc_wf)
- Inputs:
dwi_files – conformed, denoised series, one per file in
unit.dwi_filesbval_files – bvals of each series
bvec_files – conformed bvecs of each series
raw_dwi_files – conformed, not denoised series
noise_images – noise image of each series
denoising_confounds – denoising confounds of each series
validation_reports – conformation report of each series
- Outputs:
dwi_file – a (potentially-denoised) dwi file
bvec_file – a bvec file
bval_file – a bval files
sidecar_file – a json sidecar file for the scan data
b0_indices – list of the positions of the b0 images in the dwi series
b0_images – list of paths to single-volume b0 images
original_files – list of paths to the original files that the single volumes came from
original_grouping – list of warped space group ids
raw_concatenated – 4d image of the raw inputs concatenated (for QC and visualization)