Sandbox — LSD is in active testing. All systems operational·payments are test-mode (no real charges).
Overview Use Cases News Docs Tool Store Support Community Get LSD
Use cases/ Medical Imaging/ Segmenting organs from CT series with ONNX
Segmented organs rendered as 3D surfaces inside the windowed CT volume replace with clip · 1600 × 900

Segmenting organs from CT series with ONNX

Load a CT DICOM series, window it and resample to isotropic voxels with every plane previewing, then run an ONNX model that paints each organ into the 3D viewer. QA the surfaces by hand and export an annotated volume plus a per-organ volumetrics report — built for research and model QA, not diagnosis.

▶ Video walkthrough Intermediate ⏱ 30 min ctdicomsegmentationonnxvolumetrics

Why not just run the notebook#

The usual organ-segmentation run is a pydicom loader, a SimpleITK resample, an inference script, and a pile of matplotlib slices you squint at afterward. Four tools, three intermediate arrays, and no way to see a bad window until the overlay already looks wrong. On the canvas the same chain is a handful of live nodes, and every one previews. The expensive parts — reading the series, resampling to isotropic, scoring the volume — become cached intermediates, so changing the window at the end costs seconds, not another full pass.

What you need#

An ONNX segmentation model trained on your organ scheme and a CT series from any scanner that writes standard DICOM. LSD reads spacing and orientation straight from the tags, so nothing needs converting to NIfTI first. Multi-organ or single-structure models load the same way — the viewer colors whatever label set the model emits.

Research and QA, not diagnosis#

This pipeline is built for reproducible research and model QA — comparing a segmentation to last month's, checking a model against a held-out study, measuring volumes for a cohort paper. It is not a diagnostic device and makes no clinical claim. The value is that every number carries its provenance: the window, the voxel spacing, and the exact model version travel with the export, so a result from six months ago rebuilds identically.

Step by step

How it's built

  1. #043 · Load 01

    Load the CT series

    Drag the study folder onto the canvas — a few hundred axial slices land as one @load node keyed by series UID. LSD reads slice spacing, orientation, and rescale tags without decoding every image, so the volume previews in seconds. Scroll the slice slider to confirm the series loaded top-to-bottom in the right order.

    CT series loaded as a volume with the slice slider previewing replace with screenshot · 1200 × 750
  2. 02

    Window the volume

    Add a @shape windowing node and pick a soft-tissue preset — level 40, width 400. The preview re-renders as you drag the sliders, so organ boundaries snap into contrast instead of washing out. Switch to a bone or lung preset any time; the node remembers each setting and the cached raw volume stays untouched.

    Soft-tissue window applied with the level and width sliders replace with screenshot · 1200 × 750
  3. #044 · Shape 03

    Resample to isotropic voxels

    CT slices are usually thicker than they are wide, which skews any 3D measurement. Chain a resample @shape node set to 1 mm isotropic voxels and watch the axial, coronal, and sagittal previews line up to true proportions. The resampled volume caches, so the model step downstream never recomputes it.

    Three-plane preview after resampling to 1 mm isotropic voxels replace with screenshot · 1200 × 750
  4. #045 · Deliver 04

    Run the ONNX segmentation model

    Drop your ONNX organ model onto the canvas and wire the resampled volume into the @deliver node it becomes. Labels stream back a slice block at a time, and the viewer paints each organ its own color as they arrive. A flipped orientation or wrong label index shows up in seconds — long before the full volume finishes.

    Organ labels streaming in over the axial slices replace with screenshot · 1200 × 750
  5. #046 · Deliver 05

    QA the 3D overlay

    Open the 3D viewer and turn each predicted organ into a shaded surface floating inside the windowed volume. Rotate it to catch the classic failures — a liver that leaks into the ribcage, a kidney with a hole punched through it. Toggle organs on and off and scrub the slice overlay to confirm the surface tracks the boundary on every plane.

    Segmented organs as 3D surfaces with per-organ toggles replace with screenshot · 1200 × 750
  6. 06

    Export the annotated volume and report

    Finish with a @deliver export node. Write the masks back into a DICOM-compatible segmentation volume so downstream tools read it natively, and emit a per-organ volumetrics CSV — millilitres per structure, plus the window, spacing, and model version behind each number. Re-running on the next study reuses every cached setting.

    Annotated volume export beside the per-organ volumetrics table replace with screenshot · 1200 × 750
The pipeline

Every step used, at a glance

Load

CT DICOM series

Index a full axial series with slice spacing, orientation, and rescale tags intact.

DICOM
Shape

Window & resample

Apply an intensity window and resample to isotropic voxels, previewing each plane as you go.

Deliver

Segment, QA & export

Run ONNX segmentation, QA the organs in 3D, then export an annotated volume and a volumetrics report.

ONNXDICOMCSV
1 mm
isotropic voxels — true 3D measurement
3D QA
rotate every organ before you trust it
Reproducible
window, spacing & model version logged

More use cases