Skip to content

Metrics measurement based on model output #45

@plbenveniste

Description

@plbenveniste

Using this issue to summarize a discussion with Benjamin.

The objectives are to extract:

  • Ventro-dorsal diameter (AP diameter) of the spinal cord
  • Right-left diameter of the spinal cord
  • Spinal cord area
  • WM area
  • GM area

These steps require the use of SCT (these were done on v6.1):

To do so, use the following steps on the predicted file file_pred.nii.gz:

  1. Divide the image in two files, one for GM and one for WM:
    For WM : sct_maths -i ~/file_pred.nii.gz -bin 1 -o ~/file_pred_WM.nii.gz
    For GM : sct_maths -i ~/file_pred.nii.gz -sub ~/file_pred_WM.nii.gz -o ~/file_pred_GM.nii.gz
    sct_maths -i ~/file_pred_GM.nii.gz -sub ~/file_pred_WM.nii.gz -o ~/file_pred_GM.nii.gz (need to do it twice because WM value is 2)

  2. To obtain a Spinal cord segmentation (both WM and GM voxel are equal to 1):
    sct_maths -i ~/file_pred.nii.gz -bin 0.5 -o ~/file_pred_sc.nii.gz

  3. To measure AP and RL diameters (for each slice):
    sct_process_segmentation -i ~/file_pred_sc.nii.gz -o ~/output_diameters.csv -perslice 1
    The information is stored in column MEAN(diameter_AP) and MEAN(diameter_RL)

  4. To measure SC area (for each slice):
    sct_process_segmentation -i ~/file_pred_sc.nii.gz -o ~/output_sc_area.csv -perslice 1
    The information is stored in MEAN(area)

  5. To measure WM area (for each slice):
    sct_process_segmentation -i ~/file_pred_WM.nii.gz -o ~/output_wm_area.csv -perslice 1
    The information is stored in MEAN(area)

  6. To measure GM area (for each slice):
    sct_process_segmentation -i ~/file_pred_GM.nii.gz -o ~/output_gm_area.csv -perslice 1
    The information is stored in MEAN(area)

Furthermore, it is recommanded to do apply sct_proces_segmentation on the original image and not the straightened one, as straightening might bias the results.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions