Skip to content

fix: Use newer ONNX version and load without errors#5854

Merged
wayfarer3130 merged 61 commits into
masterfrom
fix/sam-load
Apr 15, 2026
Merged

fix: Use newer ONNX version and load without errors#5854
wayfarer3130 merged 61 commits into
masterfrom
fix/sam-load

Conversation

@wayfarer3130
Copy link
Copy Markdown
Contributor

@wayfarer3130 wayfarer3130 commented Feb 26, 2026

Context

Fixes SAM load errors.
Also prevents auto-navigation after the bidirectional segment tool is turned on and it has navigated once.
Needs CS3D corresponding changes.

CS3D_REF: 4.21.5

Changes & Results

Testing

Checklist

PR

  • [] My Pull Request title is descriptive, accurate and follows the
    semantic-release format and guidelines.

Code

  • [] My code has been well-documented (function documentation, inline comments,
    etc.)

Public Documentation Updates

  • [] The documentation page has been updated as necessary for any public API
    additions or removals.

Tested Environment

  • [] OS:
  • [] Node version:
  • [] Browser:

Greptile Summary

This PR bumps @cornerstonejs/* packages from 4.21.2 → 4.21.5 (and OHIF packages from beta.55 → beta.58) to pick up a newer ONNX runtime that fixes SAM load errors, and makes two defensive fixes in commandsModule.ts: optional chaining on activeBidirectional?.annotationUID so a missing segment match no longer throws, and an early-return guard in jumpToMeasurement when uid is falsy to prevent unwanted auto-navigation.

Confidence Score: 5/5

Safe to merge — changes are a straightforward dependency bump plus two small, complementary defensive fixes.

All changed files are either lock-file/package.json version alignments or tightly scoped logic fixes. Both code changes work together correctly: the optional chaining prevents a crash on undefined, and the uid guard prevents a downstream call with undefined. No new issues introduced.

No files require special attention.

Important Files Changed

Filename Overview
extensions/cornerstone/src/commandsModule.ts Two targeted fixes: optional chaining on activeBidirectional?.annotationUID prevents crash when find() returns undefined, and a uid guard in jumpToMeasurement prevents spurious navigation when no match exists.
extensions/cornerstone/package.json Bumps all @cornerstonejs/* dependencies from 4.21.2 to 4.21.5, consistent with the stated CS3D_REF: 4.21.5.
platform/app/package.json Updates @cornerstonejs/dicom-image-loader to 4.21.5; routine version alignment.
platform/core/package.json Updates @cornerstonejs/core and @cornerstonejs/dicom-image-loader to 4.21.5.
extensions/cornerstone-dicom-seg/package.json Bumps @cornerstonejs/adapters and @cornerstonejs/core to 4.21.5.
extensions/measurement-tracking/package.json Bumps peer dependency versions for @cornerstonejs/core and @cornerstonejs/tools to 4.21.5.
bun.lock Lock file updated to reflect version bumps from beta.55→beta.58 and cornerstonejs 4.21.2→4.21.5 across all workspace packages.

Reviews (12): Last reviewed commit: "Undo unneeded change" | Re-trigger Greptile

@netlify
Copy link
Copy Markdown

netlify Bot commented Feb 26, 2026

Deploy Preview for ohif-dev ready!

Name Link
🔨 Latest commit caddd9a
🔍 Latest deploy log https://app.netlify.com/projects/ohif-dev/deploys/69dfa1a6f7e94c0008abf6ae
😎 Deploy Preview https://deploy-preview-5854--ohif-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@cypress
Copy link
Copy Markdown

cypress Bot commented Feb 26, 2026

Viewers    Run #6186

Run Properties:  status check passed Passed #6186  •  git commit caddd9a9a3: Undo unneeded change
Project Viewers
Branch Review fix/sam-load
Run status status check passed Passed #6186
Run duration 02m 17s
Commit git commit caddd9a9a3: Undo unneeded change
Committer Bill Wallace
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 37
View all changes introduced in this branch ↗︎

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

10 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Comment thread extensions/cornerstone/src/commandsModule.ts Outdated
wayfarer3130 and others added 26 commits February 27, 2026 08:32
… 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.
…y}" for segmentations with no label. (#5874)

* Bump CS3D dependency to get the fallbackLabel field additions.
… 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>
…asurements (#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>
* 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
* 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>
@wayfarer3130 wayfarer3130 added the ohif-integration Causes a CS3D/OHIF integraiton build to be run label Apr 10, 2026
@wayfarer3130 wayfarer3130 requested a review from sedghi April 13, 2026 18:16
@wayfarer3130
Copy link
Copy Markdown
Contributor Author

@sedghi This PR is paired with the PR you have already approved: cornerstonejs/cornerstone3D#2637
Just making OHIF compatible wiht the newer ONNX version.

Comment thread rsbuild.config.ts Outdated
Copy link
Copy Markdown
Member

@sedghi sedghi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM see my only comment

Comment thread platform/app/.webpack/webpack.pwa.js Outdated
@wayfarer3130 wayfarer3130 requested a review from sedghi April 15, 2026 13:43
Copy link
Copy Markdown
Member

@sedghi sedghi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i still see a webpack change

Image

if that is not migration then LGTM

@wayfarer3130 wayfarer3130 merged commit cc5dc20 into master Apr 15, 2026
12 checks passed
@wayfarer3130 wayfarer3130 deleted the fix/sam-load branch April 15, 2026 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ohif-integration Causes a CS3D/OHIF integraiton build to be run

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants