-
-
Notifications
You must be signed in to change notification settings - Fork 109
Add spinal cord CSA quadrant measurements #4943
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
base: master
Are you sure you want to change the base?
Conversation
… the output CSV file
as we have one figure for each slice
Adding symmetry calculation ( I first added R-L and A-P symmetry (the middle and right subplots). But as the symmetry values are around zero (potentially because we are defining the R-L and A-P halves by WIP: I'm investigating the symmetry more |
@valosekj do you think it would be better if the spinal cord is symmetric that the value should be like of 1? Or like % of overlap? Also, CSA may not reflect difference of shape on the R-L or A-P, we could also consider other metrics to compute symmetry |
Good point! I actually implemented two types of calculations: symmetry from -1 to 1. And from 0 to 1. I think that with symmetry from 0 to 1, we cannot determine the laterality. spinalcordtoolbox/spinalcordtoolbox/process_seg.py Lines 180 to 191 in 525666a
|
Checklist
Description
While digging into
sct_process_segmentation
and the computation of AP and RL diameters in PR #4941, I was reminded of a past discussion about CSA measurements for the left and right sides (neuropoly/idea-projects#19).Coincidentally, a clinician from Balgrist recently asked me whether it would be possible to assess the direction of cord compression—if the compression is dorsal (posterior) or ventral (anterior). Building on the debugging from PR #4941, this PR introduces four new quadrant-based CSA metrics: posterior right (red), anterior right (blue), posterior left (green), and anterior left (purple). These quadrants can then be aggregated into left-right or anterior-posterior halves.
(Note that although the
sct_process_segmentation
input is a binary mask, the CSA quadrant computation is done on a soft mask because we apply the angle correction; details: #4941 (comment))How to test the PR
I'm using
t2_compressed.nii.gz
fromsct_course_data
(files attached below).Then you can plot the CSA quadrants and left-right or anterior-posterior halves using
generate_figure_PAM50_quadrant_measures.py
(temporary script pushed to this PR):As a sanity check, I'm overlaying
MEAN(area)
(in black), which is computed using existing code, withMEAN(area_total)
(dashed yellow), which I compute by summing all four CSA quadrants.Linked issues
Related to neuropoly/idea-projects#19 and #4282
Tagging @sandrinebedard
t2_compressed_seg_labeled.nii.gz
t2_compressed_seg.nii.gz