aslprep.workflows.asl.resampling module
Resampling workflows for ASLPrep.
TODO: Remove once fMRIPrep releases 23.2.0.
- init_asl_surf_wf(*, mem_gb: float, surface_spaces: list[str], medial_surface_nan: bool, metadata: dict, cbf_3d: list[str], cbf_4d: list[str], att: list[str], output_dir: str, name: str = 'asl_surf_wf')[source]
Sample functional images to FreeSurfer surfaces.
For each vertex, the cortical ribbon is sampled at six points (spaced 20% of thickness apart) and averaged.
Outputs are in GIFTI format.
The two main changes for ASLPrep are: prepare_timing_parameters is dropped and DerivativesDataSink is imported outside the function. The former is because prepare_timing_parameters relies on fMRIPrep’s config, which will be uninitialized when called by ASLPrep. ASLPrep can work around this with a context manager though. The latter is because, when DerivativesDataSink is imported within the function, ASLPrep can’t use a context manager to override it with its own version. TODO: Replace with fMRIPrep workflow once DerivativesDataSink import is moved out.
I’ve made a bunch of further changes to write out CBF maps instead.
- Workflow Graph
- Parameters:
surface_spaces (
list) – List of FreeSurfer surface-spaces (eitherfsaverage{3,4,5,6,}orfsnative) the functional images are to be resampled to. Forfsnative, images will be resampled to the individual subject’s native surface.medial_surface_nan (
bool) – Replace medial wall values with NaNs on functional GIFTI files
- Inputs:
source_file – Original ASL series
subjects_dir – FreeSurfer SUBJECTS_DIR
subject_id – FreeSurfer subject ID
fsnative2t1w_xfm – ITK-style affine matrix translating from FreeSurfer-conformed subject space to T1w
- Outputs:
surfaces – ASL series, resampled to FreeSurfer surfaces