Defacing with the Marcus, D. ‘mask_face’ command.

pydcmio.deface.mask_face.deface(input_files, outdir, matlab_mcr, reference_file=None, mask_ears=True, verbose=0, rm_workspace=False, fsl_sh='/etc/fsl/5.0/fsl.sh')[source]ΒΆ

Deface MRI head images using the Marcus, D. ‘mask_face’ command.

This code is standalone and does not need matlab licence. You just need MathWorks MCR software installed on your computer.

Parameters:

input_files: list of str

Input MRI head images to be defaced.

outdir: str

The output folder.

matlab_mcr:str

The MATLAB MCR directory for standalone applications.

reference_file: str (optional, default None)

The image that must be used as reference if more than one image have been supplied as input.

mask_ears: bool (optional, default True)

If activated, masks ears.

verbose: int (optional, default 0)

The verbosity level.

rm_workspace: bool (optional, default False)

If activated, keep the defacing workspace (require more disk space).

fsl_sh: str (optional, default DEFAULT_FSL_PATH)

The FSL configuration file.

Returns:

deface_files: list of str

The defaced input MRI head images.

snap_files: list of str

The corresponding snaps that can be used to check the defacing result.