Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update documentation for manual lesion creation #25

Merged
merged 4 commits into from
Mar 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 33 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,36 @@ To update the dataset, add all manually-corrected files `derivatives/labels/`,

## Manual lesion segmentation

[TODO]
Lesions are segmented on the PSIR or STIR contrasts (when available). The workflow is the following:

- Loop across subjects,
- Load PSIR/STIR in FSLeyes, and overlay the lesion segmentation (if it already exists),
- User create/adjust the segmentation mask using editing tools. Toggle the lesion overlay on/off to help validate the accuracy of the label ('Command F' on a Mac),
- Save the mask

We created a script to do this, which you can download [here](https://github.com/spinalcordtoolbox/manual-correction/tree/r20230302).

Then, run:

```bash
python manual_correction.py -path-in <INPUT_PATH> -config <CONFIG_FILE> -path-out <OUTPUT_PATH>
```

- `INPUT_PATH`: BIDS dataset from which manual lesions will be identified
- `CONFIG_FILE`: YML file that lists all subjects to be included in the manual lesion segmentation. This file can either be generated by SCT's QC report (see section [3. Manual correction of spinal cord segmentation](#3-manual-correction-of-spinal-cord-segmentation) or manually. See example of a YML file below:
- `OUTPUT_PATH`: Optional. If not specified, output segmentations will be generated in the `INPUT_PATH`.

<details><summary>Terminal output</summary>

```yaml
FILES_LESION:
- sub-edm005_ses-M0_PSIR.nii.gz
- sub-edm008_ses-M0_PSIR.nii.gz
- sub-edm010_ses-M0_PSIR.nii.gz
- sub-edm011_ses-M0_PSIR.nii.gz
- sub-edm013_ses-M0_PSIR.nii.gz
```

</details>

Here are several helpful videos reviewing how to correct manual lesion segmentations: [1](https://www.dropbox.com/s/j1f81vtmmmkddtv/Screen%20Recording%202023-01-09%20at%209.45.40%20AM.mov?dl=0), [2](https://www.dropbox.com/s/bm6vpcqe062t2j0/Screen%20Recording%202023-01-11%20at%201.54.36%20PM.mov?dl=0), [3](https://www.dropbox.com/s/00xjsk917wwkp7b/Screen%20Recording%202023-01-11%20at%202.20.58%20PM.mov?dl=0), [4](https://www.dropbox.com/s/3gkrfslf6gflsjg/Screen%20Recording%202023-01-11%20at%203.38.47%20PM.mov?dl=0).