Issue with sct_register_to_template: Template extending template boundaries on image

Hello SCT Team,

I am encountering an issue with the sct_register_to_template command. When I use the default parameters to register an image to the PAM50 template, I have noticed that parts of the resulting registered image extend beyond the template boundaries. Specifically, the vertebrae T5 label (12) appears to be extending into the medulla.

I am currently using SCT version 5.8 on Windows (native).

Here’s the command I used:

sct_register_to_template -i sub-errsm37_T1w.nii.gz -s sub-errsm37_T1w_seg.nii.gz -ldisc sub-errsm37_T1w_labels-disc-manual.nii.gz -c t1 -qc qc
sct_warp_template -d sub-errsm37_T1w.nii.gz -w warp_template2anat.nii.gz -a 0 -s 1 -qc qc

I’m wondering if I might be missing something in the registration process. Could you please provide any guidance or suggestions for resolving this issue? I will send the relevant files via email shortly.

As always, I greatly appreciate your help and support.

Best regards,


Thank you for raising this issue @juda ! It is being investigated/discussed in our issue tracker.