Skip to content

fix(examples): use correct genericViewportDisplaySetMetadataProvider name - #2779

Merged
sedghi merged 1 commit into
mainfrom
fix/generic-viewport-showcase-metadata-provider
Jun 30, 2026
Merged

fix(examples): use correct genericViewportDisplaySetMetadataProvider name#2779
sedghi merged 1 commit into
mainfrom
fix/generic-viewport-showcase-metadata-provider

Conversation

@sedghi

@sedghi sedghi commented Jun 30, 2026

Copy link
Copy Markdown
Member

Summary

  • genericViewportShowcase called utilities.genericViewportDataSetMetadataProvider, which doesn't exist on the core utilities export (the real export is genericViewportDisplaySetMetadataProvider), causing a runtime error/no-op when the example registers display-set metadata.

Test plan

  • Rebuilt examples (build-all-examples-cli.js --build --fromRoot --packages core,tools) — compiles with no warnings (previously emitted ESModulesLinkingWarning for this export).
  • Served .static-examples locally and loaded genericViewportShowcase.html.

Summary by CodeRabbit

  • Bug Fixes
    • Updated the generic viewport showcase example to use the newer display-set metadata approach.
    • Improved how acquisition, MPR, and 3D volume items are registered so the example renders more consistently.

…name

genericViewportShowcase called utilities.genericViewportDataSetMetadataProvider,
which doesn't exist on the core utilities export and throws at runtime.
@sedghi
sedghi merged commit 3230e28 into main Jun 30, 2026
10 of 12 checks passed
@sedghi
sedghi deleted the fix/generic-viewport-showcase-metadata-provider branch June 30, 2026 18:32
@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 56859c24-5b11-4390-a991-62237e3b3ebb

📥 Commits

Reviewing files that changed from the base of the PR and between 6fc0256 and bee5344.

📒 Files selected for processing (1)
  • packages/tools/examples/genericViewportShowcase/index.ts

📝 Walkthrough

Walkthrough

Switches metadata registration in the genericViewportShowcase example from genericViewportDataSetMetadataProvider to genericViewportDisplaySetMetadataProvider and adds kind: 'planar' to the acquisition and MPR display set registrations.

Changes

Generic Viewport Showcase Metadata Provider Update

Layer / File(s) Summary
Provider and kind field update
packages/tools/examples/genericViewportShowcase/index.ts
Replaces genericViewportDataSetMetadataProvider with genericViewportDisplaySetMetadataProvider for all three registrations and adds kind: 'planar' to acqDataId and mprDataId metadata objects.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐇 A tiny swap, a kind declared,
The planar viewport now prepared.
From dataSet to displaySet we hop,
Three lines changed — then we stop.
Small patch, big leaps, the rabbit's done! 🥕

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/generic-viewport-showcase-metadata-provider

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant