Menu

Package that provides tools for brain MRI Deep Learning pre-processing.

Note

This page is a reference documentation. It only explains the function signature, and not how to use it. Please refer to the gallery for the big picture.

brainprep.workflow.fmriprep.brainprep_fmriprep_conn(fmri_file, counfounds_file, mask_file, tr, outdir='/work', low_pass=0.1, high_pass=0.01, scrub=5, fd_threshold=0.2, std_dvars_threshold=3, fwhm=0.0)[source]ΒΆ

Compute ROI-based functional connectivity from fMRIPrep pre-processing.

Parameters:

fmri_file : str

the fMRIPrep pre-processing file: *desc-preproc_bold.nii.gz.

counfounds_file : str

the path to the fMRIPrep counfounds file: *desc-confounds_regressors.tsv.

mask_file : str

signal is only cleaned from voxels inside the mask. It should have the same shape and affine as the fmri_file: *desc-brain_mask.nii.gz.

tr : float

the repetition time (TR) in seconds.

outdir : str

the destination folder.

low_pass : float, default 0.1

the low-pass filter cutoff frequency in Hz. Set it to None if you dont want low-pass filtering.

high_pass : float, default 0.01

the high-pass filter cutoff frequency in Hz. Set it to None if you dont want high-pass filtering.

scrub : int, default 5

after accounting for time frames with excessive motion, further remove segments shorter than the given number. The default value is 5. When the value is 0, remove time frames based on excessive framewise displacement and DVARS only. One-hot encoding vectors are added as regressors for each scrubbed frame.

fd_threshold : float, default 0.2

Framewise displacement threshold for scrub. This value is typically between 0 and 1 mm.

std_dvars_threshold : float, default 3

standardized DVARS threshold for scrub. DVARs is defined as root mean squared intensity difference of volume N to volume N + 1. D refers to temporal derivative of timecourses, VARS referring to root mean squared variance over voxels.

fwhm : float or list, default 0.

smoothing strength, expressed as as Full-Width at Half Maximum (fwhm), in millimeters. Can be a single number fwhm=8, the width is identical along x, y and z or fwhm=0, no smoothing is peformed. Can be three consecutive numbers, fwhm=[1,1.5,2.5], giving the fwhm along each axis.

Follow us

© 2025, brainprep developers