-
Notifications
You must be signed in to change notification settings - Fork 0
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
plbenveniste
wants to merge
28
commits into
main
Choose a base branch
from
plb/lesion_seg_protocol
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 22 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 973c5b2
fixed typo based on Julien's comment
plbenveniste 6d01e30
changed criterias to bullet points
plbenveniste fddd8e3
replace link to example by hyperlink
plbenveniste 2e7d7fd
typo correction in introduction
plbenveniste 3bbcc6a
changed json link to json example in the readme
plbenveniste ffa1b0a
added examples of complicated lesion segmentations
plbenveniste 61291c7
QC explanation reformatting
plbenveniste fe015f5
add sct_qc commands
plbenveniste 7e18554
added software section
plbenveniste b98087b
added ref at the bottom to other segmentation protocols
plbenveniste 77425fb
added step 2 : sc anatomy and lesion segmentation
plbenveniste 6e4a30b
julien typo fix : remove":"
plbenveniste 7e0eac3
typo fix : remove ":" 2
plbenveniste 359f051
rewrite partial volume explanation
plbenveniste 8928382
rewrite sentence on not segmenting above first vert
plbenveniste f9a370b
rewrite two options for seg
plbenveniste 11ac1d6
rewrite manual correction explanation
plbenveniste b525c0c
rewrite QC
plbenveniste 5f11e4f
rewrite protocol when unsure
plbenveniste 2982982
change last section name
plbenveniste e403321
update dataset of multiple contrasts
plbenveniste be19641
remove dcm and sci
plbenveniste a021996
remove comment
plbenveniste 657b9bb
add step 3
plbenveniste 63f305c
lesion definition suggestion
plbenveniste 13ca692
typo fix
plbenveniste 888513d
changed step 1 title
plbenveniste File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# 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. | ||
|
||
## Criteria to segment MS lesions in the spinal cord: | ||
plbenveniste marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
- 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). | ||
- For lesions segmentations which you are not 100% sure, 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 from 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: Get familiar with FSLeyes and SCT: | ||
plbenveniste marked this conversation as resolved.
Show resolved
Hide resolved
|
||
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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 Spinal Cord Injury (traumatic and non-traumatic) and DCM. A training dataset will be built especially for this case (TO DISCUSS: BUILDING A (PUBLIC) REPO TO TRAIN TO DISTINGUISH PATHOLOGIES). | ||
|
||
One of the most challenging task 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. (TO DISCUSS AS WELL). | ||
|
||
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 to start 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 move 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. | ||
|
||
## Taxonomy to evaluation 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 from these ressources: | ||
- 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/) | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.
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...)