isosweep Evaluate
Isodose lines of a seven-field radiotherapy plan, with body outline and target
isosweep extracts a full set of isodose lines from a 512 × 512 dose plane in 1.00 ms on one CPU core — 31× faster than scikit-image and 9.9× faster than VTK's Flying Edges, with each closed curve already marked as enclosing high or low dose.
2.64 ms
1024² vessel boundaries, 1 core
28×
vs scikit-image on vessel boundaries
0
third-party runtime dependencies (C11 library)

The problem

Isodose lines are re-drawn every time a planner moves a beam, changes a weight or scrolls through slices. Boundary contours of thresholded scans (vessels, lesions, implants) are re-extracted every time the threshold changes. Research tools run on VTK (3D Slicer) or scikit-image. Commercial planning systems use in-house code, which you can’t benchmark but can replace. Either way the contour step sits in the interactive loop, often on CPU-only clinical workstations.

Head-to-head

Medical 2D contouring
Dataset Grid · levels isosweep1 thread isosweep4 threads scikit-image find_contours1 threadVTK Flying Edges1 threadContourPy1 threadGDAL 3.14-dev1 threadVTK Flying Edges4 threadsContourPy8 threads Speed-upvs fastest 1-thread Speed-upvs fastest overall
Adaptive RT isodose display 512 × 512 · 16 levels (interval 1/16) 1.00 ms 0.67 ms 30.5 ms 9.92 ms 16.9 ms 7.44 ms 4.95 ms 7.72 ms 7.4× 7.4×
Vascular network segmentation 1,024 × 1,024 · 10 2.64 ms 1.11 ms 73.2 ms 23.9 ms 42.8 ms 23.6 ms 6.72 ms 9.77 ms 9.0× 6.0×

Median wall-clock time per full extraction, in-process, identical in-memory grid and iso-levels for every tool, each in its fastest documented configuration; lower is better. All line tools return assembled polylines. "Fastest overall" compares our best (1 or 4 threads) with the best result of any other library at any thread count; the shaded cell is that library. Measured November 2026 on Intel(R) Xeon(R) Platinum 8488C (48 cores / 96 threads) — AWS EC2 c7i.metal-24xl (dedicated bare-metal server, no hypervisor); Linux-7.0.0-1018-aws-x86_64-with-glibc2.39; turbo disabled; governor performance; THP never. Methodology.

Exact configuration of each library
  • scikit-image find_contours — variant per_level {}
  • VTK Flying Edges (1 thread) — vtkImageData + filter pipeline built in prepare (zero-copy wrap, O(1)). vtkStripper joins segments into polylines (required for like-for-like output; MaximumLength unlimited so lines are fully joined) and is timed. variant sequential {"backend": "Sequential", "threads": 1}
  • ContourPy (serial) — variant serial_reused {"name": "serial", "line_type": "LineType.ChunkCombinedOffset", "reuse_generator": true}
  • GDAL 3.14-dev (master) — Both versions built from source with identical options. callback = pure computation, points copied into a result buffer (as any caller must); generate_ex = native API into an in-memory layer (native result type), the layer reset before each call outside the clock. Published value = faster of the two. variant generate_ex {"api": "GDALContourGenerateEx (in-memory layer)"}
  • VTK Flying Edges (best SMP backend × threads) — vtkImageData + filter pipeline built in prepare (zero-copy wrap, O(1)). vtkStripper joins segments into polylines (required for like-for-like output; MaximumLength unlimited so lines are fully joined) and is timed. variant smp {"backend": "STDThread", "threads": 4}
  • ContourPy (threaded, best threads × chunks) — variant threaded_reused {"name": "threaded", "line_type": "LineType.ChunkCombinedOffset", "thread_count": 8, "chunk_count": [4, 4], "reuse_generator": true}

Built for regulated software

  • Repeatable. The same input and settings give identical output, run after run, which keeps verification and regression testing simple.
  • No third-party dependencies. A C11 library: no runtime, no GPU driver, no third-party packages in your SOUP list. Ships as a static library.
  • Classified output. Each closed isodose line knows whether it encloses the higher dose (a hot spot) or the lower dose (a cold spot inside a high-dose region). That is what dose display, DVH tooling and auto-labelling need.
  • Support for your documentation. Enterprise licences can include the verification evidence your quality system asks for. Scope it with us.

Run it on your own data

Evaluations include the SDK binaries, the CLI and the benchmark harness used on this page, so you can reproduce these numbers on your hardware and then on your data.

Other use cases