Skip to content

Commit dd31638

Browse files
committed
Merge branch 'integrate-into-bids-tree' of github.com:nih-fmrif/dsst-defacing-pipeline into integrate-into-bids-tree
2 parents eaf6404 + 6f353d9 commit dd31638

File tree

2 files changed

+4
-53
lines changed

2 files changed

+4
-53
lines changed

README.md

Lines changed: 4 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The defacing pipeline for datasets curated by the [Data Science and Sharing Team
1313
3. Visually inspect defaced scans with your preferred QC tool.
1414
4. Fix defacings that failed visual inspection.
1515

16-
![Generate and finalize "primary" scans to "secondary" scans mapping file.](images/generate_mappings.png)
16+
![Generate and finalize "primary" scans to "secondary" scans mapping file.](images/pipeline_screen_quality.png)
1717

1818
## Example
1919

@@ -36,63 +36,14 @@ Download data in `anat` directories of the dataset.
3636
datalad get sub-01/ses-*/anat
3737
```
3838

39-
BIDS tree snippet post-download:
40-
41-
```bash
42-
$ tree ../datasets/ds000031/
43-
../datasets/ds000031/
44-
├── CHANGES
45-
├── README
46-
├── dataset_description.json
47-
├── events.json
48-
├── participants.json
49-
├── participants.tsv
50-
├── sub-01
51-
│ ├── ses-001
52-
│ │ ├── anat
53-
│ │ │ ├── sub-01_ses-001_T1w.json
54-
│ │ │ └── sub-01_ses-001_T1w.nii.gz
55-
│ │ ├── sub-01_ses-001_scans.json
56-
│ │ └── sub-01_ses-001_scans.tsv
57-
│ ├── ses-003
58-
│ │ ├── anat
59-
│ │ ├── sub-01_ses-003_scans.json
60-
│ │ └── sub-01_ses-003_scans.tsv
61-
...
62-
└── task-spatialwm_events.json
63-
```
64-
65-
66-
67-
68-
69-
### **Step 1:** Generate mapping file.
70-
71-
a. Generate a mapping file using the `generate_mappings.py` script.
72-
b. Look at your mapping file. Make sure it's not empty. Edit it, if there are any special cases you'd like to account for.
73-
74-
```
75-
$ python generate_mappings.py -i ../datasets/ds000031 -o ./examples
76-
====================
77-
Dataset Summary
78-
====================
79-
Total number of sessions with 'anat' directory in the dataset: 24
80-
Sessions with 'anat' directory with at least one T1w scan: 22
81-
Sessions without a T1w scan: 2
82-
List of sessions without a T1w scan:
83-
['sub-01/ses-053', 'sub-01/ses-016']
84-
85-
Please find the mapping file in JSON format and other helpful logs at /Users/arshithab/dsst-defacing-pipeline/examples
86-
```
87-
88-
### **Step 2:** Deface scans
39+
### **Step 1:** Deface scans
8940
Run `dsst_defacing_wf.py` script that calls on `deface.py` and `register.py` to deface scans in the dataset.
9041

9142
#### Option 1: Serially
9243
If you have a small dataset with less than 10 subjects, then it might be easiest to run the defacing algorithm serially.
9344

9445
```bash
95-
python dsst_defacing_wf.py -i ../datasets/ds000031 -m examples/primary_to_others_mapping.json -o examples
46+
python dsst_defacing_wf.py -i ../datasets/ds000031 -o examples
9647
```
9748

9849
#### Option 2: Parallelly
@@ -103,7 +54,7 @@ for i in `ls -d ../datasets/toy/*`; do SUBJ=$(echo $i | sed 's|../datasets/toy/|
10354
swarm -f ./examples/defacing_parallel.swarm --module afni,fsl --merge-output --logdir ./examples/swarm_log
10455
```
10556

106-
### **Step 3:** Visually QC defaced scans.
57+
### **Step 2:** Visually QC defaced scans.
10758

10859
Visual QC defacing accuracy gallery https://raamana.github.io/visualqc/gallery_defacing.html
10960

images/pipeline_screen_quality.png

50.5 KB
Loading

0 commit comments

Comments
 (0)