I have binarised cervical cord lesion masks that I manually segmented and which are currently in t2 space. I also have cervical cord MTR and diffusion data (which I have already processed). I now would like to extract the mean MTR and mean FA/MD of the lesional tissue. Is there a way of doing this using SCT?
You can use sct_analyze_lesion, which takes as input the lesion mask, the cord segmentation and the metric of interest (e.g., MTR image) and which outputs a lesion mask with each lesion labeled (1, 2, 3, …) as well as an Excel file with the metrics for each lesion.
Here is an example, where I created a mask with three dummy squares on a T2w image:
Great, thank you very much! Quick additional questions - if you have your t2 lesion mask and want to extract the mean MTR, which images would you input for each command and/or are there any additional registration steps that you need to run beforehand?
Alternatively, you can work in the PAM50 space: register your T2 and MTR with the PAM50 template, apply the transformation of the lesion mask to the PAM50, and then extract metrics in the PAM50 space.
Further to the above I would now like to subtract the lesion masks from the metric image and then calculate the mean metric of the non-lesional tissue.
I attempted to use fslmaths to subtract my lesion mask from the metric image but when I run sct_extract_metric on this new image I get an error “label/atlas does not exist”. I assume I am either entering the wrong input or that I need to run an additional step on the new image prior to running sct_extract_metric?
Assistance with this would be greatly appreciated!
to use sct_extract_metric, you either need to provide a binary (or weighted) mask within which to average your metric (flag -f), or register the PAM50 atlas to your metric and then run sct_warp_template, which will automatically create the label/atlas folder which the function is asking for.