Sonador Segmentation Editor (DICOM-SEG / M3D / CAD) — integration, refinement, documentation, and release

1. Overview

The Sonador Segmentation Editor extends the Sonador Viewer with tools to view, create, modify, and save segmentations — DICOM-SEG labelmaps, M3D surface models, and CAD-derived geometry — directly in the browser, alongside the existing 2D/MPR and 3D visualization capabilities. It is built on Cornerstone3D (tools, cache, segmentation services) and Three.js, with OHIF v3 UI components (segmentation table, tool management) ported into the Sonador Viewer panel system.

This issue is the canonical tracking location for landing the work, fine-tuning features, preparing documentation, and packaging for release. Development to date spans the roakes/seg-editor and roakes/seg-editor.r2 branches (oak-tree/medical-imaging/ohif-viewers!58).

Scope note: This issue primarily tracks the Segmentation Editor. oak-tree/medical-imaging/ohif-viewers!58 carries two additional workstreams (worklist review procedures, study-list layout overhaul); those are treated as companion work and tracked elsewhere (orthanc-sonador#54 (closed)). This issue also serves as a wrangling point for related frontend viewer work — notably MPR orientation correctness (oak-tree/medical-imaging/ohif-viewers#106).

2. Business value

  • Complete the annotate → review → approve loop in one platform. Reviewers can inspect and correct segmentations without exporting to Slicer or desktop tools, shortening the feedback cycle for segmentation-dependent workflows (pre-op planning, model training data curation).
  • Foundation for AI-assisted segmentation. An in-browser editor with undo/redo and labelmap tooling is the prerequisite for MONAI Label integration (ohif-viewers#7) and the agentic-AI segmentation approval loop (#94).
  • Multi-format support (DICOM-SEG / M3D / CAD) differentiates Sonador from viewers that only toggle labelmap visibility, and keeps outputs in standards-based formats consumable by the Python client and downstream pipelines.
  • Performance and modernization dividends. The upgrade to React 18 / Cornerstone3D 4.x / Three.js 0.183 and the shared-cache architecture benefit the whole viewer, not just the editor.

3. Capability inventory (to be expanded into business descriptions)

  • Segmentation viewing — DICOM-SEG rendering in 2D/MPR and 3D viewports (oak-tree/medical-imaging/ohif-viewers!47, oak-tree/medical-imaging/ohif-viewers!58)
  • Segmentation editing — brush/livewire/volumetric tools with undo/redo via SegmentationService (oak-tree/medical-imaging/ohif-viewers!58, ohif-viewers#92)
  • Segmentation management panel — OHIF v3 segmentation table for segment/labelmap/M3D model state (oak-tree/medical-imaging/ohif-viewers!58)
  • 3D surface & model support — M3D (STL/GLB) rendering with Cornerstone3D-cached geometry (oak-tree/medical-imaging/ohif-viewers!58, ohif-viewers#93)
  • Save/round-trip — persist edited segmentations back as DICOM-SEG (oak-tree/medical-imaging/ohif-viewers!47)
  • Progress/state indication — Loading vs. Rendering indicators for long-running background operations (ohif-viewers#94 (closed))
  • MPR orientation correctness — middle-plane view no longer flipped left/right in 2D MPR and enlarged views (oak-tree/medical-imaging/ohif-viewers#106, oak-tree/medical-imaging/ohif-viewers!58)

4. Outstanding work

Land the branch

  • Finish review and merge oak-tree/medical-imaging/ohif-viewers!58
  • Verify and close oak-tree/medical-imaging/ohif-viewers#106 on merge
  • Decide whether the worklist-procedures and study-list-layout portions ship together or split

Feature fine-tuning

  • ohif-viewers#92 — segmentation panel <-> 3D viewer integration (tool toggles, active labelmap switching)
  • ohif-viewers#93 — Cornerstone3D cache as primary data store
  • ohif-viewers#94 (closed) — Loading/Rendering state indicator
  • oak-tree/medical-imaging/ohif-viewers#108 — MPR enlarged-view menu icon configuration

Documentation

Packaging & release

  • Downstream integration into the Sonador web application (successor to oak-tree/medical-imaging/sonador!73)
  • Package build & release checklist (versioning, changelog, deployment)

Related (not blocking)

Edited by Rob Oakes