Looking at the images, diameter_RL should be roughly twice as long than diameter_AP on average.
The segmentation with sct_propseg looks fine it covers the whole spinal cord.
However for some reason in about 50% of the scans, in the csa.csv file the diameter values are mixed up, i.e. the diameter_AP column consists of all the values that are roughly twice of diameter_RL.
Is there something wrong with the orientation of those scans? I had to manually fix the labels to get AP and RL correct and it worked like this with the other sct functions.
hum… it could be a few things, like wrong estimation of ellipse axis or anisotropic in-plane voxel. I could try to debug it if you send me an example image with the associated segmentation.
If you can have a look at the attached file that would be great: segment_example.zip (2.0 MB)
It is true that the voxels are very unisotropic, unfortunately: 0.1 mm on the R-L axis and 0.05 mm on A-P
Apart from the wrong axis I think the diameter estimates are correct though. I could sort them by just forcing the column with larger values to be R-L, but it seems to also affect the calculated values of eccentricity and solidity which I can’t fix.