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

Automate detection of spinal cord compression #2

Open
valosekj opened this issue Nov 3, 2022 · 3 comments
Open

Automate detection of spinal cord compression #2

valosekj opened this issue Nov 3, 2022 · 3 comments
Assignees
Labels

Comments

@valosekj
Copy link
Member

valosekj commented Nov 3, 2022

Background

Spinal cord compression is highly prevalent in the elderly, and its severity is considered in clinical decision-making. Currently, the evaluation of the compression is done manually by radiologists. Such manual evaluation is time-consuming and introduces inter-rater and inter-trials variability.

Recently, we showed that the logistic model combining morphometric metrics such as cross-sectional area (CSA), solidity, compressive ratio (CR), and torsion computed from T2*-w axial image could predict spinal cord compression automatically. For details, see the paper.

Methods

It would be great to automate the process of compression detection fully. Ideally to be run by a single command. This would include the following:

  • obtaining SC segmentation and SC labeling, including quality control with potential manual corrections
  • computation of the morphometric metrics (i.e., CSA, CR solidity, torsion) across individual slices by the sct_process_segmentation function.
  • running the predictive model to detect the slice with the compression
  • determine which intervertebral disc the slice corresponds to (based on the SC labeling)
  • provide commonly used radiological metrics for the compression level (i.e., CSA, CR) as an output

I would be glad for any suggestions or ideas.

@valosekj valosekj added the SCT label Nov 3, 2022
@valosekj valosekj self-assigned this Nov 3, 2022
@valosekj
Copy link
Member Author

valosekj commented Nov 15, 2022

I implemented the first draft; see here

Steps to run:

  1. Download the attached zip archive containing T2*-w image, SC seg, and manually created disc labels for a DCM patient with compression at C5/6 disc.
    example_data-compression_detection.zip

  2. Run the following code:

cd ${SCT_DIR}
git pull
git checkout jv/add_compression_detection
source ${SCT_DIR}/python/etc/profile.d/conda.sh
conda activate venv_sct

cd <downloaded_data>
python ${SCT_DIR}/spinalcordtoolbox/scripts/sct_detect_compression.py -s t2s_seg.nii.gz -discfile labels.nii.gz
# -s - segmentation
# -discfile - disc labels

Output:

$ python ${SCT_DIR}/spinalcordtoolbox/scripts/sct_detect_compression.py -s t2s_seg.nii.gz -discfile labels.nii.gz

--
Spinal Cord Toolbox (git-jv/add_compression_detection-d89f8a3de5253cdca5c5041a467422aa8214fa24)

sct_detect_compression -s t2s_seg.nii.gz -discfile labels.nii.gz
--

Compute shape analysis: 100%|#################| 42/42 [00:00<00:00, 85.02iter/s]
Compression probability for disc 4 (corresponding to slice 32) is 0.226.
Compression probability for disc 5 (corresponding to slice 27) is 0.014.
Compression probability for disc 6 (corresponding to slice 22) is 0.984.
Compression probability for disc 7 (corresponding to slice 16) is 0.257.

Compression(s) was detected at:
	disc 6 (corresponding to slice 22). CSA = 54.91 mm2. CR = 43.22.

A few notes for a discussion:

  • metrics normalization
    The predictive model is based on quantitative metrics, which have naturally different anatomy across vertebral levels (e.g., smaller CSA at C6/7 compared to C3/4). This means that the information about vertebral levels must be taken into account during the compression prediction. So far, I have implemented perlevel metrics normalization by normative values computed from healthy volunteers within Horakova et al., 2022. Potentially, some more advanced normalization approach also utilizing other variables (such as age, sex, sequence parameters) should be explored. See below.

  • disc identification
    Since the axial ME-GRE image usually covers only a limited field of view, fully automatic labeling (=disc identification) might be challenging. In such cases, users can a) provide the initial C2/3 label (sct_label_vertebrae -initz), b) do the whole labeling manually, c) use labeling from some other image, e.g., from T1w image as proposed in spine-generic.

Idea:

  • Would it make sense to replace the current predictive model based on quantitative metrics by a deep learning model? The DL model could be conditioned by metadata (compression level, age, sex, sequence parameters, ...). Could this conditioning serve instead of normalization?

@valosekj
Copy link
Member Author

valosekj commented Nov 15, 2022

Few comments from Julien

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant