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

Lesion segmentation protocol #9

Draft
wants to merge 28 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
f0b3b34
initialised the lesion_segmentation_protocol.md file based on comment…
plbenveniste Mar 21, 2024
973c5b2
fixed typo based on Julien's comment
plbenveniste Mar 21, 2024
6d01e30
changed criterias to bullet points
plbenveniste Apr 10, 2024
fddd8e3
replace link to example by hyperlink
plbenveniste Apr 10, 2024
2e7d7fd
typo correction in introduction
plbenveniste Apr 10, 2024
3bbcc6a
changed json link to json example in the readme
plbenveniste Apr 10, 2024
ffa1b0a
added examples of complicated lesion segmentations
plbenveniste Apr 10, 2024
61291c7
QC explanation reformatting
plbenveniste Apr 10, 2024
fe015f5
add sct_qc commands
plbenveniste Apr 11, 2024
7e18554
added software section
plbenveniste Apr 11, 2024
b98087b
added ref at the bottom to other segmentation protocols
plbenveniste Apr 11, 2024
77425fb
added step 2 : sc anatomy and lesion segmentation
plbenveniste Apr 11, 2024
6e4a30b
julien typo fix : remove":"
plbenveniste Apr 11, 2024
7e0eac3
typo fix : remove ":" 2
plbenveniste Apr 11, 2024
359f051
rewrite partial volume explanation
plbenveniste Apr 11, 2024
8928382
rewrite sentence on not segmenting above first vert
plbenveniste Apr 11, 2024
f9a370b
rewrite two options for seg
plbenveniste Apr 11, 2024
11ac1d6
rewrite manual correction explanation
plbenveniste Apr 11, 2024
b525c0c
rewrite QC
plbenveniste Apr 11, 2024
5f11e4f
rewrite protocol when unsure
plbenveniste Apr 11, 2024
2982982
change last section name
plbenveniste Apr 11, 2024
e403321
update dataset of multiple contrasts
plbenveniste Apr 11, 2024
be19641
remove dcm and sci
plbenveniste Apr 11, 2024
a021996
remove comment
plbenveniste Apr 11, 2024
657b9bb
add step 3
plbenveniste Apr 11, 2024
63f305c
lesion definition suggestion
plbenveniste Apr 11, 2024
13ca692
typo fix
plbenveniste Apr 11, 2024
888513d
changed step 1 title
plbenveniste Apr 11, 2024
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
72 changes: 72 additions & 0 deletions lesion_segmentation_protocol.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Lesion segmentation protocol

