medeface - Man Page
Synopsis
medeface [-h] [-m PATTERN] [-p LABEL [LABEL ...]] [-o DESTINATION] [-c [SPECS]] [-a DICT] [-f] bidsfolder pattern
Description
A wrapper around the 'pydeface' defacing tool (https://github.com/poldracklab/pydeface) that computes a defacing mask on a (temporary) echo-combined image and then applies it to each individual echo-image. Pydeface requires an existing installation of FSL flirt
Except for BIDS inheritances and IntendedFor usage, this wrapper is BIDS-aware (a 'bidsapp') and writes BIDS compliant output
Linux users can distribute the computations to their HPC compute cluster if the DRMAA libraries are installed and the DRMAA_LIBRARY_PATH environment variable set
For single-echo data see `deface`
- 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
- -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:
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>