Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors

Automatic spine segmentation in 3D Slicer

Guide to using 3D Slicer and nnUNet for automatic spine segmentation

This is desktop 3D Slicer 5.7+ plus Kitware’s nnUNet extension: load a CT, run your trained spine weights, get a vertebrae mask, edit it with the usual Slicer tools. It is not how to train nnUNet (that is the YouTube course and Nour’s write-up, linked at the end). It is not cloud Slicer — that is 3D Slicer online.

Slicer has no built-in “segment the spine” module. The extension calls official nnUNet inference. The first mask is a draft. Paint, erase, and islands after.

Install Slicer 5.7 or later

The Kitware nnUNet extension needs Slicer 5.7+. Download from download.slicer.org. The original run used the 5.7 preview; any later stable is fine as long as the extension is listed in the manager.

Download 3D Slicer 5.7 or later (Windows, macOS, Linux)

Install the nnUNet extension

View → Extension Manager (or the Extensions button). Search nnUNet. Install. Restart Slicer so the module actually loads.

Extension Manager: install nnUNet

Install Python deps (one button)

Modules → Segmentation → nnUNet. The extension ships a single Install control that pulls the Python packages nnUNet needs inside Slicer’s environment. Do not pip install into a random conda you have on the side — Slicer will not see it.

nnUNet module in Segmentation
nnUNet Install button for Python dependencies

Wait until that finishes. A failed install is almost always a blocked outbound pip or a missing NVIDIA driver if you picked CUDA.

Point it at official nnUNet weights

Inference uses the official folder layout. If you trained with nnUNet v2, the results tree looks like this:

nnUNet_results/
  DatasetXXX_Spine/
    nnUNetTrainer__nnUNetPlans__3d_fullres/
      dataset.json
      plans.json
      fold_0/
        checkpoint_final.pth
      fold_1/
        checkpoint_final.pth

v1 used RESULTS_FOLDER/nnUNet/3d_fullres/TaskXXX_…/nnUNetTrainerV2__nnUNetPlansv2.1/fold_0/ and model_final_checkpoint. The extension needs the tree your trainer actually wrote. Do not flatten the folds into one directory.

Official nnUNet results folder layout

In the module, set:

Field What to put
Results / main folder The nnUNet_results (v2) or RESULTS_FOLDER (v1) root — not a single .pth.
Dataset / trainer / configuration Whatever you trained: DatasetXXX_Spine, nnUNetTrainer, 3d_fullres (names must match the folders).
Weights file Usually checkpoint_final.pth (v2) or model_final_checkpoint (v1).
Fold 0, 1, 2… Use the fold you trust, or the one you have. Ensemble is not this UI.
Device cuda if the box has a working NVIDIA driver; otherwise CPU (slow on a full CT).
nnUNet module: folder, checkpoint, fold, CUDA

Load the CT and Apply

  1. Load the volume (DICOM series or NIfTI) with File → Add Data. Select it as Input volume.
  2. Apply. Logs print under the button. First run on a new machine also warms the engine; later volumes on the same config are faster.
  3. When it finishes, the mask is overlaid on the CT. Check sagittal and coronal, not only axial — missed T12 or a fused L4/L5 is obvious there.
nnUNet spine mask overlaid on CT after Apply

From here it is ordinary Slicer: Segment Editor (paint, erase, islands, logical operators) on that mask. Export a segmentation NIfTI or an STL if you need a surface. Browser / Clara / MONAI Label is a different stack; use the 3D Slicer online guide for that.

Training (not this page)

PYCAD builds custom web DICOM viewers when the mask has to live next to the series in an app, not only in desktop Slicer. Case studies.

We build custom medical imaging platforms — advanced DICOM viewers, AI segmentation, and the clinical systems around them.

Get in Touch

Copyright © 2026 PYCAD. All Rights Reserved.