Label vertebrae fails (v4.0.1)

I`m trying to create the label vertebrae by executing:

sct_label_vertebrae -i t2.nii.gz -s t2_seg.nii.gz -c t2 -qc ~/qc_singleSubj

but it gives me wrong vertebrae segmentation at cervical.
Result:

I`v even try to make it by using manual initialization, and I had a similar result:

Is there any way that I can fix it?

Thank you!

the discs at C4-C6 levels are a bit hard to distinguish, which makes the automatic algorithm fail. We are currently working on a more robust algorithm, but in the meantime you can manually point the posterior tip of each disc using the following command:

sct_label_utils -i t2.nii.gz -create-viewer 2,3,4,5,6,7,8,9,10,11 -msg "Click at the posterior tip of each disc, starting with value 2 (corresponds to C1-C2 disc)" -o labels_disc.nii.gz  

Which opens the pop-up window below:

Once you have your disc labels, you can label the vertebrae using the following command:

sct_label_vertebrae -i t2.nii.gz -s t2_seg.nii.gz -c t2 -discfile labels_disc.nii.gz

Thank you for the answer!
Iv tried this, but how can I generate the t2_seg_labeled.nii.gz from labels_disc.nii.gz? Iv used sct_label_vertebrae and -discfile, but it give me a wrong result:

Once you have your disc labels, you can label the vertebrae using the following command:

sct_label_vertebrae -i t2.nii.gz -s t2_seg.nii.gz -c t2 -discfile labels_disc.nii.gz

Thank you again! but that was the result:

overlay_img

there might be something wrong with your segmentation or manual labels. Could you upload the seg and the manual labels?

<a class=“attachment” href=“/uploads/t2_seg.nii.gz (469.4 KB)
default/original/1X/87e93a9b0a251563227a341540030404d4ceccf8.gz”>labels_disc.nii.gz (795.3 KB)

labels_disc.nii.gz (795.3 KB)

I notice some holes in the segmentation (at the bottom), which are likely the cause of the problem. I also notice that the images are interpolated (inplane resolution is 0.35mm), which makes the segmentation less robust (undersampling would reduce noise) and the straightening process extremely long (several minutes).

Could you please try to undersample your t2 image, and then re-run the segmentation and labeling? You could use e.g. 0.7mm iso as the target resolution (2x the in-plane):

sct_resample -i t2.nii.gz -mm 0.7 -o t2r.nii.gz
1 Like

Perfect!
Thank you again!!