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.fsl.deface

brainprep.interfaces.fsl.deface(t1_file, output_dir, entities)[source]

Defaces a BIDS-compliant T1-weighted anatomical image using FSL’s fsl_deface.

Parameters:
t1_fileFile

Path to the input T1w image file.

output_dirDirectory

Directory where the defaced T1w image will be saved.

entitiesdict

A dictionary of parsed BIDS entities including modality.

Returns:
commandlist[str]

Defacing command-line.

outputstuple[File | list[File]]
  • deface_file : File - Defaced input T1w image file.

  • mask_file : File - Defacing binary mask.

  • vol_files : list[File] - Defacing 3d rendering.

Raises:
ValueError

If the input image is not a T1-weighted image.