Automated Spinal Cord Segmentation

Slicer version: 4.8.1

Hi,

I am aiming to automate spinal cord segmentation from MR images. I have been using Spinal Cord Toolbox (SCT); a Linux-based open-source software dedicated specifically to the processing and analysis of the spinal cord. The documentation of the Spinal Cord Toolbox module sct_propseg which I have been using is listed here: Spinal Cord Toolbox / Documentation / sct_propseg

I have been testing SCT’s automated segmentation through Slicer and it works for this MR image of the cervical vertebrae:

image

However, the issue I am experiencing is poorly automated spinal cord segmentation for my lumbar vertebrae images. In fact, SCT seems to fail to segment my T1 image. Even stranger, my T2 image (spinal cord = dark, CSF = bright) is being segmented poorly when selected as a T2 image but adequately when selected as a T1 image (spinal cord = bright, CSF = dark).

image

I believe that the lumbar vertebrae images are not being processed correctly due to the spinal cord not being well-defined as well as poor contrast between the spinal cord and the cerebrospinal fluid (CSF):

image

In fact, the recommendations listed here Spinal Cord Toolbox / Documentation / correction_PropSeg suggest that the image should be edited to more clearly enhance these features. However, these editing procedures are complicated and my workflow would no longer consist of automated segmentation.

I have investigated equivalent Slicer semi-automated segmentation tools as an alternative and indeed, they work for the cervical vertebrae image. Some initialization (albeit very limited) is required by the user (which may impede its effectiveness); moreover, these tools do not perform as well as SCT but are satisfactory enough for my needs.

Unfortunately though, these tools are not adequate for the lumbar vertebrae images discussed above.

Thus, any suggestions on how I should proceed or advice concerning the appropriate tools or programs that can automate spinal cord segmentation would be greatly appreciated.

Thanks.

1 Like

Hi Hikmat,

For help with SCT specifics of their algorithm, I would ask the SCT developers for help. You could submit an issue on their github, https://github.com/neuropoly/spinalcordtoolbox/issues or write Julien an email.

Michael

1 Like

Some initialization (albeit very limited) is required by the user (which may impede its effectiveness)

You can usually automate seed placement and thus have a completely automatic method. For example you can register a generic “atlas” image and transferring seeds to the patient image. Or you may use simple global thresholding to get candidate regions and keep the most likely candidate (that meets minimum size and shape requirements). You may also use the segmentation that sct provides as seed: you shrink it by a few mm and use that as spinal cord segment, and expand by a centimeter and use that as background segment. The advantage is that you can add more seeds manually to fix segmentation in regions where sct registration failed.

Grow from seeds and Watershed allows interactive seed editing, so they work on any images, they can even separate regions where there is no image contrast at all. The question is how much additional seed is needed. If you spend several minutes specifying additional seeds then you may just as well use more manual methods, such as interpolate between slices.

“Interpolate between slices” effect allows you to interpolate segmentation between slices. For example, you can segment on 20-30 slices and the effect computes segmentation between these. You can then review segmentation results and if you find that deviation on any interpolated slice is too much then you segment that single slice and the full segmentation is updated immediately.

We can give you more specific advice, if you provide example images and information on constraints (what should be segmented exactly, how accurate the segmentation has to be, how much time is available for segmentation, etc).

2 Likes

Thanks for the detailed response as always, Andras.

In terms of what exactly needs to get segmented, a correct interpretation of MR images of the spine is needed.

For T1 images, the spinal cord (the R.O.I) is identified as follows:
image

For T2 images, the spinal cord is interpreted differently:
image

As for how accurate the segmentation needs to be, the contrast between the spinal cord and the CSF needs to be recognized. More specifically, the spinal cord is typically well-defined in MR images (a definite outline) and so the segmentation should define the spinal cord according to this feature.

