I want to calculate the average area from C1 to C3 from the 3D-T1 data.
I encountered the following error with the two lines of code I segmented:
sct_deepseg_sc -i T1.nii.gz -c t1 -qc ~/qc_singleSubj
sct_label_vertebrae -i T1.nii.gz -s T1_seg.nii.gz -c t1 -qc ~/qc_singleSubj
The error is as follows:
Image /tmp/sct_2024-06-05_16-45-13_label-vertebrae_g05vbwge/data.nii has different qform and sform matrices. This can produce incorrect results. Please use ‘sct_image -i /tmp/sct_2024-06-05_16-45-13_label-vertebrae_g05vbwge/data.nii -header’ to check that both affine matrices are valid. Then, consider running either ‘sct_image -set-sform-to-qform’ or ‘sct_image -set-qform-to-sform’ to fix any discrepancies you may find.
Traceback (most recent call last):
File “/home/dawn/sct_6.3/spinalcordtoolbox/scripts/sct_label_vertebrae.py”, line 500, in
main(sys.argv[1:])
File “/home/dawn/sct_6.3/spinalcordtoolbox/scripts/sct_label_vertebrae.py”, line 324, in main
sct_straighten_spinalcord.main(argv=[
File “/home/dawn/sct_6.3/spinalcordtoolbox/scripts/sct_straighten_spinalcord.py”, line 261, in main
fname_straight = sc_straight.straighten()
File “/home/dawn/sct_6.3/spinalcordtoolbox/straightening.py”, line 108, in straighten
Image(fname_anat, check_sform=True).save(os.path.join(path_tmp, “data.nii”))
File “/home/dawn/sct_6.3/spinalcordtoolbox/image.py”, line 321, in init
raise ValueError(“Image sform does not match qform”)
ValueError: Image sform does not match qform
I’m wondering if the issue is because my 3D-T1 matrix is 1.211 and the FOV is 170256256. How can I solve this problem?