Skip to content

Commit

Permalink
Merge pull request #25 from ivadomed/jca/update-lesion-seg-procedure
Browse files Browse the repository at this point in the history
Update documentation for manual lesion creation
  • Loading branch information
valosekj authored Mar 2, 2023
2 parents 7baa345 + 99f2d73 commit dc33f94
Showing 1 changed file with 33 additions and 1 deletion.
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).

0 comments on commit dc33f94

Please sign in to comment.