how to automatically segment bones from dicom

Hi, I have dicom files with multiple (separate) bones scanned at once. I want to automatically segment each bone and create a watertight surface mesh (ply format) for each bone. All the tutorials I am finding require manual segmentation but given the number of scans I need this to be as automated as possible, I’m guessing through the Python modules. Since the bones are already separated I think this should easy compared to segmenting out connected bones, where more human intervention is required. Also, I have an .hx script that can be run in Amira and works beautifully, but can no longer afford Amira. Can someone point me in the right direction to automatically segment out bones in Slicer? Thanks, much appreciated.

All the tools are available in Slicer to fully automate this with minimal, very high-level Python scripting. The Slicer script repository probably contains examples for all the steps, but if you don’t find anything then let us know. To learn about basics of writing Python processing scripts or modules for Python, see this tutorial. Note that you can also use Slicer as a Jupyter notebook kernel, if you prefer to work with notebooks.

Before you write the script, I would recommend to determine a good workflow using the Slicer GUI. Approximately these steps should work for you:

  • Import and load DICOM image using DICOM module
  • Threshold
  • Split islands to segments (to add separate label to each bone)
  • Export to models (only STL and OBJ can be exported directly to files)
  • Save models as PLY

If you want to solidify bones and/or make them easier to 3D print by converting to shell, then you can use WrapSolidify effect (provided by SurfaceWrapSolidify extension).

1 Like

Hi Andras, thank you very much. Oftentimes just learning the names of the functions/extensions is a huge step forward for me. This is very helpful.