You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+66-30Lines changed: 66 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,15 +2,23 @@
2
2
3
3
# DSST Defacing Pipeline
4
4
5
-
The DSST Defacing Pipeline has been developed to make the process of defacing anatomical scans of large datasets, visually inspecting for accuracy and fixing scans that fail visual inspection more efficient and straightforward. The pipeline _requires_ the input dataset to be in BIDS format. A conceptual description of the pipeline can found [here](#conceptual-design).
5
+
The DSST Defacing Pipeline has been developed to make the process of defacing anatomical scans of large datasets,
6
+
visually inspecting for accuracy and fixing scans that fail visual inspection more efficient and straightforward. The
7
+
pipeline _requires_ the input dataset to be in BIDS format. A conceptual description of the pipeline can
The script can be run serially on a BIDS dataset or in parallel at subject/session level. The three methods of running the script have been described below with example commands:
42
+
The script can be run serially on a BIDS dataset or in parallel at subject/session level. The three methods of running
43
+
the script have been described below with example commands:
35
44
36
-
**NOTE:** In the example commands below, <path/to/BIDS/input/dataset> and <path/to/desired/output/directory> are placeholders for paths to input and output directories respectively.
45
+
For readability of example commands, the following bash variables have defined as follows:
If you have dataset with over 10 subjects, then it might be more practical to run the pipeline in parallel for every subject in the dataset using the `-p/--participant-id` option as follows:
64
+
65
+
If you have dataset with over 10 subjects, then it might be more practical to run the pipeline in parallel for every
66
+
subject in the dataset using the `-p/--participant-id` option as follows:
If the input dataset has multiple sessions per subject, then run the pipeline on every session in the dataset parallelly. Similar to Option 2, the following commands loop through the dataset to find subject and session IDs to create a `swarm` file to be run on NIH HPC systems.
92
+
93
+
If the input dataset has multiple sessions per subject, then run the pipeline on every session in the dataset
94
+
parallelly. Similar to Option 2, the following commands loop through the dataset to find subject and session IDs to
95
+
create a `swarm` file to be run on NIH HPC systems.
69
96
70
97
```bash
71
-
foriin`ls -d <path/to/BIDS/input/dataset>*`;do
72
-
SUBJ=$(echo $i| sed "s|<path/to/BIDS/input/dataset>/||g");
Pre-requisite: Install VisualQC from https://raamana.github.io/visualqc/installation.html#stable-release[](https://raamana.github.io/visualqc/installation.html#stable-release)
113
+
Pre-requisite: Install VisualQC
114
+
from https://raamana.github.io/visualqc/installation.html#stable-release[](https://raamana.github.io/visualqc/installation.html#stable-release)
115
+
116
+
Once VisualQC is installed, please run the following command to open VisualQC deface GUI to start visually inspecting
117
+
defaced scans:
86
118
87
-
Once VisualQC is installed, please run the following command to open VisualQC deface GUI to start visually inspecting defaced scans:
88
119
```bash
89
120
sh <path/to/defacing/output/directory>/visualqc_prep/defacing_qc_cmd
While describing the process, we frequently use the following terms:
126
+
127
+
While describing the process, we frequently use the following terms:
97
128
98
129
-**Primary Scan:** The best quality T1w scan within a session. For programmatic selection, we assume that the most
99
130
recently acquired T1w scan is of the best quality.
100
131
-**Other/Secondary Scans:** All scans *except* the primary scan are grouped together and referred to as "other" or "
101
132
secondary" scans for a given session.
102
-
-**Mapping File:** A JSON file that assigns maps a primary scan (or `primary_t1`) to all other scans within a session. Please find an example file [here]().
133
+
-**Mapping File:** A JSON file that assigns maps a primary scan (or `primary_t1`) to all other scans within a session.
134
+
Please find an example file [here]().
103
135
-**[VisualQC](https://raamana.github.io/visualqc):** A suite of QC tools developed by Pradeep Raamana (Assistant
104
136
Professor at University of Pittsburgh).
105
137
106
138
## Conceptual design
107
-
1. Generate a ["primary" scans](#terminology) to [other scans'](#terminology) mapping file.
139
+
140
+
1. Generate a ["primary" scans](#terminology) to [other scans'](#terminology) mapping file.
108
141
2. Deface primary scans
109
142
with [@afni_refacer_run](https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/tutorials/refacer/refacer_run.html) program
110
-
developed by the AFNI Team.
111
-
3. To deface remaining scans in the session, register them to the primary scan (using FSL `flirt` command) and then use the primary scan's defacemask to generate a defaced image (using `fslmaths` command).
112
-
4. Visually inspect defaced scans with [VisualQC](https://raamana.github.io/visualqc) deface tool or any other preferred tool.
143
+
developed by the AFNI Team.
144
+
3. To deface remaining scans in the session, register them to the primary scan (using FSL `flirt` command) and then use
145
+
the primary scan's defacemask to generate a defaced image (using `fslmaths` command).
146
+
4. Visually inspect defaced scans with [VisualQC](https://raamana.github.io/visualqc) deface tool or any other preferred
147
+
tool.
113
148
5. Correct/fix defaced scans that failed visual inspection. See [here]() for more info on types of failures.
@@ -120,7 +155,8 @@ While describing the process, we frequently use the following terms:
120
155
BN, Milev R, Müller DJ, Kennedy SH, Scott CJM, Strother SC, and Arnott SR (2021)
121
156
[Multisite Comparison of MRI Defacing Software Across Multiple Cohorts](10.3389/fpsyt.2021.617997). Front. Psychiatry
122
157
12:617997. doi:10.3389/fpsyt.2021.617997
123
-
2.`@afni_refacer_run` is the defacing tool used under the hood. [AFNI Refacer program](https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/tutorials/refacer/refacer_run.html).
158
+
2.`@afni_refacer_run` is the defacing tool used under the
0 commit comments