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:
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.
Binary dilation of the tentative mask with a sphere of 3mm diameter.
Run ANTs’
N4BiasFieldCorrection
on the input ASL average, using the mask generated in 1) instead of the internal Otsu thresholding.Calculate a loose mask using FSL’s
bet
, with one mathematical morphology dilation of one iteration and a sphere of 6mm as structuring element.Mask the INU-corrected image with the latest mask calculated in 3), then use AFNI’s
3dUnifize
to standardize the T2* contrast distribution.Calculate a mask using AFNI’s
3dAutomask
after the contrast enhancement of 4).Calculate a final mask as the intersection of 4) and 6).
Apply final mask on the enhanced reference.
Step 1 can be skipped if the
pre_mask
argument is set toTrue
and a tentative mask is passed in to the workflow throught thepre_mask
Nipype input.- Workflow graph
-
(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 setTrue
).
- Outputs:
bias_corrected_file (str) – the
in_file
after N4BiasFieldCorrectionskull_stripped_file (str) – the
bias_corrected_file
after skull-strippingmask_file (str) – mask of the skull-stripped input file
out_report (str) – reportlet for the skull-stripping