The following details the protocol for Multiple Sclerosis (MS) lesion segmentation in the spinal cord.
Imaging the spinal cord is often essential to confirm the diagnosis of MS. That is because the lesions of the spinal cord are included in the McDonald diagnostic criteria, which considers dissemination in space and in time [(Thompson et al. 2018)](https://pubmed.ncbi.nlm.nih.gov/29275977/). While the MAGNIMS-CMSC-NAIMS working group recommends to use at least two sagittal images for MS diagnosis, still, axial imaging is mentioned as optional in international imaging guidelines [(Wattjes et al. 2021)](https://pubmed.ncbi.nlm.nih.gov/34139157/).
For detecting MS lesions in the spinal cord, two main contrasts emerge: PSIR and STIR contrasts. New studies [(Peters et al. 2024)](https://pubmed.ncbi.nlm.nih.gov/38289376/)[(Fechner et al. 2019)](https://pubmed.ncbi.nlm.nih.gov/30679225/) showed that using PSIR contrasts improved MS lesion detection in the spinal cord. [(Fechner et al. 2019)](https://pubmed.ncbi.nlm.nih.gov/30679225/) showed that the PSIR contrast showed a higher signal-to-noise (SNR) ratio compared to the STIR contrast.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe my suggestion is not up-to-date, but I have doubts/questions abouts STIR sequences being frequently used for assessing MS lesions, at least in standard/basics protocols (even if mentioned in the picture showing example of of clinically used sequences for MS). From my understanding, the most useful sequence for detecting MS lesions in clinical practice is proton density (PD), but probably that changes from sites/radiologists perspective.
basic_sequences
According to the articles, PSIR sequences seem great! However, here are some potential precisions I would address :
1-Peters and al : PSIR compared to STIR (not the best...) and T2;
2-Fechner : PSIR compared to T2 and T1C+ sequences (not compared to PD sequences...)

Suggested change
For detecting MS lesions in the spinal cord, two main contrasts emerge: PSIR and STIR contrasts. New studies [(Peters et al. 2024)](https://pubmed.ncbi.nlm.nih.gov/38289376/)[(Fechner et al. 2019)](https://pubmed.ncbi.nlm.nih.gov/30679225/) showed that using PSIR contrasts improved MS lesion detection in the spinal cord. [(Fechner et al. 2019)](https://pubmed.ncbi.nlm.nih.gov/30679225/) showed that the PSIR contrast showed a higher signal-to-noise (SNR) ratio compared to the STIR contrast.
For detecting MS lesions in the spinal cord, two main contrasts emerge: PSIR and STIR contrasts. New studies [(Peters et al. 2024)](https://pubmed.ncbi.nlm.nih.gov/38289376/)[(Fechner et al. 2019)](https://pubmed.ncbi.nlm.nih.gov/30679225/) showed that using PSIR contrasts improved MS lesion detection in the spinal cord. [(Fechner et al. 2019)](https://pubmed.ncbi.nlm.nih.gov/30679225/) showed that the PSIR contrast showed a higher signal-to-noise (SNR) ratio compared to the STIR contrast.


## Criteria to segment MS lesions in the spinal cord
Based on the definition proposed for MS lesions in the spinal cord in the 2017 revisions of the McDonald criteria:
"A hyperintense lesion in the cervical, thoracic, or lumbar spinal cord seen on T2 plus short tau inversion recovery, proton-density images, or other appropriate sequences, or in two planes on T2 images." [(Thompson et al. 2018)](https://pubmed.ncbi.nlm.nih.gov/29275977/) [(Filippi et al. 2016)](https://pubmed.ncbi.nlm.nih.gov/26822746/) [(Brownlee et al. 2018)](https://pubmed.ncbi.nlm.nih.gov/27889190/) [(Rovira et al. 2016)](https://pubmed.ncbi.nlm.nih.gov/26149978/)

- Do not segment lesions in images with too many artifacts (such as this [example](https://github.com/ivadomed/canproco/issues/53#issue-1938136790)). Preferably, add the image to the exclude file so that it isn’t used for model training…
- When segmenting lesions on thick slices, always look at the adjacent slices, as partial volume effect can sometimes reduce the appearance of a lesion (close to noise level).
- Unless otherwise stated, do not segment lesions above the first vertebrae (because here we focus only on MS lesions in the spinal cord).
- If you have any doubt and/or are not 100% confident about one (or more) lesion(s) segmentation(s), flag the subject and report it for external validation of the segmentation.

## How to manually segment lesions

- MS spinal cord lesions can either (i) be automatically segmented from an algorithm and then manually corrected, or (ii) manually segmented from scratch. In the former case, make sure to use the JSON file that was created by the automatic segmentation algorithm, in order to track provenance:

```json
{
"GeneratedBy": [
{
"Name": "2D nnUNet model model_ms_seg_sc-lesion_regionBased.zip",
"Version": "https://github.com/ivadomed/canproco/releases/tag/r20240125",
"Date": "2024-01-26"
}
]
}
```

- To manually create/correct the segmentation, please use the manual-correction (https://github.com/spinalcordtoolbox/manual-correction) repository. The command can be inspired by this:

```console
python manual_correction.py -path-img ~/data/canproco -config ~/config_seg.yml -path-label ~/data/canproco/derivatives/labels -suffix-files-lesion _lesion-manual -fsleyes-dr="-40,70"
```

- A Quality Control (QC) report should be produced using SCT, and added to a GitHub issue for further validation by other investigators. Using SCT, you can review lesion segmentation in the axial or sagittal plane:

```console
sct_qc -i {image_file} -d {lesion_seg_file} -s {sc_seg_file} -p sct_deepseg_lesion -plane {sagittal, axial} -qc {canproco_qc_folder}
```

- If you are not sure about the segmentation on a subject, it should be flagged on GitHub for a more open discussion: here are some examples [(1)](https://github.com/ivadomed/ms-lesion-agnostic/issues/4#issuecomment-1947326493) and [(2)](https://github.com/ivadomed/ms-lesion-agnostic/issues/4#issuecomment-1947338624)

## Step 1: Software to create/correct lesions
It is common practice to use FSLeyes at NeuroPoly for visual inspection of MRI images and manual segmentation of MS lesions. Therefore, naturally, the first step of the lesion segmentation process is to complete the FSLeyes tutorial ([FSLeyes documentation](https://open.win.ox.ac.uk/pages/fsl/fsleyes/fsleyes/userdoc/) and [video tutorial](https://www.youtube.com/playlist?list=PLIQIswOrUH69qFMNg8KYkEGkvCNEwlnfT)). Trainees are encouraged to learn keyboard shortcuts (ctrl+F to toggle an image, shift+↑ to scroll through volumes, ...).

Furthermore, it is recommended to get familiar with SCT for creating QCs and for manual correction ([SCT tutorial](https://spinalcordtoolbox.com/user_section/tutorials.html)).

## Step 2: Spinal cord anatomy and lesion segmentation
Before, moving on to MS lesion segmentation, trainees are advised to study the neuroanatomical structures of healthy spinal cords. Trainees should look at healthy spinal cords in MRI images of different contrasts: T2w, T1w, PSIR, STIR, MP2RAGE... A public dataset will be built for this purpose.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SpineGeneric could be used for this purpose


To learn the specificity of MS lesions, trainees should work on differentiating MS lesions from other diseases.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which disease should be used ? NMO ?

We should also look into building this public dataset: which public data do we have ?


One of the most challenging tasks of MS lesion segmentation is to distinguish the border of a lesion and the cerebrospinal fluid (CSF). To learn where to draw the lesion border, a set of tricky examples validated by a NeuroRadioligist will be created.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reference the videos made by Julien during work with Michelle Chen regarding MS lesion segmentation


Finally, for trainees will little or no experience with MS lesion segmentation, a checklist will be built to avoid being overwhelmed by the multiple images/contrasts/acquisitions. We typically recommend starting with the view in the highest resolution (often the sagittal view) to first identify lesions and to move to other contrast/acquisition to validate the segmentation borders and lesion detection. During this step, playing with the brightness and the contrast is key. After locating the lesion to be traced, we recommend starting in a middle slice around the middle of the lesion and then moving toward each end of the lesioned area. We also recommended frequently scrolling back and forth around the slice they are tracing on to ensure border consistency.

## Step 3: Manual segmentation assessment
After manual segmentation of MS SC lesion in 5 cases, trainees will receive feedback (from a NeuroRadiologist or a comparison with a QC with the real segmentation). One week later, they will be asked to re-segment the same images as well as 2 other images without using their previous segmentation to validate their improvements. The segmentation should also be accompanied by a JSON file for the data to be BIDS compliant.

## Taxonomy to evaluate lesion segmentation
The following section details the different types of errors which occur during lesion segmentation. It is based on the condensed Nascimento Taxonomy:

<img width="522" alt="nascimento_taxonomy" src="https://github.com/ivadomed/canproco/assets/67429280/36d9e45e-4a36-40f0-a4f5-e5f3ea3f06a0">

## Sources
This lesion segmentation protocol was inspired by these resources:
- deSouza NM, van der Lugt A, Deroose CM, et al. Standardised lesion segmentation for imaging biomarker quantitation: a consensus recommendation from ESR and EORTC. Insights Imaging. 2022;13(1):159. Published 2022 Oct 4. doi:10.1186/s13244-022-01287-4 : [link](https://pubmed.ncbi.nlm.nih.gov/36194301/)
- Lo BP, Donnelly MR, Barisano G, Liew SL. A standardized protocol for manually segmenting stroke lesions on high-resolution T1-weighted MR images. Front Neuroimaging. 2023;1:1098604. Published 2023 Jan 10. doi:10.3389/fnimg.2022.1098604 : [link](https://pubmed.ncbi.nlm.nih.gov/37555152/)