Skip to content

feat(Toolbar): add ScaleBar On/Off Toggle Button#5620

Open
archiael wants to merge 2 commits intoOHIF:masterfrom
archiael:addScaleOverlayToggleButtonAtToolBar
Open

feat(Toolbar): add ScaleBar On/Off Toggle Button#5620
archiael wants to merge 2 commits intoOHIF:masterfrom
archiael:addScaleOverlayToggleButtonAtToolBar

Conversation

@archiael
Copy link
Copy Markdown

@archiael archiael commented Dec 7, 2025

Context

image

Changes & Results

  • Add new components
    • extensions\cornerstone\src\tools\ScaleBarTool.ts
  • Update dependencies
    • extensions\cornerstone\src\initCornerstoneTools.js
    • modes\basic\src\index.tsx
    • modes\basic\src\initToolGroups.ts
    • modes\basic\src\toolbarButtons.ts
    • platform\ui-next\src\components\Icons\Icons.tsx
    • platform\ui-next\src\components\Icons\Sources\Tools.tsx

What are the effects of this change?

  • Screenshots (Before)
image
  • Screenshots (After)
image

Testing

Checklist

PR

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

Tested Environment

  • OS: Windows 11
  • Node version: 22.17.0
  • Browser: Chrome 142.0.7444.176

…entation, new UI icons, and basic mode configurations.
@netlify
Copy link
Copy Markdown

netlify Bot commented Dec 7, 2025

Deploy Preview for ohif-dev ready!

Name Link
🔨 Latest commit 783f76d
🔍 Latest deploy log https://app.netlify.com/projects/ohif-dev/deploys/693a648f23bea200082a8b76
😎 Deploy Preview https://deploy-preview-5620--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.

@@ -0,0 +1,378 @@
import { BaseTool, drawing } from '@cornerstonejs/tools';
import { metaData } from '@cornerstonejs/core';
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

can you use the tool that we already have in cornerstone
https://www.cornerstonejs.org/live-examples/scaleoverlaytool

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

can you use the tool that we already have in cornerstone cornerstonejs.org/live-examples/scaleoverlaytool

But the official scaleoverlaytool cannot be displayed normally, see cornerstonejs/cornerstone3D#2502

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.

3 participants