Skip to content

Commit 3a0bf86

Browse files
committed
Merge branch 'no-anatomical' of github.com:openneuropet/petdeface into no-anatomical
2 parents 796f80f + beb5c62 commit 3a0bf86

File tree

3 files changed

+8
-16
lines changed

3 files changed

+8
-16
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ This software can be installed via source or via pip from PyPi with `pip install
3636

3737
```bash
3838
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]
39+
[--skip_bids_validator] [--version] [--placement PLACEMENT] [--remove_existing]
4040
[--participant_label_exclude participant_label_exclude [participant_label_exclude ...]] [--session_label SESSION [SESSION ...]]
41-
[--session_label_exclude session_label_exclude [session_label_exclude ...]]
41+
[--session_label_exclude session_label_exclude [session_label_exclude ...]] [--open_browser]
4242
bids_dir [output_dir] [analysis_level]
4343

4444
PetDeface
@@ -63,15 +63,15 @@ options:
6363
Where to place the defaced images. Options are 'adjacent': next to the bids_dir (default) in a folder appended with _defaced'inplace':
6464
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
6565
the derivatives folder in bids_dir.
66-
--remove_existing, -r
67-
Remove existing output files in output_dir.
66+
--remove_existing, -r Remove existing output files in output_dir.
6867
--preview_pics Create preview pictures of defacing, defaults to false for docker
6968
--participant_label_exclude participant_label_exclude [participant_label_exclude ...]
7069
Exclude a subject(s) from the defacing workflow. e.g. --participant_label_exclude sub-01 sub-02
7170
--session_label SESSION [SESSION ...]
7271
Select only a specific session(s) to include in the defacing workflow
7372
--session_label_exclude session_label_exclude [session_label_exclude ...]
7473
Select a specific session(s) to exclude from the defacing workflow
74+
--open_browser Open browser to show QA reports after completion
7575
```
7676
7777
Working example usage:

docs/usage.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ options:
123123
Select only a specific session(s) to include in the defacing workflow
124124
--session_label_exclude session_label_exclude [session_label_exclude ...]
125125
Select a specific session(s) to exclude from the defacing workflow
126+
--open_browser Following defacing this flag will open the browser to view the defacing results
126127

127128
Docker Based
128129
------------

petdeface/petdeface.py

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,9 @@
88
from bids import BIDSLayout, BIDSLayoutIndexer
99
import glob
1010
from platform import system
11-
12-
# import shutil
11+
from pathlib import Path
1312
import subprocess
1413
from typing import Union
15-
1614
from nipype.interfaces.freesurfer import MRICoreg
1715
from nipype.interfaces.io import DataSink
1816
from nipype.interfaces.base.traits_extension import File as traits_extensionFile
@@ -21,16 +19,9 @@
2119
from niworkflows.utils.bids import collect_data
2220
from niworkflows.utils.bids import collect_participants
2321
from niworkflows.utils.misc import check_valid_fs_license
24-
2522
from petutils.petutils import collect_anat_and_pet
2623
from importlib.metadata import version
2724

28-
29-
# Import local modules - handle both script and module execution
30-
import sys
31-
import os
32-
from pathlib import Path
33-
3425
# Determine if we're running as a script (including through debugger)
3526
is_script = (
3627
__name__ == "__main__"
@@ -346,7 +337,7 @@ def init_single_subject_wf(
346337
:type bids_data: pathlib.Path, BIDSLayout]
347338
:param output_dir: _description_, defaults to None
348339
:type output_dir: pathlib.Path, optional
349-
:param preview_pics: _description_, defaults to False
340+
:param preview_pics: _description_, defaults to False (soon to be deprecated)
350341
:type preview_pics: bool, optional
351342
:param anat_only: _description_, defaults to False
352343
:type anat_only: bool, optional
@@ -872,7 +863,7 @@ def __init__(
872863
skip_bids_validator=False,
873864
remove_existing=True,
874865
placement="adjacent",
875-
preview_pics=True,
866+
preview_pics=False,
876867
participant_label_exclude=[],
877868
session_label=[],
878869
session_label_exclude=[],

0 commit comments

Comments
 (0)