Note

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

brainprep.interfaces.brainmask

brainprep.interfaces.brainmask(image_file, output_dir, entities)[source]

Skull-strip a BIDS-compliant anatomical image using FreeSurfer’s mri_synthstrip.

mri_synthstrip is a FreeSurfer command-line tool that applies SynthStrip, a deep learning-ased skull-stripping method developed to work across diverse imaging modalities, resolutions, and subject population [1].

Parameters:
image_fileFile

Path to the input image file (T1w, T2w, FLAIR, etc.).

output_dirDirectory

Directory where the reoriented image will be saved.

entitiesdict

A dictionary of parsed BIDS entities including modality.

Returns:
commandlist[str]

Skull-stripping command-line.

outputstuple[File]
  • mask_file : File - Skull-stripped brain image file.

References