qsiprep.workflows.dwi.finalize module
Final steps on the preprocessed data
- qsiprep.workflows.dwi.finalize.init_dwi_finalize_wf(scan_groups, name, source_file, output_prefix, write_derivatives=True)[source]
This workflow controls the resampling parts of the dwi preprocessing workflow.
Parameters
- output_prefixstr
beginning of the output file name (eg ‘sub-1_buds-j’)
- ignorelist
Preprocessing steps to skip (eg “fieldmaps”)
- templatestr
Name of template targeted by
templateoutput space- output_dirstr
Directory in which to save derivatives
- output_resolutionfloat
Output voxel resolution in mm
- pepolar_methodstr
Either ‘DRBUDDI’, ‘TOPUP’ or ‘TOPUP+DRBUDDI’. The method for SDC when EPI fieldmaps are used.
- omp_nthreadsint
Maximum number of threads an individual process may use
- low_membool
Write uncompressed .nii files in some cases to reduce memory usage
- layoutBIDSLayout
BIDSLayout structure to enable metadata retrieval
- write_derivatives: bool
Is this the final output? If so, write the final derivatives. If these resampled outputs will be combined with other distortion groups at the end, then return the resampled, non-concatenated images
Inputs
- t1_preproc
Bias-corrected structural template image
- t1_brain
Skull-stripped
t1_preproc- t1_mask
Mask of the skull-stripped template image
- t1_output_grid
Image to write out DWIs aligned to t1
- t1_seg
Segmentation of preprocessed structural image, including gray-matter (GM), white-matter (WM) and cerebrospinal fluid (CSF)
- t1_2_mni_forward_transform
ANTs-compatible affine-and-warp transform file
- t1_2_mni_reverse_transform
ANTs-compatible affine-and-warp transform file (inverse)
- subjects_dir
FreeSurfer SUBJECTS_DIR
- subject_id
FreeSurfer subject ID
- dwi_sampling_grid
A NIfTI1 file with the grid spacing and FoV to resample the DWIs
- b0_ref_image
A Nifti of the b0 reference that was used for hmc and sdc
- intramodal_template
The intramodal template image created from all b0 ref images
- source_file
The file name template used for derivatives
- raw_qc_file
The QC file from the DWI data before any preprocessing
- raw_concatenated
The original raw images in a single 4D file
- carpetplot_data
File containing carpetplot data
Outputs
- dwi_t1
dwi series, resampled to T1w space. If write_derivitaves, this is a 4d file. Otherwise it’s a list of resampled images.
- dwi_mask_t1
dwi series mask in T1w space
- bvals_t1
bvalues of the dwi series
- bvecs_t1
bvecs after aligning to the T1w and resampling
- local_bvecs_t1
voxelwise bvecs accounting for local displacements
- gradient_table_t1
MRTrix-style gradient table
- qsiprep.workflows.dwi.finalize.init_dwi_finalize_wf(scan_groups, name, source_file, output_prefix, write_derivatives=True)[source]
This workflow controls the resampling parts of the dwi preprocessing workflow.
Parameters
- output_prefixstr
beginning of the output file name (eg ‘sub-1_buds-j’)
- ignorelist
Preprocessing steps to skip (eg “fieldmaps”)
- templatestr
Name of template targeted by
templateoutput space- output_dirstr
Directory in which to save derivatives
- output_resolutionfloat
Output voxel resolution in mm
- pepolar_methodstr
Either ‘DRBUDDI’, ‘TOPUP’ or ‘TOPUP+DRBUDDI’. The method for SDC when EPI fieldmaps are used.
- omp_nthreadsint
Maximum number of threads an individual process may use
- low_membool
Write uncompressed .nii files in some cases to reduce memory usage
- layoutBIDSLayout
BIDSLayout structure to enable metadata retrieval
- write_derivatives: bool
Is this the final output? If so, write the final derivatives. If these resampled outputs will be combined with other distortion groups at the end, then return the resampled, non-concatenated images
Inputs
- t1_preproc
Bias-corrected structural template image
- t1_brain
Skull-stripped
t1_preproc- t1_mask
Mask of the skull-stripped template image
- t1_output_grid
Image to write out DWIs aligned to t1
- t1_seg
Segmentation of preprocessed structural image, including gray-matter (GM), white-matter (WM) and cerebrospinal fluid (CSF)
- t1_2_mni_forward_transform
ANTs-compatible affine-and-warp transform file
- t1_2_mni_reverse_transform
ANTs-compatible affine-and-warp transform file (inverse)
- subjects_dir
FreeSurfer SUBJECTS_DIR
- subject_id
FreeSurfer subject ID
- dwi_sampling_grid
A NIfTI1 file with the grid spacing and FoV to resample the DWIs
- b0_ref_image
A Nifti of the b0 reference that was used for hmc and sdc
- intramodal_template
The intramodal template image created from all b0 ref images
- source_file
The file name template used for derivatives
- raw_qc_file
The QC file from the DWI data before any preprocessing
- raw_concatenated
The original raw images in a single 4D file
- carpetplot_data
File containing carpetplot data
Outputs
- dwi_t1
dwi series, resampled to T1w space. If write_derivitaves, this is a 4d file. Otherwise it’s a list of resampled images.
- dwi_mask_t1
dwi series mask in T1w space
- bvals_t1
bvalues of the dwi series
- bvecs_t1
bvecs after aligning to the T1w and resampling
- local_bvecs_t1
voxelwise bvecs accounting for local displacements
- gradient_table_t1
MRTrix-style gradient table