How to quantify distortion (mainly shape analysis question)?

Dear SCT community

I have a rather large dataset (90 scans in total) on which to evaluate the effect of a vendor-provided GRE distortion correction. Siemens scanners, so this is the “phase stabilisation” method. The effect is to counteract the echo-time dependent distortion on multi-echo scans.

To illustrate, here are four sets, first echo (TE=3ms) and last echo (TE=16ms) for the same subject, same session, with and without correction, same slice (though movement between the two has not been corrected for), same windowing:

Echo 1, Without correction:
image
Echo 6, without correction:
image

Echo 1, with correction:
image
Echo 6, with correction:
image

The images I am showing above are MT contrast, below is PD (with a later echo time):

TE=3 without:
image
TE=24 without:
image

TE=3 with:
image
TE=24 with:
image

I might have been staring at these images for too long, but I can definitely see a qualitative difference. The correction does seem to lead to a preservation of boundaries, of definition, and improve image quality. The images look less, for lack of a better word, fuzzy.
When I look at the whole image, rather than just the SC, this becomes more apparent.

I have tried to quantify this by segmenting the SC from all echoes, and then getting the CSA and eccentricity, but that does not show significant differences. There is an effect, though, as the CSA decreases less with echo time using the correction, so I am confident I am not chasing a ghost.

I think solidity might do it, but I am not sure. I think the SC segmentation might also be too good to be bothered by such effect.

Does anyone have a suggestion on how to quantify this?

how about computing the mutual information between echoes, and expect to get higher score with correction? I would do this computation within a cropped spinal cord to focus the score in this region.

something like this

sct_maths -i ECHO1 -mi ECHO4 -o FILE.txt

Thanks!

Is there an “append” option for sct_maths like there is for sct_process_segmentation, so I can dump this all into one file? The help does not mention it.

ahhh, that would be a nice feature indeed. Ideally the function should be refactored to output csv file. Any implemented help is welcomed :wink:

ticket opened here