Note
Go to the end to download the full example code.
Defacing¶
Simple example.
Example on how to run the defacing pre-processing using BrainPrep. See user guide for details.
Data¶
Let’s first get some anatomical data.
from pathlib import Path
from brainprep.datasets import OpenMSDataset
datadir = Path("/tmp/brainprep-data")
datadir.mkdir(parents=True, exist_ok=True)
dataset = OpenMSDataset(datadir)
data = dataset.fetch(
subject="01",
modality="T1w",
dtype="cross_sectional",
)
print(data)
[info] - downloading:
https://raw.githubusercontent.com/muschellij2/open_ms_data/refs/heads/master/cro
ss_sectional/raw/patient01/T1W.nii.gz
Bunch(
description: PosixPath('/tmp/brainprep-data/rawdata/dataset_description.json')
anat: PosixPath('/tmp/brainprep-data/rawdata/sub-01/ses-01/anat/sub-01_T1w.nii.gz')
)
Analysis¶
Let’s now perform preprocessing using the BrainPrep. As with many tutorials, we won’t execute the code directly here. However, feel free to set the ‘dryrun’ configuration to False to actually run each step and generate results on disk.
from brainprep.workflow import (
brainprep_defacing,
brainprep_group_defacing,
)
from brainprep.config import Config
from brainprep.reporting import RSTReport
outdir = Path("/tmp/brainprep-defacing")
outdir.mkdir(parents=True, exist_ok=True)
with Config(dryrun=True, verbose=True):
report = RSTReport()
brainprep_defacing(
t1_file=data.anat,
output_dir=outdir,
keep_intermediate=True,
)
print(report)
brainprep_group_defacing(
output_dir=outdir,
)
[warn] - BIDS file name does not contain run key: sub-01_T1w.nii.gz
[title] - Subject Level Defacing...
[info] - setting workspace directory:
/tmp/brainprep-defacing/derivatives/defacing/subjects/sub-01/ses-01/workspace
[command] - fslreorient2std
/tmp/brainprep-data/rawdata/sub-01/ses-01/anat/sub-01_T1w.nii.gz
/tmp/brainprep-defacing/derivatives/defacing/subjects/sub-01/ses-01/workspace/su
b-01_ses-01_run-34706_mod-T1w_reorient.nii.gz
[info] - checking output:
/tmp/brainprep-defacing/derivatives/defacing/subjects/sub-01/ses-01/workspace/su
b-01_ses-01_run-34706_mod-T1w_reorient.nii.gz
[command] - mri_synthstrip -i
/tmp/brainprep-defacing/derivatives/defacing/subjects/sub-01/ses-01/workspace/su
b-01_ses-01_run-34706_mod-T1w_reorient.nii.gz -m
/tmp/brainprep-defacing/derivatives/defacing/subjects/sub-01/ses-01/workspace/su
b-01_ses-01_run-34706_mod-T1w_brainmask.nii.gz --no-csf
[info] - checking output:
/tmp/brainprep-defacing/derivatives/defacing/subjects/sub-01/ses-01/workspace/su
b-01_ses-01_run-34706_mod-T1w_brainmask.nii.gz
[command] - fsl_deface
/tmp/brainprep-defacing/derivatives/defacing/subjects/sub-01/ses-01/workspace/su
b-01_ses-01_run-34706_mod-T1w_reorient.nii.gz
/tmp/brainprep-defacing/derivatives/defacing/subjects/sub-01/ses-01/sub-01_ses-0
1_run-34706_mod-T1w_deface.nii.gz -d
/tmp/brainprep-defacing/derivatives/defacing/subjects/sub-01/ses-01/sub-01_ses-0
1_run-34706_mod-T1w_defacemask.nii.gz -f 0.5 -B
[info] - checking output:
/tmp/brainprep-defacing/derivatives/defacing/subjects/sub-01/ses-01/sub-01_ses-0
1_run-34706_mod-T1w_deface.nii.gz
[info] - checking output:
/tmp/brainprep-defacing/derivatives/defacing/subjects/sub-01/ses-01/sub-01_ses-0
1_run-34706_mod-T1w_defacemask.nii.gz
[info] - checking output:
/tmp/brainprep-defacing/derivatives/defacing/subjects/sub-01/ses-01/figures/sub-
01_ses-01_run-34706_mod-T1w_defacemosaic.png
[info] - checking output:
/tmp/brainprep-defacing/derivatives/defacing/subjects/sub-01/ses-01/sub-01_ses-0
1_run-34706_mod-T1w_defacemask.tsv
[title] - Subject Level Defacing done.
Bunch(
step1: Bunch(
module: 'brainprep.workflow.defacing.brainprep_defacing'
description: '\n Defacing pre-processing workflow for anatomical T1-weighted images.\n\n Applies FSL\'s `fsl_deface` tool :footcite:p:`almagro2018deface` with\n default settings to remove facial features (face and ears) from the input\n image. This includes:\n\n 1) Reorient the T1w image to standard MNI152 template space.\n 2) Deface the T1w image.\n 3) Generate a mosaic image of the defaced T1w image.\n\n Parameters\n ----------\n t1_file : File\n Path to the input T1w anatomical image file.\n output_dir : Directory\n Directory where the defaced image and related outputs will be saved\n (i.e., the root of your dataset).\n keep_intermediate : bool\n If True, retains intermediate results (e.g., reoriented image); useful\n for debugging. Default False.\n **kwargs : dict\n entities: dict\n Dictionary of parsed BIDS entities.\n\n Returns\n -------\n Bunch\n A dictionary-like object containing:\n\n - deface_t1_file : File - path to the defaced image.\n - mask_file : File - path to the defacing mask.\n - mosaic_file : File - path to defacing snapshots.\n - summary_file : File - a TSV file containing voxel counts and\n physical volumes (in mm³) for the brain/defacing masks and\n their intersection.\n\n Raises\n ------\n ValueError\n If the T1w file do not follow BIDS convention.\n\n Notes\n -----\n This workflow assumes the input image is a valid T1-weighted anatomical\n scan.\n\n References\n ----------\n\n .. footbibliography::\n\n Examples\n --------\n >>> from brainprep.config import Config\n >>> from brainprep.reporting import RSTReport\n >>> from brainprep.workflow import brainprep_defacing\n >>>\n >>> with Config(dryrun=True, verbose=False):\n ... report = RSTReport()\n ... outputs = brainprep_defacing(\n ... t1_file=(\n ... "/tmp/dataset/rawdata/sub-01/ses-01/anat/"\n ... "sub-01_ses-01_run-01_T1w.nii.gz"\n ... ),\n ... output_dir="/tmp/dataset/derivatives",\n ... )\n >>> outputs\n Bunch(\n deface_t1_file: PosixPath(\'...\')\n mask_file: PosixPath(\'...\')\n mosaic_file: PosixPath(\'...\')\n summary_file: PosixPath(\'...\')\n )\n '
inputs: Bunch(
t1_file: PosixPath('/tmp/brainprep-data/rawdata/sub-01/ses-01/anat/sub-01_T1w.nii.gz')
output_dir: PosixPath('/tmp/brainprep-defacing/derivatives/defacing/subjects/sub-01/ses-01')
keep_intermediate: True
kwargs: {'entities': {'sub': '01', 'modality': 'T1w', 'mod': 'T1w', 'ses': '01', 'run': '34706'}}
)
outputs: Bunch(
deface_t1_file: PosixPath('/tmp/brainprep-defacing/derivatives/defacing/subjects/sub-01/ses-01/sub-01_ses-01_run-34706_mod-T1w_deface.nii.gz')
mask_file: PosixPath('/tmp/brainprep-defacing/derivatives/defacing/subjects/sub-01/ses-01/sub-01_ses-01_run-34706_mod-T1w_defacemask.nii.gz')
mosaic_file: PosixPath('/tmp/brainprep-defacing/derivatives/defacing/subjects/sub-01/ses-01/figures/sub-01_ses-01_run-34706_mod-T1w_defacemosaic.png')
summary_file: PosixPath('/tmp/brainprep-defacing/derivatives/defacing/subjects/sub-01/ses-01/sub-01_ses-01_run-34706_mod-T1w_defacemask.tsv')
)
runtime: Bunch(
start: '2026-04-01 12:42:18.850369'
end: '2026-04-01 12:42:18.871636'
execution_time: 5.907500000000001e-06
brainprep_version: '2.0.0'
platform: 'Linux-6.17.0-1008-azure-x86_64-with-glibc2.39'
hostname: 'runnervmrg6be'
)
config: Bunch(
verbose: True
dryrun: True
no_color: False
skip_run_check: False
cat12_file: PosixPath('/opt/cat12/standalone/cat_standalone.sh')
spm12_dir: PosixPath('/opt/cat12')
matlab_dir: PosixPath('/opt/MCR-2017b/v93')
tpm_file: PosixPath('/opt/cat12/spm12_mcr/home/gaser/gaser/spm/spm12/tpm/TPM.nii')
darteltpm_file: PosixPath('/opt/cat12/spm12_mcr/home/gaser/gaser/spm/spm12/toolbox/cat12/templates_MNI152NLin2009cAsym/Template_1_Dartel.nii')
)
)
step2: Bunch(
module: 'brainprep.interfaces.fsl.reorient'
description: "\n Reorients a BIDS-compliant anatomical image using FSL's `fslreorient2std`.\n\n Parameters\n ----------\n image_file : File\n Path to the input image file.\n output_dir : Directory\n Directory where the reoriented image will be saved.\n entities : dict\n A dictionary of parsed BIDS entities including modality.\n\n Returns\n -------\n command : list[str]\n Reorientation command-line.\n outputs : tuple[File]\n - reorient_image_file : File - Reoriented input image file.\n "
trace: 'brainprep.workflow.defacing.brainprep_defacing'
inputs: Bunch(
image_file: PosixPath('/tmp/brainprep-data/rawdata/sub-01/ses-01/anat/sub-01_T1w.nii.gz')
output_dir: PosixPath('/tmp/brainprep-defacing/derivatives/defacing/subjects/sub-01/ses-01/workspace')
entities: {'sub': '01', 'modality': 'T1w', 'mod': 'T1w', 'ses': '01', 'run': '34706'}
)
outputs: Bunch(
outputs: (['fslreorient2std', '/tmp/brainprep-data/rawdata/sub-01/ses-01/anat/sub-01_T1w.nii.gz', '/tmp/brainprep-defacing/derivatives/defacing/subjects/sub-01/ses-01/workspace/sub-01_ses-01_run-34706_mod-T1w_reorient.nii.gz'], (PosixPath('/tmp/brainprep-defacing/derivatives/defacing/subjects/sub-01/ses-01/workspace/sub-01_ses-01_run-34706_mod-T1w_reorient.nii.gz'),))
)
runtime: Bunch(
start: '2026-04-01 12:42:18.854282'
end: '2026-04-01 12:42:18.854344'
execution_time: 1.7222222222222222e-08
brainprep_version: '2.0.0'
platform: 'Linux-6.17.0-1008-azure-x86_64-with-glibc2.39'
hostname: 'runnervmrg6be'
)
config: Bunch(
verbose: True
dryrun: True
no_color: False
skip_run_check: False
cat12_file: PosixPath('/opt/cat12/standalone/cat_standalone.sh')
spm12_dir: PosixPath('/opt/cat12')
matlab_dir: PosixPath('/opt/MCR-2017b/v93')
tpm_file: PosixPath('/opt/cat12/spm12_mcr/home/gaser/gaser/spm/spm12/tpm/TPM.nii')
darteltpm_file: PosixPath('/opt/cat12/spm12_mcr/home/gaser/gaser/spm/spm12/toolbox/cat12/templates_MNI152NLin2009cAsym/Template_1_Dartel.nii')
)
)
step3: Bunch(
module: 'brainprep.interfaces.freesurfer.brainmask'
description: "\n Skull-strip a BIDS-compliant anatomical image using FreeSurfer's\n `mri_synthstrip`.\n\n `mri_synthstrip` is a FreeSurfer command-line tool that applies\n SynthStrip, a deep learning-ased skull-stripping method developed to\n work across diverse imaging modalities, resolutions, and subject\n population :footcite:p:`hoopes2022brainmask`.\n\n Parameters\n ----------\n image_file : File\n Path to the input image file (T1w, T2w, FLAIR, etc.).\n output_dir : Directory\n Directory where the reoriented image will be saved.\n entities : dict\n A dictionary of parsed BIDS entities including modality.\n\n Returns\n -------\n command : list[str]\n Skull-stripping command-line.\n outputs : tuple[File]\n - mask_file : File - Skull-stripped brain image file.\n\n References\n ----------\n\n .. footbibliography::\n "
trace: 'brainprep.workflow.defacing.brainprep_defacing'
inputs: Bunch(
image_file: PosixPath('/tmp/brainprep-defacing/derivatives/defacing/subjects/sub-01/ses-01/workspace/sub-01_ses-01_run-34706_mod-T1w_reorient.nii.gz')
output_dir: PosixPath('/tmp/brainprep-defacing/derivatives/defacing/subjects/sub-01/ses-01/workspace')
entities: {'sub': '01', 'modality': 'T1w', 'mod': 'T1w', 'ses': '01', 'run': '34706'}
)
outputs: Bunch(
outputs: (['mri_synthstrip', '-i', '/tmp/brainprep-defacing/derivatives/defacing/subjects/sub-01/ses-01/workspace/sub-01_ses-01_run-34706_mod-T1w_reorient.nii.gz', '-m', '/tmp/brainprep-defacing/derivatives/defacing/subjects/sub-01/ses-01/workspace/sub-01_ses-01_run-34706_mod-T1w_brainmask.nii.gz', '--no-csf'], (PosixPath('/tmp/brainprep-defacing/derivatives/defacing/subjects/sub-01/ses-01/workspace/sub-01_ses-01_run-34706_mod-T1w_brainmask.nii.gz'),))
)
runtime: Bunch(
start: '2026-04-01 12:42:18.858587'
end: '2026-04-01 12:42:18.858636'
execution_time: 1.3611111111111111e-08
brainprep_version: '2.0.0'
platform: 'Linux-6.17.0-1008-azure-x86_64-with-glibc2.39'
hostname: 'runnervmrg6be'
)
config: Bunch(
verbose: True
dryrun: True
no_color: False
skip_run_check: False
cat12_file: PosixPath('/opt/cat12/standalone/cat_standalone.sh')
spm12_dir: PosixPath('/opt/cat12')
matlab_dir: PosixPath('/opt/MCR-2017b/v93')
tpm_file: PosixPath('/opt/cat12/spm12_mcr/home/gaser/gaser/spm/spm12/tpm/TPM.nii')
darteltpm_file: PosixPath('/opt/cat12/spm12_mcr/home/gaser/gaser/spm/spm12/toolbox/cat12/templates_MNI152NLin2009cAsym/Template_1_Dartel.nii')
)
)
step4: Bunch(
module: 'brainprep.interfaces.fsl.deface'
description: "\n Defaces a BIDS-compliant T1-weighted anatomical image using FSL's\n `fsl_deface`.\n\n Parameters\n ----------\n t1_file : File\n Path to the input T1w image file.\n output_dir : Directory\n Directory where the defaced T1w image will be saved.\n entities : dict\n A dictionary of parsed BIDS entities including modality.\n\n Returns\n -------\n command : list[str]\n Defacing command-line.\n outputs : tuple[File | list[File]]\n - deface_file : File - Defaced input T1w image file.\n - mask_file : File - Defacing binary mask.\n - vol_files : list[File] - Defacing 3d rendering.\n\n Raises\n ------\n ValueError\n If the input image is not a T1-weighted image.\n "
trace: 'brainprep.workflow.defacing.brainprep_defacing'
inputs: Bunch(
t1_file: PosixPath('/tmp/brainprep-defacing/derivatives/defacing/subjects/sub-01/ses-01/workspace/sub-01_ses-01_run-34706_mod-T1w_reorient.nii.gz')
output_dir: PosixPath('/tmp/brainprep-defacing/derivatives/defacing/subjects/sub-01/ses-01')
entities: {'sub': '01', 'modality': 'T1w', 'mod': 'T1w', 'ses': '01', 'run': '34706'}
)
outputs: Bunch(
outputs: (['fsl_deface', '/tmp/brainprep-defacing/derivatives/defacing/subjects/sub-01/ses-01/workspace/sub-01_ses-01_run-34706_mod-T1w_reorient.nii.gz', '/tmp/brainprep-defacing/derivatives/defacing/subjects/sub-01/ses-01/sub-01_ses-01_run-34706_mod-T1w_deface.nii.gz', '-d', '/tmp/brainprep-defacing/derivatives/defacing/subjects/sub-01/ses-01/sub-01_ses-01_run-34706_mod-T1w_defacemask.nii.gz', '-f', '0.5', '-B'], (PosixPath('/tmp/brainprep-defacing/derivatives/defacing/subjects/sub-01/ses-01/sub-01_ses-01_run-34706_mod-T1w_deface.nii.gz'), PosixPath('/tmp/brainprep-defacing/derivatives/defacing/subjects/sub-01/ses-01/sub-01_ses-01_run-34706_mod-T1w_defacemask.nii.gz')))
)
runtime: Bunch(
start: '2026-04-01 12:42:18.862634'
end: '2026-04-01 12:42:18.862721'
execution_time: 2.4166666666666668e-08
brainprep_version: '2.0.0'
platform: 'Linux-6.17.0-1008-azure-x86_64-with-glibc2.39'
hostname: 'runnervmrg6be'
)
config: Bunch(
verbose: True
dryrun: True
no_color: False
skip_run_check: False
cat12_file: PosixPath('/opt/cat12/standalone/cat_standalone.sh')
spm12_dir: PosixPath('/opt/cat12')
matlab_dir: PosixPath('/opt/MCR-2017b/v93')
tpm_file: PosixPath('/opt/cat12/spm12_mcr/home/gaser/gaser/spm/spm12/tpm/TPM.nii')
darteltpm_file: PosixPath('/opt/cat12/spm12_mcr/home/gaser/gaser/spm/spm12/toolbox/cat12/templates_MNI152NLin2009cAsym/Template_1_Dartel.nii')
)
)
step5: Bunch(
module: 'brainprep.interfaces.plotting.plot_defacing_mosaic'
description: '\n Generates a defacing mosaic image by overlaying a mask on an anatomical\n image.\n\n Parameters\n ----------\n im_file : File\n Path to the anatomical image.\n mask_file : File\n Path to the defacing mask.\n output_dir : Directory\n Directory where the mosaic image will be saved.\n entities : dict\n A dictionary of parsed BIDS entities including modality.\n dryrun : bool\n If True, skip actual computation and file writing. Default False.\n\n Returns\n -------\n mosaic_file : File\n Path to the saved mosaic image.\n '
trace: 'brainprep.workflow.defacing.brainprep_defacing'
inputs: Bunch(
im_file: PosixPath('/tmp/brainprep-defacing/derivatives/defacing/subjects/sub-01/ses-01/sub-01_ses-01_run-34706_mod-T1w_defacemask.nii.gz')
mask_file: PosixPath('/tmp/brainprep-data/rawdata/sub-01/ses-01/anat/sub-01_T1w.nii.gz')
output_dir: PosixPath('/tmp/brainprep-defacing/derivatives/defacing/subjects/sub-01/ses-01/figures')
entities: {'sub': '01', 'modality': 'T1w', 'mod': 'T1w', 'ses': '01', 'run': '34706'}
dryrun: False
)
outputs: Bunch(
outputs: (PosixPath('/tmp/brainprep-defacing/derivatives/defacing/subjects/sub-01/ses-01/figures/sub-01_ses-01_run-34706_mod-T1w_defacemosaic.png'),)
)
runtime: Bunch(
start: '2026-04-01 12:42:18.867590'
end: '2026-04-01 12:42:18.867633'
execution_time: 1.1944444444444444e-08
brainprep_version: '2.0.0'
platform: 'Linux-6.17.0-1008-azure-x86_64-with-glibc2.39'
hostname: 'runnervmrg6be'
)
config: Bunch(
verbose: True
dryrun: True
no_color: False
skip_run_check: False
cat12_file: PosixPath('/opt/cat12/standalone/cat_standalone.sh')
spm12_dir: PosixPath('/opt/cat12')
matlab_dir: PosixPath('/opt/MCR-2017b/v93')
tpm_file: PosixPath('/opt/cat12/spm12_mcr/home/gaser/gaser/spm/spm12/tpm/TPM.nii')
darteltpm_file: PosixPath('/opt/cat12/spm12_mcr/home/gaser/gaser/spm/spm12/toolbox/cat12/templates_MNI152NLin2009cAsym/Template_1_Dartel.nii')
)
)
step6: Bunch(
module: 'brainprep.interfaces.utils.maskdiff'
description: '\n Compute summary statistics comparing two binary masks.\n\n This function loads two binary mask images, verifies that they share\n the same spatial dimensions and affine transformation, computes their\n voxel-wise intersection, and writes a summary table containing voxel\n counts and physical volumes (in mm³) for each mask and their intersection.\n\n Parameters\n ----------\n mask1_file : File\n Path to the first binary mask image.\n mask2_file : File\n Path to the second binary mask image.\n output_dir : Directory\n Directory where the defacing mask will be saved.\n entities : dict\n A dictionary of parsed BIDS entities including modality.\n inv_mask1 : bool\n If True, the first mask is inverted before comparison. This is\n useful when the mask represents an exclusion region rather than an\n inclusion region. Default False.\n inv_mask2 : bool\n If True, the second mask is inverted before comparison. This is\n useful when the mask represents an exclusion region rather than an\n inclusion region. Default False.\n dryrun : bool\n If True, skip actual computation and file writing. Default False.\n\n Returns\n -------\n summary_file : File\n Path to the generated summary TSV file.\n\n Raises\n ------\n ValueError\n If both masks have not identical shapes and affines.\n '
trace: 'brainprep.workflow.defacing.brainprep_defacing'
inputs: Bunch(
mask1_file: PosixPath('/tmp/brainprep-defacing/derivatives/defacing/subjects/sub-01/ses-01/workspace/sub-01_ses-01_run-34706_mod-T1w_brainmask.nii.gz')
mask2_file: PosixPath('/tmp/brainprep-defacing/derivatives/defacing/subjects/sub-01/ses-01/sub-01_ses-01_run-34706_mod-T1w_defacemask.nii.gz')
output_dir: PosixPath('/tmp/brainprep-defacing/derivatives/defacing/subjects/sub-01/ses-01')
entities: {'sub': '01', 'modality': 'T1w', 'mod': 'T1w', 'ses': '01', 'run': '34706'}
inv_mask1: False
inv_mask2: True
dryrun: False
)
outputs: Bunch(
outputs: (PosixPath('/tmp/brainprep-defacing/derivatives/defacing/subjects/sub-01/ses-01/sub-01_ses-01_run-34706_mod-T1w_defacemask.tsv'),)
)
runtime: Bunch(
start: '2026-04-01 12:42:18.871049'
end: '2026-04-01 12:42:18.871074'
execution_time: 6.944444444444445e-09
brainprep_version: '2.0.0'
platform: 'Linux-6.17.0-1008-azure-x86_64-with-glibc2.39'
hostname: 'runnervmrg6be'
)
config: Bunch(
verbose: True
dryrun: True
no_color: False
skip_run_check: False
cat12_file: PosixPath('/opt/cat12/standalone/cat_standalone.sh')
spm12_dir: PosixPath('/opt/cat12')
matlab_dir: PosixPath('/opt/MCR-2017b/v93')
tpm_file: PosixPath('/opt/cat12/spm12_mcr/home/gaser/gaser/spm/spm12/tpm/TPM.nii')
darteltpm_file: PosixPath('/opt/cat12/spm12_mcr/home/gaser/gaser/spm/spm12/toolbox/cat12/templates_MNI152NLin2009cAsym/Template_1_Dartel.nii')
)
)
)
[title] - Group Level Defacing...
[info] - checking output:
/tmp/brainprep-defacing/derivatives/defacing/quality_check/mask_overlap.tsv
[info] - checking output:
/tmp/brainprep-defacing/derivatives/defacing/figures/histogram_overlap.png
[title] - Group Level Defacing done.
CLI¶
Let’s now generate the same analysis using the CLI. The goal here is to translate the workflow calls into explicit shell commands. See user guide for details.
[[['brainprep',
'subject-level-defacing',
'--t1_file',
'/tmp/brainprep-data/rawdata/sub-01/ses-01/anat/sub-01_T1w.nii.gz',
'--output-dir',
'/tmp/brainprep-defacing',
'--keep-intermediate']],
[['brainprep',
'group-level-defacing',
'--output-dir',
'/tmp/brainprep-defacing']]]
Container¶
Note that the commands generated by the CLI are not limited to being displayed for reference; they can also be executed directly within the workflow‑dedicated container. By running the commands inside the container, you benefit from a controlled runtime context where all necessary dependencies, libraries, and configuration files are already available. In practice, this means that once the CLI has produced the appropriate instructions, you can simply copy and run them inside the container to achieve the intended results. You can find the BrainPrep images on Docker Hub: Neurospin Docker Hub.
Total running time of the script: (0 minutes 0.780 seconds)
Estimated memory usage: 131 MB