HI
When I ran sct_label_vertebrae -i t2.nii.gz -s t2_seg.nii.gz -c t2 -qc ~/qc_singleSubj
forest@DESKTOP-DM8SQ21:~/pt/HC022/t2$ sct_label_vertebrae -i t2.nii.gz -s t2_seg.nii.gz -c t2 -qc ~/qc_singleSubj
--
Spinal Cord Toolbox (5.2.0)
sct_label_vertebrae -i t2.nii.gz -s t2_seg.nii.gz -c t2 -qc /home/forest/qc_singleSubj
--
Creating temporary folder (/tmp/sct-20210516150312.458917-label_vertebrae-f85scjk4)
Copying input data to tmp folder...
Straighten spinal cord...
Creating temporary folder (/tmp/sct-20210516150313.011246-straighten_spinalcord-9ucvt38g)
Copy files to tmp folder...
Image /tmp/sct-20210516150312.458917-label_vertebrae-f85scjk4/data.nii has different qform and sform matrices. This can produce incorrect results. Consider setting the two matrices to be equal by running:
sct_image -i /tmp/sct-20210516150312.458917-label_vertebrae-f85scjk4/data.nii -set-sform-to-qform -o /tmp/sct-20210516150312_same-affine.458917-label_vertebrae-f85scjk4/data.nii.
Traceback (most recent call last):
File "/home/forest/sct/spinalcordtoolbox/scripts/sct_label_vertebrae.py", line 491, in <module>
main(sys.argv[1:])
File "/home/forest/sct/spinalcordtoolbox/scripts/sct_label_vertebrae.py", line 310, in main
'-v', str(verbose),
File "/home/forest/sct/spinalcordtoolbox/scripts/sct_straighten_spinalcord.py", line 262, in main
fname_straight = sc_straight.straighten()
File "/home/forest/sct/spinalcordtoolbox/straightening.py", line 107, in straighten
Image(fname_anat, check_sform=True).save(os.path.join(path_tmp, "data.nii"))
File "/home/forest/sct/spinalcordtoolbox/image.py", line 311, in __init__
raise ValueError("Image sform does not match qform")
ValueError: Image sform does not match qform
However, not all subjects had this error.