MEDEFACE(1)

πŸ“¦
version 4.6.2 Β· 2 versions
, in fedora 43

πŸŽ€ 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 then pattern is used πŸ‘‘
  • -p LABEL [LABEL ...], --participant LABEL [LABEL ...] β€” space separated list of sub-# identifiers to be processed (the sub- 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 to pydeface.
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