Skip to content

🩻 A 3D Slicer plugin for fully automated segmentation of 167 anatomical structures in CT.

License

Notifications You must be signed in to change notification settings

benbennett/SlicerCADSWholeBodyCTSeg

 
 

Repository files navigation

CADS 3D Slicer Plugin

This repository provides the 3D Slicer extension of the CADS-model, enabling one-click, fully automated segmentation of 167 anatomical structures in whole-body CT directly inside 3D Slicer.

overview

CADS-model is part of the broader CADS project, which also includes the CADS-dataset, a comprehensive collection of more than 22,000 CT scans with annotations for 167 anatomical structures.

👉 This repository focuses only on the plugin for CADS-model, providing an easy-to-use interface for clinical and research workflows.

Useful Links

If you use this software and find this work useful, please cite:

@article{xu2025cads,
  title={CADS: A Comprehensive Anatomical Dataset and Segmentation for Whole-Body Anatomy in Computed Tomography},
  author={Xu, Murong and Amiranashvili, Tamaz and Navarro, Fernando and Fritsak, Maksym and Hamamci, Ibrahim Ethem and Shit, Suprosanna and Wittmann, Bastian and Er, Sezgin and Christ, Sebastian M. and de la Rosa, Ezequiel and Deseoe, Julian and Graf, Robert and Möller, Hendrik and Sekuboyina, Anjany and Peeken, Jan C. and Becker, Sven and Baldini, Giulia and Haubold, Johannes and Nensa, Felix and Hosch, René and Mirajkar, Nikhil and Khalid, Saad and Zachow, Stefan and Weber, Marc-André and Langs, Georg and Wasserthal, Jakob and Ozdemir, Mehmet Kemal and Fedorov, Andrey and Kikinis, Ron and Tanadini-Lang, Stephanie and Kirschke, Jan S. and Combs, Stephanie E. and Menze, Bjoern},
  journal={arXiv preprint arXiv:2507.22953},
  year={2025}
}

Installation

  1. Install 3D Slicer
    Download and install the latest version of 3D Slicer.
    Compatibility note (verified on 2025-10-03): Our extension has been tested with preview release 5.9.0.

  2. Install PyTorch
    Slicer makes it easy to set up the correct PyTorch version:

    • Open Extension Manager in Slicer → search for PyTorch → click Install.
      (Slicer will ask you to restart after installation.)
    • After restarting, go to the PyTorch Utils module.
      In the Torch version requirement box, type >=2.1.2, then click Install PyTorch. Any PyTorch version between 2.1.2 and 2.8.0 (inclusive) should work correctly.
  3. Install nnUNet
    Slicer makes it easy to set up the correct nnUNet:

    • Open Extension Manager in Slicer → search for NNUNet → click Install.
      (Slicer will ask you to restart after installation.)
    • After restarting, go to the nnUNet module.
      In the To install box, type ==2.5.2, then click Install.
      ⚠️ Important: Please install exactly nnUNet==2.5.2 to ensure reproducible results and compatibility with our extension.
  4. Install CADSWholeBodyCTSeg Extension

    • Open Extension Manager → search for CADSWholeBodyCTSeg → click Install. (Again, restart Slicer after installation.)
    • Once restarted, open the CADSWholeBodyCTSeg module in Slicer and you should see the user interface ready to use.

Quick Start

  1. Open the CADSWholeBodyCTSeg extension in 3D Slicer.
  2. Load your CT image file.
  3. Set the input parameters:
    • Input volume: The CT image you want to segment.
    • Segmentation task: Choose a specific task from the dropdown menu (the targets for each task will be displayed in the UI), or select All to run every task in sequence.
    • Target mode:
      • All targets: Generate a complete segmentation for the chosen task.
      • Select targets: Pick only the structures you want from the list below.
    • Advanced options:
      • Use standard segment names (default: Yes): Displays segmentation results using SNOMED-CT terminology.
      • Force to use CPU (default: No): Runs inference on CPU if you don’t have a GPU. (Note: CPU is slower and will take longer.)
      • CADSWholeBodyCTSeg Python package:
        • Force install dependencies: Re-installs the CADSWholeBodyCTSeg package.
        • Get package information: Shows the current CADSWholeBodyCTSeg package version.
  4. Run: Click Apply, the CADS-model will begin segmenting your CT scan.
  5. View the results:
    • Once finished, the results will appear automatically. You can then go to the Data tab to view the list of structures.
    • You can view the segmentations in the three orthogonal 2D views, or drag them into the 3D viewer.
    • Hovering over a structure name will show detailed structure information in SNOMED-CT terminology.

overview

Target Structures in Each Task

Each task represents a specific anatomical group.

