neuropoly / idea-projects

Ideas for cool projects
1 stars 0 forks source link

Automate detection of spinal cord compression #2

Open valosekj opened 1 year ago

valosekj commented 1 year ago

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:

I would be glad for any suggestions or ideas.

valosekj commented 1 year ago

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:

Idea:

valosekj commented 1 year ago

Few comments from Julien

valosekj commented 1 year ago

In progress within the dcm-metric-normalization project. UPDATE: detect-compression project

Relevant discussions: