@@ -35,46 +35,49 @@ This software can be installed via source or via pip from PyPi with `pip install
3535** _ NOTE:_ ** This project is currently in beta release, some features listed below may not be available for version numbers < 1.0.0
3636
3737``` bash
38- usage: petdeface.py [-h] [--output_dir OUTPUT_DIR] [--anat_only ]
39- [--subject SUBJECT ] [--session SESSION ] [--docker ]
40- [--singularity] [--n_procs N_PROCS] [--skip_bids_validator]
41- [--version] [--placement PLACEMENT] [--remove_existing]
42- [--excludesubject] input_dir
38+ usage: petdeface.py [-h] [--anat_only] [--participant_label PARTICIPANT_LABEL [PARTICIPANT_LABEL ...]] [--docker] [--singularity] [--n_procs N_PROCS ]
39+ [--skip_bids_validator] [--version ] [--placement PLACEMENT ] [--remove_existing] [--preview_pics ]
40+ [--participant_label_exclude participant_label_exclude [participant_label_exclude ...]] [--session_label SESSION [SESSION ...]]
41+ [--session_label_exclude session_label_exclude [session_label_exclude ...]]
42+ bids_dir [output_dir] [analysis_level]
4343
4444PetDeface
4545
4646positional arguments:
47- input_dir The directory with the input dataset
47+ bids_dir The directory with the input dataset
48+ output_dir The directory where the output files should be stored, if not supplied will default to < bids_dir> /derivatives/petdeface
49+ analysis_level This BIDS app always operates at the participant level, if this argument is changed it will be ignored and run as a participant level
50+ analysis
4851
4952options:
5053 -h, --help show this help message and exit
51- --output_dir OUTPUT_DIR, -o OUTPUT_DIR
52- The directory where the output files should be stored
5354 --anat_only, -a Only deface anatomical images
54- --subject SUBJECT, -s SUBJECT
55- The label of the subject to be processed.
56- --session SESSION, -ses SESSION
57- The label of the session to be processed.
55+ --participant_label PARTICIPANT_LABEL [PARTICIPANT_LABEL ...], -pl PARTICIPANT_LABEL [PARTICIPANT_LABEL ...]
56+ The label(s) of the participant/subject to be processed. When specifying multiple subjects separate them with spaces.
5857 --docker, -d Run in docker container
5958 --singularity, -si Run in singularity container
6059 --n_procs N_PROCS Number of processors to use when running the workflow
6160 --skip_bids_validator
62- --version, -v show programs version number and exit
61+ --version, -v show program ' s version number and exit
6362 --placement PLACEMENT, -p PLACEMENT
64- Where to place the defaced images. Options are
65- ' adjacent' : next to the input_dir (default) in a folder appended with _defaced
66- ' inplace' : defaces the dataset in place, e.g. replaces faced PET and T1w images
67- w/ defaced at input_dir
68- ' derivatives' : does all of the defacing within the derivatives folder in input_dir.
69- --remove_existing, -r Remove existing output files in output_dir.
70- --excludesubject EXCLUDESUBJECT [EXCLUDESUBJECT ...]
71- Exclude a subject(s) from the defacing workflow. e.g. --excludesubject sub-01 sub-02
63+ Where to place the defaced images. Options are ' adjacent' : next to the bids_dir (default) in a folder appended with _defaced' inplace' :
64+ defaces the dataset in place, e.g. replaces faced PET and T1w images w/ defaced at bids_dir' derivatives' : does all of the defacing within
65+ the derivatives folder in bids_dir.
66+ --remove_existing, -r
67+ Remove existing output files in output_dir.
68+ --preview_pics Create preview pictures of defacing, defaults to false for docker
69+ --participant_label_exclude participant_label_exclude [participant_label_exclude ...]
70+ Exclude a subject(s) from the defacing workflow. e.g. --participant_label_exclude sub-01 sub-02
71+ --session_label SESSION [SESSION ...]
72+ Select only a specific session(s) to include in the defacing workflow
73+ --session_label_exclude session_label_exclude [session_label_exclude ...]
74+ Select a specific session(s) to exclude from the defacing workflow
7275```
7376
7477Working example usage:
7578
7679```bash
77- petdeface /inputfolder --output_dir /outputfolder --n_procs 16 --skip_bids_validator --placement adjacent
80+ petdeface /inputfolder /outputfolder --n_procs 16 --skip_bids_validator --placement adjacent
7881```
7982
8083### Docker Usage
@@ -107,7 +110,7 @@ docker run --user=$UID:$GID -a stderr -a stdout --rm \
107110-v /Data/defaced_pet_data/:/output \
108111-v /home/freesurfer/license.txt:/opt/freesurfer/license.txt \
109112--platform linux/amd64 \
110- petdeface:latest /input --output_dir /output --n_procs 16 --skip_bids_validator --placement adjacent --user=$UID :$GID system_platform=Linux
113+ petdeface:latest /input /output --n_procs 16 --skip_bids_validator --placement adjacent --user=$UID:$GID system_platform=Linux
111114```
112115
113116### Singularity Usage
@@ -127,7 +130,7 @@ Otherwise, one can run and execute petdeface with the same syntax as calling it
127130with ` singularity exec -e`
128131
129132` ` ` bash
130- singularity exec -e --bind license.txt:/opt/freesurfer/license.txt docker://openneuropet/petdeface:0.1.1 petdeface /input --output-dir /output --n_procs 10
133+ singularity exec -e --bind license.txt:/opt/freesurfer/license.txt docker://openneuropet/petdeface:0.1.1 petdeface /input /output --n_procs 10
131134` ` `
132135
133136** _NOTE_** : Testing with singularity has been limited to version singularity-ce 4.2.0, please let us know in the issues section of this repo if you have
0 commit comments