TotalSegmentator for only segmenting the spine

hi,

can we use this just to segment spine in isolation?

Please advise

Yes, it already segments each vertebra separately. You can show on vertebra or all vertebra, and hide everything else.

Thanks for the prompt reply

What I meant was

So if we can adapt this to just segment spine then it will take less processing power and time rather than segment everything and hide rest

Is that possible?

Best Regards,
Dr. Varun Agarwal

You cannot easily gain time by ignoring all the other structures, other than deleting segments before show 3D.

If you want to speed up the segmentation by segmenting less structures then you would need to modify the model. There are a few examples in TotalSegmentator for a two-stage approach: first perform a fast overall segmentation to get a region of interest and then run a refined model for that region. But the aim there is to improve the segmentation quality.

Is the few-minute computation time a problem or you have been just wondering if it could be easily reduced?

As Andras said, you would need to segment all structures, as the selective programs are only implemented for a few use cases.

But you could use the “Filter” function in “Segmentations” as shown here to just display the vertebrae.

I’ve realized that you can actually complete the full-resolution segmentation faster if you only need the spine, because the model is trained in 5 groups (organs, vertebrae, cardiac, muscles, ribs) and you could modify the implementation to only compute the vertebrae group.

1 Like

how about marking ROI first manually
cropping it out
and then running total segmentator

No need to mark the ROI manually first, as the vertebrae are segmented using a single model. If you crop the image then processing might be a little bit faster because some preprocessing steps may take longer for a larger image. However, you can expect much bigger speed improvement (processing may be 5x faster) by l running only the task necessary for spine segmentation. You can experiment with simply changing a single line in the TotalSegmentator executable script in your Slicer installation (...\Slicer 5.2.1\lib\Python\Scripts\TotalSegmentator).

This is now possible in Total Segmentator 2. From their documentation:

--roi_subset : Takes a space-separated list of class names (e.g. spleen colon brain ) and only predicts those classes.

1 Like

Yes, we will implement it in the next version of the extension which will be out when 3D Slicer 5.5.0 becomes stable version.

hello all

I tried totalsegmentator
Needless to say that it is a brilliant extension

I tried to segement partially
When I select “vertebral body” as segmentation task only the body is segmented and not the pedicles or spinous processes

however when I select “total” as segmentation task then whole vertebrae are segmented - in addition to rest of the stuff

how to segement whole of vertebrae only without other things or only bones?

Please advise
thanks

Vertebral body segmentation model only segments the vertebral body, not the processes.

In our projects we merge and remove the segments/details that we don’t need.

It could be possible to slightly reduce the execution time if you only run the bone segmentation subtask, but that would require some development in the extension and maybe slight changes in TotalSegmentator as well. We don’t plan to work on this right now, so you would need to find someone to work on it (but we can help with advice).