Median values instead of mean

Description

I was wondering if it is possible to calculate Median instead of the mean values across spinal cord using the PAM50 template.

Hi @Maryam_Seif!

Thank you for reaching out. It is currently not possible to compute the median, but it will be very easy to add that feature. I’ve opened an issue here. Please feel free to chip in with additional design suggestions.

Hi @Maryam_Seif,

We implemented the weighted median in sct_extract_metric. To test it, you need to update SCT to the latest development version (the fix will be available in the next stable release: 5.3.0). If you already have it installed with git, you simply need to do:

cd $SCT_DIR
git checkout master
git pull

Then, to use the median, use:

sct_extract_metric -i IMAGE -method median [OTHER_PARAMETERS]

Cheers,
Julien

1 Like