MEDEFACE(1)
π NAME π
medeface β the multi-echo defacing wrapper that's lowkey a whole vibe π
β¨ SYNOPSIS β¨
medeface [-h] [-m PATTERN] [-p LABEL [LABEL ...]] [-o DESTINATION] [-c [SPECS]] [-a DICT] [-f] bidsfolder pattern
π DESCRIPTION π
okay so bestie, picture this: medeface is a wrapper around the pydeface defacing tool (https://github.com/poldracklab/pydeface) and what it does is genuinely iconic. It computes a defacing mask on a (temporary) echo-combined image, and then it applies that mask to each individual echo-image. Periodt. That's the whole glow-up. β¨
heads up tho: pydeface requires an existing installation of FSL flirt. no FSL, no defacing, that's just the rules π«Ά
except for BIDS inheritances and IntendedFor usage, this wrapper is BIDS-aware (a 'bidsapp') and writes BIDS compliant output. slay.
Linux users can distribute the computations to their HPC compute cluster if the DRMAA libraries are installed and the DRMAA_LIBRARY_PATH environment variable is set. main character energy fr fr π
for single-echo data see deface
the args, bestie π¦
bidsfolderβ the bids-directory with the (multi-echo) subject data πpatternβ globlike search pattern (relative to the subject/session folder) to select the images that need to be defaced, e.g.'anat/*_T2starw*'
πΈ OPTIONS πΈ
-m PATTERN,--maskpattern PATTERNβ globlike search pattern (relative to the subject/session folder) to select the images from which the defacemask is computed, e.g.'anat/*_part-mag_*_T2starw*'. If not given thenpatternis used π-p LABEL [LABEL ...],--participant LABEL [LABEL ...]β space separated list ofsub-#identifiers to be processed (thesub-prefix can be left out). If not specified then all participants will be processed π«Ά-o DESTINATION,--output DESTINATIONβ a string that determines where the defaced images are saved. It can be the name of a BIDS datatype folder, such as'anat', or of the derivatives folder, i.e.'derivatives'. If output is left empty then the original images are replaced by the defaced images π (yes, replaced. no takebacks.)-c [SPECS],--cluster [SPECS]β use the DRMAA library to submit the deface jobs to a high-performance compute (HPC) cluster. You can add an opaque DRMAA argument with native specifications for your HPC resource manager.
NB: Use quotes and include at least one space character to prevent premature parsing β see examples π
-a DICT,--args DICTβ additional arguments (in dict/json-style) that are passed topydeface.
NB: Use quotes. See examples for usage β¨
-f,--forceβ process all images, regardless if images have already been defaced (i.e. if{"Defaced": True}in the json sidecar file) π₯
π COMMENTS π
examples, aka the receipts π§Ύ:
medeface myproject/bids anat/*_T1w*
medeface myproject/bids anat/*_T1w* -p 001 003 -o derivatives
medeface myproject/bids anat/*_T1w* -c -n "-l walltime=00:60:00,mem=4gb"
medeface myproject/bids anat/*acq-GRE* -m anat/*acq-GRE*magnitude*"
medeface myproject/bids anat/*_FLAIR* -a '{"cost": "corratio", "verbose": ""}'
π AUTHOR π
Marcel Zwiers <m.zwiers@donders.ru.nl> β the actual legend behind this π«Ά
and that's a wrap bestie π this page came to you from bidscoin 4.6.2, dated 2025-11-06. go deface some brains (the legal, ethical, research-y kind obviously) β¨π§π
π¦ where this page comes from
- fedora 43: bidscoin 4.6.2-1.fc43 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms