aslprep.workflows.asl.util module

Utility workflows.

init_enhance_and_skullstrip_asl_wf(pre_mask=False, name='enhance_and_skullstrip_asl_wf')[source]

Enhance and run brain extraction on an ASL image.

This workflow takes in an ASL average/summary (e.g., a reference image averaging non-steady-state timepoints), and sharpens the histogram with the application of the N4 algorithm for removing the INU bias field and calculates a signal mask.

Steps of this workflow are:

  1. Calculate a tentative mask by registering (9-parameters) to fMRIPrep’s EPI -aslref template, which is in MNI space. The tentative mask is obtained by resampling the MNI template’s brainmask into aslref-space.

  2. Binary dilation of the tentative mask with a sphere of 3mm diameter.

  3. Run ANTs’ N4BiasFieldCorrection on the input ASL average, using the mask generated in 1) instead of the internal Otsu thresholding.

  4. Calculate a loose mask using FSL’s bet, with one mathematical morphology dilation of one iteration and a sphere of 6mm as structuring element.

  5. Mask the INU-corrected image with the latest mask calculated in 3), then use AFNI’s 3dUnifize to standardize the T2* contrast distribution.

  6. Calculate a mask using AFNI’s 3dAutomask after the contrast enhancement of 4).

  7. Calculate a final mask as the intersection of 4) and 6).

  8. Apply final mask on the enhanced reference.

Step 1 can be skipped if the pre_mask argument is set to True and a tentative mask is passed in to the workflow throught the pre_mask Nipype input.

Workflow graph
../_images/aslprep-workflows-asl-util-1.png

(Source code, png, svg, pdf)

Parameters:
  • pre_mask (bool) – Indicates whether the pre_mask input will be set (and thus, step 1 should be skipped).

  • name (str) – Name of workflow (default: enhance_and_skullstrip_asl_wf)

Inputs:
  • in_file (str) – ASL image (single volume)

  • pre_mask (bool) – A tentative brain mask to initialize the workflow (requires pre_mask parameter set True).

Outputs:
  • bias_corrected_file (str) – the in_file after N4BiasFieldCorrection

  • skull_stripped_file (str) – the bias_corrected_file after skull-stripping

  • mask_file (str) – mask of the skull-stripped input file

  • out_report (str) – reportlet for the skull-stripping