* feat: Update to use pnpm (#6031) [simulated squash-merge]
* feat: load DICOM SEG images via imageLoader
* feat: load DICOM SEG images via imageLoader
* PR review fixes
* Test fragment of compressed multiframes
* fix: Removed dependencies incorrectly
* Update frame as a targetted change to avoid stripping remaining params
* lock
* Update test to agree with the missing representation branch
* test(contour): contour color change coverage (#6042)
* test(contour): contour interactions delete segment (#6069)
---------
Co-authored-by: Bill Wallace <wayfarer3130@gmail.com>
* chore(version): Update package versions to 3.13.0-beta.98 [skip ci]
* feat(testing): OHIF Test Agent Skills (#5993)
* chore(version): Update package versions to 3.13.0-beta.99 [skip ci]
* test(contour): Add the ContourSegmentToggleLock.spec.ts test file to test contour locking (#6072)
* chore(version): Update package versions to 3.13.0-beta.100 [skip ci]
* chore(testing): Flock lock for playwright tests; Pin node version for OHIF; add more workers (#6099)
* update Cypress apt deps for Ubuntu Noble (drop libgconf-2-4, libasound2→libasound2t64)
* chore(version): Update package versions to 3.13.0-beta.101 [skip ci]
* Debug fixes
* perf(seg): pass explicit frame decode concurrency (16) to SEG loader
Pass an explicit concurrency value (SEG_FRAME_DECODE_CONCURRENCY = 16) into
createFromDicomSegImageId rather than relying on the adapter default, so the
SEG frame fetch/decode parallelism is set at the call site and is ready to
become configurable.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* docs(behaviours): add behaviours section + multiframe Part 10 prefetch proposal
Start a "Behaviours" docs section for documenting how the system and UI behave
end-to-end (observed behaviours, design proposals, and failure modes), with an
index README and a Docusaurus category.
First entry is the proposal for loading a multiframe SEG as a single Part 10
instance: prefetch the whole instance (gated by loadMultiframeAsPart10RaceTimeMs),
parse it with dcmjs (handling multipart/related vs raw DICOM), and register the
per-frame compressed pixels into the Cornerstone3D core image cache (the single
uniform frame registry) so the per-frame load path is served locally while the
standard decode path is unchanged. Best-effort: falls back to per-frame fetches
on any failure.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Pre-cache the image data using a full part10 file for performance
* Add customizations to specify type of segmentation save
* Add clearcache of the cacheData
* Bump @cornerstonejs/* pins 5.1.3 -> 5.4.10 to match libs/@cornerstonejs base
libs/@cornerstonejs (fix/use-imageLoader-for-seg) is based on the released
cs3d 5.4.10 (merge-base with origin/main is the 5.4.10 version bump), so pin
OHIF to that release. The local branch changes still reach the app via the
cs3d:link symlinks; these pins keep the lockfile/npm fallback aligned.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Fix seg OOM
* fix: file meta garbage element, bogus NumberOfFrames, unguarded source-map-loader
- dicomWriter: drop the naturalized meta.TransferSyntaxUID assignment that
dcmjs wrote as a garbage (0000,0000) element into every saved file's meta
group (download / clipboard / local wadouri blob / local store); keep the
hex 00020010 assignment, which is required for string-form _meta fallbacks.
- registerNaturalizedDatasetForLocalWadouri: keep the computed frame count
local so single-frame IODs (SR, RTSTRUCT) no longer gain a bogus
NumberOfFrames element in their serialized form.
- rsbuild.config: resolve source-map-loader opportunistically (it is not a
project dependency; the rule only serves the gitignored cs3d-link
workflow) so fresh clones no longer crash at config load.
- Regression tests for both writer fixes (mutation-checked).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* PR review comment fixes
* Update versions
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: diattamo <mmddiatta@gmail.com>
Co-authored-by: ohif-bot <danny.ri.brown+ohif-bot@gmail.com>
Co-authored-by: Joe Boccanfuso <109477394+jbocce@users.noreply.github.com>
* Add customization URL parameter
* fix: Preserve should be customizeable
* Update customizations docs
* fix: Overlay items on patient name
* Add customization test
* Fix resolve to absolute path
* fix: Warn on no data in load
* Remove unused customization stuff
* fix: PR comments
* Update stored parameters to only use an array for mulitples
* Remove requires ohif.* special call out
* Remove strict mode
* PR comments
* Document segmentation examples
* Add three examples as requested
* PR comments
* lock
* Remove old customizatoin export
* fix: Ordering issues on customization loads
* fix: Use correct default for dev builds app config
* Fixes for conflicts
* chore: restore pnpm-lock.yaml to match master
The lockfile diff was incidental peer-descriptor churn and carried no
functional dependency change. It tripped the CircleCI security-audit gate
(which only runs when pnpm-lock.yaml is in the PR diff), surfacing a
pre-existing critical `decompress` transitive vuln that also exists on
master. Restoring master's lockfile removes the audit trigger.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(ci): restore json5 lockfile entry; ignore unfixable decompress GHSA
The previous commit restored pnpm-lock.yaml from master, which dropped the
json5@2.2.3 entry that platform/core legitimately depends on (JSONC parsing
for the customization feature). That broke `--frozen-lockfile` install
(ERR_PNPM_OUTDATED_LOCKFILE). This restores the correct lockfile.
Because the lockfile must change (json5), the CircleCI security-audit gate
runs and previously failed on a critical `decompress` <=4.2.1 zip-slip
advisory. This is a pre-existing transitive vuln (present on master too) with
no published patch — decompress's latest release is 4.2.1, so no version
bump/override can resolve it. It reaches the tree only via @itk-wasm/dam, a
build/data-asset extraction tool under @cornerstonejs/labelmap-interpolation.
Add GHSA-mp2f-45pm-3cg9 to the existing pnpm-workspace.yaml auditConfig
ignoreGhsas accepted-risk list, matching how the repo already exempts other
build-tooling advisories. `pnpm audit --audit-level high` now passes locally
(1 critical ignored, 0 high).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* test(e2e): fix visitStudy URL encoding that broke mpr2 study load
The visitStudy rewrite (added for the ?customization= option) built the URL
with new URLSearchParams({ StudyInstanceUIDs: studyInstanceUID }), which
percent-encodes the value. mpr2.spec.ts embeds an extra param in the UID
string ('<uid>&hangingprotocolid=mpr'), so the & and = were encoded and the
whole thing collapsed into one invalid StudyInstanceUIDs value -> the study
could not be found ('studies are not available'), the viewer never rendered,
and the side-panel-header-right click timed out.
Restore master's raw concatenation for StudyInstanceUIDs (so embedded params
survive as separate query params) while still appending the customization
option separately. Only mpr2 embeds & in the UID, matching the single failure.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* PR comments
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Fix: Segmentation "Hide All" fails when switching from 2D to 3D four-up viewport
* Update based on the review comment on segmentation load in 3d fourup
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
* fix: simplify the conditional logic
* fix: playwright test
* fix: playwright test
* fix: render timeout in test
---------
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Belbin-GK <150322972+Belbin-GK@users.noreply.github.com>
Co-authored-by: Devu Jayalekshmi <devu.jayalekshmi@trenser.com>
Co-authored-by: Bill Wallace <wayfarer3130@gmail.com>
* chore(tests): Update multiple screenshot test images for various specs
* feat(screenshot-reviewer): Add screenshot review tool and update package.json scripts
* fix(DICOMSRDisplayTool): Improve actor presence check in viewport
* chore(tests): Update multiple screenshot assets for various specs
* chore(tests): Integrate waitForPaintToSettle and waitForViewportsRendered in multiple specs for improved rendering stability
* chore(tests): Update screenshot assets for SEGHydration and SEGNoHydration specs
* test: update progressive loading screenshots
* jest 30 test fixes for compatibility with pnpm cs3d
* Use correct setDisplaySets instead of setDataId
* fix: Naming change for LegacyVolumeViewport3D
* Update to allow tolerance for contour tests
* update
* fix
* refactor: Replace instanceof checks with utility functions for viewport type validation
* fix: Update createSegmentationForViewport to handle undefined displaySetInstanceUID gracefully
* bun lock
* fix: Install cs3d with pnpm instead of bun
* Update node version for playwright
* Update to v5.0.0 of cs3d
* fix: Build dependency
* audit
* Change to a web await retry assert
* Fix timing related test failures
* fix: Freehand close
---------
Co-authored-by: Bill Wallace <wayfarer3130@gmail.com>
* Update to use beta 5.0
* fix: unit tests
* fix: Allow slow server/test rendering to still work
* Update tests to use viewport grid compare
* Fix storage of stale retries actual/diff files
* cs3d linking fixees
* Linking for cs3d metadata
* Use metadata import for suv scaling
* Fix suv import
* Use type for import
* fix: Metadata registration ordering
* Use beta for upstream
* Merge from origin/master
* Revert tests to master
* Undo beta version changes
* Revert bun.lock file to that of master.
* Reduce test failure retries to one per test. Cap the number of failed total tests to 10. Replace the JSON reporter with the HTML reporter.
* Add generic provider back in
* Deprecate OHIF versions of cs3d utils
* fix
* Undo some cs3d beta dependencies so this PR could be merged
* Build fix
* Fixing build issues
* build issue
* bun lock
* Temporary cache clear to resolve build issue
* Cache bust
* Remove the babel hoist fix attempt
* Cache netlify toml issue
* Fix netlify cache issue
* Try to fix cache dependency issue
* Try update resolutions
* babel hoist fix
* fix: Remove netlify cache bust
* Revert pinned versions
* PR comments on duplicated suv-factors
* Undo lock changes and isEqual add
---------
Co-authored-by: Joe Boccanfuso <joe.boccanfuso@radicalimaging.com>
Co-authored-by: Alireza <ar.sedghi@gmail.com>
* fix: Use newer ONNX version and load without errors
* Only changes to enable SAM again
* fix(seg hydration): auto-hydrate RT struct on second load with disableConfirmationPrompts (#5875)
* chore(version): Update package versions to 3.13.0-beta.34 [skip ci]
* fix(Threshold tool): Threshold tool no longer becomes deselected when the Dynamic option is selected (#5884)
fix(Threshold tool): Added 'ThresholdCircularBrushDynamic' to the toolNames array so the evaluator correctly recognizes it as an active state for the Threshold button when Dynamic mode is selected.
* chore(version): Update package versions to 3.13.0-beta.35 [skip ci]
* fix: Modalities in study list should select starts with as primary (#5886)
* chore(version): Update package versions to 3.13.0-beta.36 [skip ci]
* fix(security): Bump tar version to address CVE-2026-31802. (#5893)
* chore(version): Update package versions to 3.13.0-beta.37 [skip ci]
* fix(segmentation): Display "No description S:{series number} {modality}" for segmentations with no label. (#5874)
* Bump CS3D dependency to get the fallbackLabel field additions.
* chore(version): Update package versions to 3.13.0-beta.38 [skip ci]
* fix(window level): The window level value is not displayed by default on all the viewports when selecting common/custom layout and TMTV. (#5865)
* fix(window level): Set up listener for viewport availability such that the initial window level can be read and displayed.
* PR feedback.
* PR feedback.
---------
Co-authored-by: Bill Wallace <wayfarer3130@gmail.com>
* chore(version): Update package versions to 3.13.0-beta.39 [skip ci]
* fix(security): Bump flattened version to address CVE-2026-32141. (#5897)
* chore(version): Update package versions to 3.13.0-beta.40 [skip ci]
* fix(sr-hydration): enable hydration and arrow navigation for 3D SR measurements (#5887)
Joe is away, so approving based on the code having the requested change, and otherwise looking good/passing tests.
* fix(sr-hydration): enable hydration and arrows navigation for 3D SR measurements
* test: add automated test for SR measurement navigation with arrows after hydration
* add cross-study warning in the 3D branch
* test: address reviewer feedback for the test
* fix: support 3D and 2D annotations for SR hydration
* test: improve navigation to first image
---------
Co-authored-by: Bill Wallace <wayfarer3130@gmail.com>
* chore(version): Update package versions to 3.13.0-beta.41 [skip ci]
* feat: Add combined build (#5895)
* Add combined build
* Link script location update
* Security and validation fixes
* Allow specifying target path in PR description
* fix: Version match
* Fix build detection issue
* fix: Playwright deploy
* Separate out the branch merge guard
* Update docs and link info
* test: Update the layout change to wait for network idle
* Move audit late so the rest of the build can be worked on
* Add text with network check to ensure we see this change is updated
* Attempt to fix the mpr loading on ohif-downstream
* PR review comments
* Update docs
* Update to CS3D 4.20.0
* PR comments
* Add log on ohif-integration builds
* Update build test
* Removed unused space to kickoff build
* chore(version): Update package versions to 3.13.0-beta.42 [skip ci]
* fix(SR): Added support for spline and live wire SR items. (#5870)
* fix(SR): Added support for spline and live wire SR items.
* Apply suggestion from @greptile-apps[bot]
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
* Add a script to checkout a worktree for test builds
* fix: Allow download for testing sr validator
* Remove script that wasn't intended to be included
* Bump CS3D version.
* PR comments - simplify code and use single codepath for download
* Allow both download and save buttons for SEG and RTSTRUCT
---------
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Bill Wallace <wayfarer3130@gmail.com>
* chore(version): Update package versions to 3.13.0-beta.43 [skip ci]
* chore(tests): contour segment interactions e2e tests - rename and togglevisibility (#5891)
* chore(version): Update package versions to 3.13.0-beta.44 [skip ci]
* chore(refactor): use public appConfig getter instead of private _appConfig field (#5923)
* chore(version): Update package versions to 3.13.0-beta.45 [skip ci]
* refactor(tests): update viewport page object usage to async and update all effected tests (#5927)
* chore(version): Update package versions to 3.13.0-beta.46 [skip ci]
* fix: prevent black viewport when navigating series with client-created segmentation (#5919)
* chore(version): Update package versions to 3.13.0-beta.47 [skip ci]
* fix(measurement): Restore viewport interactivity when deleting in-progress Spline or Livewire measurement (#5905)
* chore(version): Update package versions to 3.13.0-beta.48 [skip ci]
* fix(segmentation): restrict overlay segmentation menu to same frame of reference as viewport background display set (#5900)
- Add FrameOfReferenceUID to SEG and RTSTRUCT displaySet in SOP Class Handlers so the FOR is available for filtering
- Sync optimisticOverlayDisplaySets when background display set changes so the overlay menu reflects the correct state after a background switch
- Add FOR matching guard to the hydrate segmentation synchronizer to prevent the hydration synchronizer from blindly mirroring segmentations from a source viewport to a target viewport if their primary Frames of Reference do not align.
- fix segmentation overlay order reversal on viewport re-render
* chore(version): Update package versions to 3.13.0-beta.49 [skip ci]
* fix(security): update dependencies to fix security vulnerabilities (#5936)
* chore(version): Update package versions to 3.13.0-beta.50 [skip ci]
* fix(security): Update yarn.lock that was missed in PR #5936. (#5940)
* chore(version): Update package versions to 3.13.0-beta.51 [skip ci]
* feat(component): Adds SmartScrollbar to ui-next - OHIF-2558 (#5924)
Co-authored-by: Joe Boccanfuso <joe.boccanfuso@radicalimaging.com>
* fix(defaultRouteInit): pass sorted display sets to hanging protocol for deterministic viewport order (#5933)
fix: pass sorted display sets to hanging protocol for deterministic viewport order
The `applyHangingProtocol` function already sorts display sets by modality
priority and series number into `sortedDisplaySets`, but the unsorted
`displaySets` array was being passed to `hangingProtocolService.run()`.
This caused non-deterministic viewport ordering across page loads because
`displaySetService.getActiveDisplaySets()` returns display sets in creation
order, which depends on asynchronous network responses.
Made-with: Cursor
* chore(version): Update package versions to 3.13.0-beta.52 [skip ci]
* revert: rename DisplaySet.frameOfReferenceUID back to FrameOfReferenceUID (#5943)
* chore(version): Update package versions to 3.13.0-beta.53 [skip ci]
* fix(cornerstone): read FrameOfReferenceUID from display set in viewport service (#5950)
* chore(version): Update package versions to 3.13.0-beta.54 [skip ci]
* fix: ignore auth in git (#5955)
* chore(version): Update package versions to 3.13.0-beta.55 [skip ci]
* ONNX latest version
* chore(version): Update package versions to 3.13.0-beta.56 [skip ci]
* bun lock
* fix high sev mathjs issue
* Revert onnx changes
* Update to recent CS3D version
* Undo unneeded change
* Add null check
* Undo unneeded change
---------
Co-authored-by: Ghadeer Albattarni <165973963+GhadeerAlbattarni@users.noreply.github.com>
Co-authored-by: ohif-bot <danny.ri.brown+ohif-bot@gmail.com>
Co-authored-by: Joe Boccanfuso <109477394+jbocce@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: diattamo <mmddiatta@gmail.com>
Co-authored-by: Pedro Köhler <pedrokohlerbh@gmail.com>
Co-authored-by: Dan Rukas <dan.rukas@gmail.com>
Co-authored-by: Joe Boccanfuso <joe.boccanfuso@radicalimaging.com>
Co-authored-by: Alireza <ar.sedghi@gmail.com>
- Add FrameOfReferenceUID to SEG and RTSTRUCT displaySet in SOP Class Handlers so the FOR is available for filtering
- Sync optimisticOverlayDisplaySets when background display set changes so the overlay menu reflects the correct state after a background switch
- Add FOR matching guard to the hydrate segmentation synchronizer to prevent the hydration synchronizer from blindly mirroring segmentations from a source viewport to a target viewport if their primary Frames of Reference do not align.
- fix segmentation overlay order reversal on viewport re-render
* fix(SR): Added support for spline and live wire SR items.
* Apply suggestion from @greptile-apps[bot]
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
* Add a script to checkout a worktree for test builds
* fix: Allow download for testing sr validator
* Remove script that wasn't intended to be included
* Bump CS3D version.
* PR comments - simplify code and use single codepath for download
* Allow both download and save buttons for SEG and RTSTRUCT
---------
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Bill Wallace <wayfarer3130@gmail.com>
* fix(window level): Set up listener for viewport availability such that the initial window level can be read and displayed.
* PR feedback.
* PR feedback.
---------
Co-authored-by: Bill Wallace <wayfarer3130@gmail.com>
* feat(ecg): add DICOM ECG waveform extension
Introduce @ohif/extension-dicom-ecg for rendering DICOM waveform (ECG)
data. Register the extension in the basic mode and pluginConfig.json,
and remove ECG from NON_IMAGE_MODALITIES so waveform display sets are
handled by the new viewport.
* refactor(ecg): move ECG support into cornerstone extension per review feedback
- Remove standalone dicom-ecg extension; fold all ECG functionality into
the cornerstone extension as requested by reviewer
- Add ECG SOP class handler (DicomEcgSopClassHandler) to the cornerstone
extension getSopClassHandlerModule, registering ECG waveform metadata
via genericMetadataProvider on display set creation
- Move ECG helpers (buildEcgModule, decodeInt16Multiplex, base64ToArrayBuffer)
into extensions/cornerstone/src/utils/ecgMetadata.ts
- Handle ECGViewport in CornerstoneViewportService._setDisplaySets by
detecting ECGViewport instanceof and calling setEcg(imageId) directly,
so OHIFCornerstoneViewport can be used without a custom ECG viewport component
- Add ECG support to getCornerstoneViewportType utility
- Update basic mode to reference the cornerstone extension's ECG SOP handler
and use the base cornerstone viewport for ECG display sets
- Migrate ecgMetadata and getCornerstoneViewportType tests
* chore: revert bun.lock to upstream origin/master
---------
Co-authored-by: Bill Wallace <wayfarer3130@gmail.com>
* fix capture not maintaining flip/rotate state
* fix capture not maintaining flip/rotate state
---------
Co-authored-by: silasshellenbarger <sdshe@Silas-Computer.localdomain>
- add segmentationExists check to getSopClassHandlerModule
- now firing SEGMENTATION_REMOVED and SEGMENTATION_REPRESENTATION_REMOVED events
- centralized segmentation removal in a listener
- when a segmentation is deleted (completely), remove it from all viewports it overlays
- when a segmentation is removed from a viewport, remove it as overlay from the viewport
---------
Co-authored-by: Joe Boccanfuso <joe.boccanfuso@radicalimaging.com>
Co-authored-by: Bill Wallace <wayfarer3130@gmail.com>
* Better handle octet stream case
* Use data source config stack options
* Use immutability helper
* Use immutability helper (update)
---------
Co-authored-by: Bill Wallace <wayfarer3130@gmail.com>
Will address a few more comments in a separate PR released after this one into 3.13
* fix(HistoryMemo): Segmentation delete wasn't remembered
* Temporary add of package.json linking
* fix: Use newer dcmjs version and delete segmentation with history cs3d
The window level menu's logic for when it is opened and closed now also runs when the AllInOneMenu triggers the open or close.
Using refs to store the latest function references in the AllInOneMenu component to avoid triggering a useEffect when the functions change.
Removed an unused element prop from the WindowLevelActionMenu component.
This was done by using an array of representation types instead of a single type for a panel.
The first element of the array is the primary type of the panel, and the rest are secondary types
that can also be displayed in the panel.
PR feedback:
- added test to check number of segments in side panel for 3D only view
- fixed jumping to segment in 3D only view
- fixed exception when adding contour segment in 3D only view