-
Notifications
You must be signed in to change notification settings - Fork 1
Description
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
:
-
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) -
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
-
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) -
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) -
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) -
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.