Finally, the segmentation technique should be as automated as possible. There are many Slicer tools that are quite powerful but the manual nature of these tools may be overwhelming to the user. Moreover, I think the issue is that most Slicer tools work on the principles of intensity-based definition: ie. the Threshold effect. This poses an issue though, since the interior of the spinal cord is either not of a consistent intensity or it is of an intensity equal to that of other components of the spine - thus rendering Threshold ineffective.

In addition, while Grow from seeds and Watershed are powerful tools, the many seeds required to yield an accurate segmentation detracts from the automation of the tool. Furthermore, Interpolate between slices is too manual for my needs. SCT’s sct_propseg thus seems like the most promising tool; but there are issues with its performance and their developers are looking into the matter.

The structure of the spinal cord is evident by its outline; which is defined by the contrast of the CSF surrounding it. Perhaps there is a tool / script that can recognize a "boundary change" between different components in an image?

Hopefully I have broken things down more clearly and that a solution may present itself - preferably Slicer-based but I am open to outside tools too (i.e. SCT).

Thanks in advance.

2 Likes

Some effects use global threshold, but most semi-automatic methods use gradient (intensity change) instead. You can segment structures that have varying intensity, as long as there is some intensity difference at its boundary. For example, Grow from seeds, Watershed, and Fast marching all put segment boundaries at where image intensity suddenly changes.

I had a look at the images that you’ve shared and indeed it is not easy to segment the spinal cord from them.

One problem is that the resolution of the volumes are highly anisotropic (spacing between sagittal image planes is 6x more than in-plane spacing). Resampling the volume before segmentation to have isotropic spacing improves the result (using Crop volume module, isotropic spacing option), but of course it would be better to acquire images that have less spacing between slices.

VMTK did not work very well, as it relies on a pre-processing filter that detects tubular structures and this filter does not enhance the the spinal cord.

Grow from seeds and Watershed seems to require too much tuning of the seeds, so it is not worth the time if you only need the cord. If you want to segment cord, CSF, fat, etc. then it could be a good approach.

For me, the most effective method was to contour on 8 slices using Draw effect and then get full 3D segmentation using Fill between slices. The whole process takes 2 minutes. The accuracy is as good as the operator’s best judgement, and it is very easy to make manual adjustments if needed.

If some toolkits offer acceptable automatic registration then of course use that; but if they do not work (because image quality is not good enough, uncommon patient anatomy, etc.) then Draw+Fill between slices could be a good choice.

1 Like

Can I add these findings and your sample images to segmentation recipes?

I think this will be a valuable contribution to the Slicer learning community; I may have to check with the lab though.

EDIT: Posting the images for access and download would be a problem.

I appreciate your valuable insight into this matter. I have also tested these tools in detail and it is reassuring to know that I am reaching the same conclusions. I did not consider the Draw + Fill as I deemed it too manual but it is indeed giving me the best results.

I was given these images for testing purposes to use for my simulator and perhaps the quality is simply not good enough. Interestingly enough, the SCT developers also commented about the anisotropic property of the images and its effect on performance. They now have a better understanding of my constraints / objectives and are looking into the matter. If some useful findings are made, I can report them here.

1 Like

Hi,

Thank you for your feedback. Please note that SCT now has another method for spinal cord segmentation based on deep learning called sct_deepseg_sc, which in some cases is more robust than sct_propseg. More information here.

Best,
Julien

1 Like

Has there been further progress in semi & auto-segmentation of MRI studies of spine?

I don’t know if anything significant happened on the algorithms side, but there have been lots of enhancements in Slicer that may be relevant for you.

  1. Now you can run deep-learning based segmentation methods directly in Slicer. If there is any spine segmentation methods that you know that works well then you can create a small plugin that makes it available in the Segment Editor with a convenient user interface.

  2. New segmentation tools have been added. If the image is sufficiently good quality then you can segment the spinal cord by a few clicks. If you describe your requirements and main challenges and share an anonymized image (at least screenshots) then we can give more specific advice.