Knowledge Base updated: 2026-11-22
OHIF Viewer Knowledge Base
OHIF Viewers is a modular medical-imaging viewer platform. The application shell composes platform services, modes, extensions, and UI packages into deployable viewing workflows.
The primary runtime boundary is platform/app; shared registration, command, study, and display-set state live in platform/core. Modes select workflow configuration, while extensions contribute rendering, tools, panels, and modality-specific capabilities.
Cornerstone-based imaging is provided through extensions, with DICOM SEG, RT, SR, and measurement workflows layered around the primary viewport integration. Shared presentation components are supplied by platform/ui and platform/ui-next.
flowchart TD
App[platform/app] --> Core[platform/core]
App --> Modes[modes]
App --> Extensions[extensions]
App --> UI[platform/ui]
App --> UINext[platform/ui-next]
Core --> Services[Services and commands]
Core --> Studies[Studies and display sets]
Modes --> Basic[Basic and longitudinal]
Modes --> Specialized[Segmentation, microscopy, quantitative]
Extensions --> CS[Cornerstone extension]
Extensions --> Default[Default extension]
Extensions --> Modalities[Specialized modality extensions]
CS --> Viewports[Viewports and tools]
CS --> Clinical[DICOM SEG, RT, SR]
Clinical --> Measurements[Measurement tracking]
Glossary
- Mode — A package that defines a product-specific viewer workflow through routes, layouts, protocols, and extension dependencies.
- Extension — A pluggable package that contributes modules such as viewports, commands, panels, toolbar items, or data-source integration.
- Display set — The platform representation of image data prepared for protocol selection and viewport display.
- Hanging protocol — Configuration that selects studies and display sets and places them into a viewer layout.
- Cornerstone extension — The primary integration layer that bridges OHIF services with Cornerstone rendering and tools.
Invariants
- Application configuration must resolve registered modes and extensions before viewer routes can host a workflow (
platform/app/**). - Shared platform behavior is exposed through core service and command contracts rather than direct extension-to-extension coupling (
platform/core/**). - Modes declare their workflow dependencies explicitly through their package configuration and mode definitions (modes/…/package.json,
modes/*/src/**). - Viewer rendering capabilities are contributed through extension modules, with Cornerstone viewport behavior owned by the Cornerstone extension (
extensions/cornerstone/src/**). - Modality-specific extensions build on, rather than replace, the platform application and core registration boundaries (extensions/…/package.json).
Routing table
platform/app/**-> Viewer application compositionplatform/app/src/**-> Application startup and runtimeplatform/cli/**-> Project scaffolding and plugin distributionplatform/core/**-> Core platform servicesplatform/core/src/services/**-> Core service orchestrationplatform/core/src/classes/**-> Study and display set lifecycleplatform/ui/**-> Viewer UI systemplatform/ui/src/**-> Shared UI componentsplatform/ui-next/**-> Next-generation UI componentsextensions/cornerstone/**-> Cornerstone imaging integrationextensions/cornerstone/src/**-> Cornerstone viewport and toolsextensions/cornerstone-dicom-seg/**-> DICOM segmentation and radiotherapyextensions/cornerstone-dicom-rt/**-> DICOM segmentation and radiotherapyextensions/cornerstone-dicom-sr/**-> Structured reports and measurementsextensions/measurement-tracking/**-> Structured reports and measurementsmodes/**-> Mode-driven workflowsmodes/basic/**-> Basic and longitudinal viewingmodes/basic-dev-mode/**-> Basic and longitudinal viewingmodes/basic-test-mode/**-> Basic and longitudinal viewingmodes/longitudinal/**-> Basic and longitudinal viewingmodes/segmentation/**-> Segmentation and microscopy modesmodes/microscopy/**-> Segmentation and microscopy modesmodes/preclinical-4d/**-> Quantitative and annotation modesmodes/tmtv/**-> Quantitative and annotation modesmodes/usAnnotation/**-> Quantitative and annotation modesextensions/**-> Extension ecosystemextensions/default/**-> Default extension capabilitiesextensions/cornerstone-dicom-pmap/**-> Specialized modality extensionsextensions/cornerstone-dynamic-volume/**-> Specialized modality extensionsextensions/dicom-microscopy/**-> Specialized modality extensionsextensions/dicom-pdf/**-> Specialized modality extensionsextensions/dicom-video/**-> Specialized modality extensionsextensions/tmtv/**-> Specialized modality extensionsextensions/usAnnotation/**-> Specialized modality extensions