sct-pipeline / contrast-agnostic-softseg-spinalcord

Contrast-agnostic spinal cord segmentation project with softseg
MIT License
4 stars 3 forks source link

Compute CSA on prediction mask #31

Closed sandrinebedard closed 2 years ago

sandrinebedard commented 2 years ago

Description

This PR adds a script compute_csa.sh to compute CSA on the prediction mask of the trained models.

The script can be used with sct_run_batch as described in the README. The input of the script is the clean processed dataset (data_processed_clean) resulting from the preprocessing. The path of the prediction masks is included as an extra script argument.

Breifly, if the subject has a prediction mask for the corresponding contrast, the discs labels (from data_processed_clean/derivatives) are used to created a labeled segmentation. CSA is computed at C2-C3 verterbral levels using the prediction mask. One .csv file is created per contrast.