Task - Core organs: Spleen, Kidney R/L, Gallbladder, Liver, Stomach, Aorta, Inferior vena cava, Portal and splenic veins, Pancreas, Adrenal glands R/L, Upper/Lower lobes of left lung, Upper/Middle/Lower lobes of right lung.

Task - Spine complete: Vertebrae C1-C7, T1-T12, L1-L5.

Task - Heart & vessels: Esophagus, Trachea, Myocardium, Heart atrium R/L, Heart ventricle R/L, Pulmonary artery, Brain, Common iliac artery R/L, Common iliac vein R/L, Small intestine, Duodenum, Colon, Urinary bladder, Face.

Task - Trunk muscles: Humerus R/L, Scapula R/L, Clavicle R/L, Femur R/L, Hip R/L, Sacrum, Gluteus maximus/medius/minimus muscles R/L, Deep muscle of back R/L, Iliopsoas muscle R/L.

Task - Ribs complete: Ribs 1-12 R/L.

Task - RT risk organs: Spinal canal, Larynx, Heart, Peritoneal cavity, Sigmoid colon, Rectum, Prostate, Seminal vesicle, Mammary gland R/L, Sternum, Psoas major muscle R/L, Rectus abdominis muscle R/L.

Task - Brain tissues: White matter, Gray matter, Cerebrospinal fluid, Scalp, Eyeballs, Compact bone, Spongy bone, Blood, Muscle of head.

Task - Head-neck organs: Carotid artery R/L, Arytenoid cartilage, Mandible, Brainstem, Buccal mucosa, Oral cavity, Cochlear R/L, Cricopharyngeus, Cervical esophagus, Anterior/Posterior eyeball segment R/L, Lacrimal gland R/L, Submandibular gland R/L, Thyroid, Glottis, Supraglottis, Both lips, Optic chiasm, Optic nerve R/L, Parotid gland R/L, Pituitary gland.

Task - Body regions: Subcutaneous tissue, Muscle, Abdominal cavity, Thoracic cavity, Bones, Gland structure, Pericardium, Prosthetic breast implant, Mediastinum, Spinal cord.

License and Citation

  • Codebase (the cads package and all source code in this repository) is licensed under the Apache License 2.0.
  • Model weights released in the Releases section are licensed under CC BY 4.0.

If you use any component of CADS (CADS-dataset, its curated segmentation masks, pretrained CADS-model, or the 3D Slicer extension), please cite:

@article{xu2025cads,
  title={CADS: A Comprehensive Anatomical Dataset and Segmentation for Whole-Body Anatomy in Computed Tomography},
  author={Xu, Murong and Amiranashvili, Tamaz and Navarro, Fernando and Fritsak, Maksym and Hamamci, Ibrahim Ethem and Shit, Suprosanna and Wittmann, Bastian and Er, Sezgin and Christ, Sebastian M. and de la Rosa, Ezequiel and Deseoe, Julian and Graf, Robert and Möller, Hendrik and Sekuboyina, Anjany and Peeken, Jan C. and Becker, Sven and Baldini, Giulia and Haubold, Johannes and Nensa, Felix and Hosch, René and Mirajkar, Nikhil and Khalid, Saad and Zachow, Stefan and Weber, Marc-André and Langs, Georg and Wasserthal, Jakob and Ozdemir, Mehmet Kemal and Fedorov, Andrey and Kikinis, Ron and Tanadini-Lang, Stephanie and Kirschke, Jan S. and Combs, Stephanie E. and Menze, Bjoern},
  journal={arXiv preprint arXiv:2507.22953},
  year={2025}
}

Troubleshooting

CUDA Memory Error (torch.OutOfMemoryError)

Even though the model is designed to automatically manage available GPU/CPU resources during prediction, you may still run into out-of-memory errors. This usually happens if:

  1. Your GPU has very limited VRAM (e.g., around 4 GB), or
  2. The input CT image is large.

In these cases, I recommend switching to Force to use CPU mode. It will be slower than GPU (CPU-only needs around 10+ minutes for a chest+abdomen CT), but it will run more reliably and avoid memory issues.

Disk Space Issues

Each task requires downloading a pre-trained model of about 727 MB. If you plan to use several or all nine tasks, make sure there’s enough free space (around 7 GB recommended) on the drive where 3D Slicer is installed.

If your disk runs out of space, you might see error messages during model download or loading. If that happens, pls try freeing up some space and run the setup again.

Contact

If you encounter any issues or have suggestions, please open an issue in this GitHub repository.

We truly appreciate your feedback and ideas, it helps us make the project better!

About

🩻 A 3D Slicer plugin for fully automated segmentation of 167 anatomical structures in CT.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 97.0%
  • CMake 3.0%