T2s GM and WM Segmentation Problems

Julien,

I am trying to obtain the GM, WM, and total CSA using the t2s. In my Excel output files specifically the GM some slices have ‘none’. I have been trying to use the sct_utils_label function, but when I type it in the terminal all the optional arguments I can add are looking at the vertebrae. I need to adjust the boundaries for the t2s since some slices did not have any boundaries.

csa_gm.csv (4.3 KB)
csa_total.csv (4.5 KB)
csa_wm.csv (4.5 KB)
t2s.nii.gz (2.3 MB)

Hi,
To adjust the segmentation, you need to use a 3rd party NIFTI viewer/editor such as FSLeyes. Here is a tutorial that explains how to correct segmentations using FSLeyes.
Best,
Julien

I went to the link and copied the lines of code and saved it on the desktop. The file I am working with is in this path: cd Desktop/Pain/pain_C2/t2s
The folder created (seg_manual) is located in cd Desktop/Pain/pain_C2

Is there a reason why I’m getting the error in the attached image?
I’m also attaching the code I used.


manual_correction.sh (1.2 KB)

Sarah

hi,
you should not copy/paste the commands but adapt them to your situation (file names, etc.). Easiest would be to just ignore the code on the webpage, and simply edit your segmentation file in FSLeyes (see the video tutorial, or contact the FSLeyes team for specific support).
Best
Julien

Hi Sarah,
Just following-up on this issue. Has it been solved on your end?
Cheers
Julien

Hello Julien,

Yes I was able to figure out how to manually edit 1 of my T2s images in FSLeyes.

I did try and segment another T2s image, but the SCT code put the segmentation in the wrong location (T11-L2 spine levels imaged). I think this is due to too much movement artifact, but wanted your opinion. Also, when you crop an image is there a way to enhance the image to be able to see the GM and WM better?

Attached is the T2s that is causing some problems.
t2s_T10-L1.nii.gz (3.1 MB)
t2s_T11-L2.nii.gz (3.1 MB)

Sarah

Hi Sarah,

Here are the commands that give OK results on your datasets. Notice the centerline detection algorithm that changes between the two datasets (cropping could help to stick to one algo).

t2s_T10-L1.nii.gz:

sct_deepseg_sc -i t2s_T10-L1.nii.gz -c t2s -centerline svm
sct_deepseg_gm -i t2s_T10-L1.nii.gz

Results:
anim

t2s_T11-L2.nii.gz:

sct_deepseg_sc -i t2s_T11-L2.nii.gz -c t2s -centerline cnn
sct_deepseg_gm -i t2s_T11-L2.nii.gz

Results:
anim1

Please note that on t2s_T11-L2.nii.gz, the spinal cord is only visible at slices 7-14. Below that is the cauda equinea (i.e. only nerves), so there is nothing to segment there. The automatic segmentation only works okayish for the 3 top slices, because the scan is hampered by motion artifact and poor B1+ homogeneity (ie lack of contrast in the cord).

Also, when you crop an image is there a way to enhance the image to be able to see the GM and WM better?

No. Spatial cropping does not affect image contrast.

Cheers,
Julien

Julien,

That really helped clean up the segmentations.

In your opinion do you think it would be better to use the T10-L1 T2s because of the potential motion artifact in the T11-L2? Based on the parameters used for the scans would there be more motion in general for everyone in the T11-L2 range?

Sarah

In your opinion do you think it would be better to use the T10-L1 T2s because of the potential motion artifact in the T11-L2?

i find the T10-L1 looks overall cleaner on this subject

Based on the parameters used for the scans would there be more motion in general for everyone in the T11-L2 range?

not necessarily. These sequences are very sensitive to motion, so it is possible that subject moved slightly more during the T11-L2 scan.

hi, I have .nii image, how can prepare my image for your method?
when I use “sct_propseg -i t2.nii.gz -c t2” commands, I give this error:
IndexError: string index out of range.

Hi @Hedieh_Toofany,

this question is out of the scope of this thread (which is about T2s GM and WM segmentation problems, as per the title).

We try to keep threads organized and not mix up problems, so that it is easier for people to get answers about specific questions.

Could you please open a new thread, with a title specific to your problem, and as always mention SCT’s version you are running, and provide more context so we can reproduce your error (e.g. provide the data + syntax you used).

Dear Sir,
I sincerely apologize for disregarding the forums, however unintentionally.