Prioritise s-form or q-form?

Dear SCT-team,

We are having some issues with discrepancies in the s-form and q-form for some of our images causing the vertebral labelling to fail. This is easily fixed using the sct_image -set-sform-to-qform or vice versa. I understood from previous threads [Output segmentation has different sform/qform than input · Issue #2106 · spinalcordtoolbox/spinalcordtoolbox · GitHub] that SCT prefers the q-form. In a case with a NIFTI-header as the one attached, is it recommended to go with the q-form then and are there any SCT-instances where the s-form should be prioritised? I should add that we are only trying to get the CSA and the AP and LR measurements.

Kind regards and thank you for taking your time,

Carl

qform_sform_difference.txt (1.3 KB)

Dear @Carl,

Could you clarify how exactly the vertebral labeling is failing (e.g. error message, sample input/output, etc.)?

I would like to better understand how the sform/qform discrepancy is causing the labeling failure. :slight_smile:

Kind regards,
Joshua

Hi, of course, sorry about that. I’ve run sct_deepseg_sc -i {subject}.nii -centerline cnn -brain 1 -c t1 -qc qc followed by sct_label_vertebrae -i {subject}.nii -s {subject}_seg.nii (or …nii.gz) -c t1 -qc qc. The output (attached below) states that the image has different s-form and q-form matrices which can produce incorrect results.

Kind regards,

Carl

sform_fail.txt (1015 Bytes)

Hi Carl,

In a case with a NIFTI-header as the one attached, is it recommended to go with the q-form then and are there any SCT-instances where the s-form should be prioritised?

As far as I know, s-form is never prioritized in SCT. So yes: it is recommended to go with the q-form. Especially if you are ‘only’ doing CSA and other morphometric measurements on the segmentation.

Great, then will use the q-form, thank you both!