Bug in sct_straighten_spinalcord.py

when I run sct_dev version
sct_straighten_spinalcord -i t2_r.nii.gz -s t2_centerline.nii.gz -ldisc-input t2_seg0_labeled_discs.nii.gz
-ldisc-dest /home/sct/sct_4.2.1/data/PAM50/template/PAM50_label_disc.nii.gz
-dest /home/sct/sct_4.2.1/data/PAM50/template/PAM50_t2.nii.gz -ofolder straight
, program stopped. Error mesage is as follow:
Error on approximation = 0.29 mm
78%|#################################################################################################################################################2 | 770/991 [00:46<00:13, 16.72it/s]Traceback (most recent call last):
File “/home/sct/sct_4.2.1/scripts/sct_straighten_spinalcord.py”, line 289, in
main()
File “/home/sct/sct_4.2.1/scripts/sct_straighten_spinalcord.py”, line 272, in main
fname_straight = sc_straight.straighten()
File “/home/sct/sct_4.2.1/spinalcordtoolbox/straightening.py”, line 455, in straighten
coord_straight2curved = centerline.get_inverse_plans_coordinates(coord_in_planes_straight, lookup)
File “/home/sct/sct_4.2.1/spinalcordtoolbox/types.py”, line 447, in get_inverse_plans_coordinates
return einsum(‘mnr,nr->mr’, rollaxis(self.matrices[indexes], 0, 3), coordinates.transpose()).transpose() + self.points[indexes]
IndexError: index 770 is out of bounds for axis 0 with size 322
78%|#################################################################################################################################################2 | 770/991 [00:46<00:13, 16.62it/s]

Hi,

-ldisc-input feature isn’t well tested. Would you be able to send us the data so we can try to debug and find a fix for it?
Best
Julien