aslprep.workflows.asl.fit module

Fit workflows for ASLPrep.

get_sbrefs(asl_file: str, entity_overrides: Dict[str, Any], layout: BIDSLayout) List[str][source]

Find single-band reference(s) associated with ASL file.

Parameters:
  • asl_file – List of absolute paths to ASL files

  • entity_overrides – Query parameters to override defaults

  • layoutBIDSLayout to query

Returns:

List of absolute paths to sbref files associated with input ASL files, sorted by EchoTime

Return type:

sbref_file

init_asl_fit_wf(*, asl_file: str, m0scan: str | None, use_ge: bool, precomputed: dict = {}, fieldmap_id: str | None = None, omp_nthreads: int = 1, name: str = 'asl_fit_wf') Workflow[source]

Control the minimal estimation steps for functional preprocessing.

Workflow Graph
../_images/aslprep-workflows-asl-fit-1.png

(Source code, png, svg, pdf)

Parameters:
  • asl_file – Path to ASL NIfTI file.

  • m0scan – Path to M0 NIfTI file.

  • use_ge – If True, the M0 scan (when available) will be prioritized as the volume type for the reference image, as GE deltam volumes exhibit extreme background noise.

  • precomputed – Dictionary containing precomputed derivatives to reuse, if possible.

  • fieldmap_id – ID of the fieldmap to use to correct this ASL series. If None, no correction will be applied.

Inputs:
  • asl_file – ASL series NIfTI file

  • t1w_preproc – Bias-corrected structural template image

  • t1w_mask – Mask of the skull-stripped template image

  • t1w_dseg – Segmentation of preprocessed structural image, including gray-matter (GM), white-matter (WM) and cerebrospinal fluid (CSF)

  • anat2std_xfm – List of transform files, collated with templates

  • subjects_dir – FreeSurfer SUBJECTS_DIR

  • subject_id – FreeSurfer subject ID

  • fsnative2t1w_xfm – LTA-style affine matrix translating from FreeSurfer-conformed subject space to T1w

  • fmap_id – Unique identifiers to select fieldmap files

  • fmap – List of estimated fieldmaps (collated with fmap_id)

  • fmap_ref – List of fieldmap reference files (collated with fmap_id)

  • fmap_coeff – List of lists of spline coefficient files (collated with fmap_id)

  • fmap_mask – List of fieldmap masks (collated with fmap_id)

  • sdc_method – List of fieldmap correction method names (collated with fmap_id)

Outputs:
  • hmc_aslref – ASL reference image used for head motion correction. Minimally processed to ensure consistent contrast with ASL series.

  • coreg_aslref – ASL reference image used for coregistration. Contrast-enhanced and fieldmap-corrected for greater anatomical fidelity, and aligned with hmc_aslref.

  • asl_mask – Mask of coreg_aslref.

  • motion_xfm – Affine transforms from each ASL volume to hmc_aslref, written as concatenated ITK affine transforms.

  • aslref2anat_xfm – Affine transform mapping from ASL reference space to the anatomical space.

  • aslref2fmap_xfm – Affine transform mapping from ASL reference space to the fieldmap space, if applicable.

  • movpar_file – MCFLIRT motion parameters, normalized to SPM format (X, Y, Z, Rx, Ry, Rz)

  • rmsd_file – Root mean squared deviation as measured by fsl_motion_outliers [Jenkinson2002].

  • dummy_scans – The number of dummy scans declared or detected at the beginning of the series.

init_asl_native_wf(*, asl_file: str, m0scan: str | None = None, fieldmap_id: str | None = None, omp_nthreads: int = 1, name: str = 'asl_native_wf') Workflow[source]

Apply minimal resampling workflow.

This workflow resamples to aslref space with head motion and susceptibility distortion correction. It also selects the transforms needed to perform further resampling.

Workflow Graph
../_images/aslprep-workflows-asl-fit-2.png

(Source code, png, svg, pdf)

Parameters:
  • asl_file – List of paths to NIfTI files.

  • m0scan

  • fieldmap_id – ID of the fieldmap to use to correct this ASL series. If None, no correction will be applied.

Inputs:
  • aslref – ASL reference file

  • asl_mask – Mask of ASL reference file

  • m0scan – If M0Type is ‘Separate’, then the M0 file will resampled into ASL reference space. Otherwise, this field will be undefined.

  • motion_xfm – Affine transforms from each ASL volume to hmc_aslref, written as concatenated ITK affine transforms.

  • aslref2fmap_xfm – Affine transform mapping from ASL reference space to the fieldmap space, if applicable.

  • fmap_id – Unique identifiers to select fieldmap files

  • fmap_ref – List of fieldmap reference files (collated with fmap_id)

  • fmap_coeff – List of lists of spline coefficient files (collated with fmap_id)

Outputs:
  • asl_minimal – ASL series ready for further resampling. This ASL file will only contain the volumes needed for processing.

  • asl_native – ASL series resampled into ASL reference space. Head motion and susceptibility distortion correction will be applied to each file.

  • m0scan_native – If M0Type is ‘Separate’, then the M0 file will resampled into ASL reference space. Otherwise, this field will be undefined.

  • metadata – Metadata dictionary of ASL series with the shortest echo

  • motion_xfm – Motion correction transforms for further correcting asl_minimal. For multi-echo data, motion correction has already been applied, so this will be undefined.