-
-
Notifications
You must be signed in to change notification settings - Fork 103
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
Add new CLI script to predict compression probability #4760
Merged
Conversation
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
…ncbi.nlm.nih.gov/35371944/ More details in the script description.
valosekj
commented
Dec 28, 2024
valosekj
commented
Dec 28, 2024
As torsion requires 3 slices above and below to be computed, it can be None at the FOV top and bottom.
Use these cut-offs to determine compression probability category and include the category into the output CSV as a new column.
Because we are talking about the compression probability. "Mild" might imply compression severity.
valosekj
commented
Dec 31, 2024
…isc to compensate for potential disc label shift in the S-I axis. This decision was made based on a discussion with https://pubmed.ncbi.nlm.nih.gov/35371944/ paper authors
… CSV file BEFORE: Disc Axial slice # 4 159 4 160 4 161 5 138 5 139 5 140 AFTER: Disc Axial slice # 4 161 4 160 4 159 5 140 5 139 5 138
…/low` to `yes/possible/no` This decision was made based on a discussion with https://pubmed.ncbi.nlm.nih.gov/35371944/ paper authors
…the intervertebral disc to process
valosekj
commented
Jan 9, 2025
Co-authored-by: Joshua Newton <[email protected]>
joshuacwnewton
requested changes
Jan 14, 2025
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.
This PR is really close to being merged! Great work again, thank you.
Co-authored-by: Joshua Newton <[email protected]>
joshuacwnewton
approved these changes
Jan 21, 2025
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.
Once the reference formatting nitpick is complete, I think this is good to go!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Checklist
GitHub
PR contents
Description
This PR adds a script to predict compression probability in a spinal cord MRI image using spinal cord shape metrics. The script requires spinal cord segmentation (used to compute the shape metrics) and disc labels.
Briefly, the script computes shape metrics for 3 axial slices at intervertebral disc levels C3/C4 to C6/7 (3 slices are used to compensate for potential disc label shift in the superior-inferior (S-I) axis; details: #4760 (comment) and 90cbfa6). Then, it predicts compression probability for each of these axial slices using a logistic regression model. The compression probability is printed to CLI and saved to a CSV file; see the next section for examples. More details in: https://pubmed.ncbi.nlm.nih.gov/35371944/. Particularly, equation 4.
How to test this PR
Testing on a few spine-generic subjects with mild compression
sub-tokyoIngenia02
Output CSV:
sub-ucl05
Output CSV:
sub-vuiisAchieva01
Output CSV:
Note
Note that the predictive model was trained using axial T2star images from a private dataset. The example spine-generic images shown above are T2w 0.8mm iso. I used these images because they are open-access to verify that the script works properly.
(I did not choose spine-generic T2star images as they cover only C2-C5, while the model detects compression also at discs C5/6 and C6/7).
Linked issues
Follow-up of: 32153ad