fix(i18n): Add and update i18n Translation for Toolbar Tool Names (#5392)

This commit is contained in:
毛知劲 | LIS/PACS/RIS 产品负责人 authored and GitHub committed 2025-09-25 10:22:02 -04:00
1 parent add69e5e4f
commit 7783d0f558
51 files changed
+1058 -558

No files matched your search

+27 -26
View File
@@ -1,4 +1,5 @@
import type { Button } from '@ohif/core/types';
import i18n from 'i18next';
export const setToolActiveToolbar = {
commandName: 'setToolActive',
@@ -31,8 +32,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-length',
label: 'Length',
tooltip: 'Length Tool',
label: i18n.t('Buttons:Length'),
tooltip: i18n.t('Buttons:Length Tool'),
commands: {
...setToolActiveToolbar,
commandOptions: {
@@ -48,8 +49,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-bidirectional',
label: 'Bidirectional',
tooltip: 'Bidirectional Tool',
label: i18n.t('Buttons:Bidirectional'),
tooltip: i18n.t('Buttons:Bidirectional Tool'),
commands: {
...setToolActiveToolbar,
commandOptions: {
@@ -65,8 +66,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-ellipse',
label: 'Ellipse',
tooltip: 'Ellipse ROI',
label: i18n.t('Buttons:Ellipse'),
tooltip: i18n.t('Buttons:Ellipse ROI'),
commands: {
...setToolActiveToolbar,
commandOptions: {
@@ -82,8 +83,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-circle',
label: 'Circle',
tooltip: 'Circle Tool',
label: i18n.t('Buttons:Circle'),
tooltip: i18n.t('Buttons:Circle Tool'),
commands: {
...setToolActiveToolbar,
commandOptions: {
@@ -99,8 +100,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-zoom',
label: 'Zoom',
tooltip: 'Zoom',
label: i18n.t('Buttons:Zoom'),
tooltip: i18n.t('Buttons:Zoom'),
commands: {
...setToolActiveToolbar,
commandOptions: {
@@ -116,8 +117,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-move',
label: 'Pan',
tooltip: 'Pan',
label: i18n.t('Buttons:Pan'),
tooltip: i18n.t('Buttons:Pan'),
commands: {
...setToolActiveToolbar,
commandOptions: {
@@ -133,8 +134,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-capture',
label: 'Capture',
tooltip: 'Capture',
label: i18n.t('Buttons:Capture'),
tooltip: i18n.t('Buttons:Capture'),
commands: 'showDownloadViewportModal',
evaluate: [
'evaluate.action',
@@ -161,8 +162,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-reset',
label: 'Reset View',
tooltip: 'Reset View',
label: i18n.t('Buttons:Reset View'),
tooltip: i18n.t('Buttons:Reset View'),
commands: 'resetViewport',
evaluate: 'evaluate.action',
},
@@ -172,8 +173,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-rotate-right',
label: 'Rotate Right',
tooltip: 'Rotate Right +90',
label: i18n.t('Buttons:Rotate Right'),
tooltip: i18n.t('Buttons:Rotate Right +90'),
commands: 'rotateViewportCW',
evaluate: 'evaluate.action',
},
@@ -183,8 +184,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-flip-horizontal',
label: 'Flip Horizontally',
tooltip: 'Flip Horizontally',
label: i18n.t('Buttons:Flip Horizontally'),
tooltip: i18n.t('Buttons:Flip Horizontally'),
commands: 'flipViewportHorizontal',
evaluate: 'evaluate.action',
},
@@ -194,8 +195,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-stack-scroll',
label: 'Stack Scroll',
tooltip: 'Stack Scroll',
label: i18n.t('Buttons:Stack Scroll'),
tooltip: i18n.t('Buttons:Stack Scroll'),
commands: {
...setToolActiveToolbar,
commandOptions: {
@@ -211,8 +212,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-invert',
label: 'Invert Colors',
tooltip: 'Invert Colors',
label: i18n.t('Buttons:Invert Colors'),
tooltip: i18n.t('Buttons:Invert Colors'),
commands: 'invertViewport',
evaluate: 'evaluate.action',
},
@@ -222,8 +223,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-calibration',
label: 'Calibration Line',
tooltip: 'Calibration Line',
label: i18n.t('Buttons:Calibration Line'),
tooltip: i18n.t('Buttons:Calibration Line'),
commands: {
...setToolActiveToolbar,
commandOptions: {
+93 -87
View File
@@ -5,6 +5,8 @@ import { EVENTS } from '@cornerstonejs/core';
import { ViewportGridService } from '@ohif/core';
import { defaults } from '@ohif/core';
import i18n from 'i18next';
const { windowLevelPresets } = defaults;
/**
@@ -79,8 +81,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.modalityLoadBadge',
props: {
icon: 'Status',
label: 'Status',
tooltip: 'Status',
label: i18n.t('Buttons:Status'),
tooltip: i18n.t('Buttons:Status'),
evaluate: {
name: 'evaluate.modalityLoadBadge',
hideWhenDisabled: true,
@@ -92,8 +94,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.navigationComponent',
props: {
icon: 'Navigation',
label: 'Navigation',
tooltip: 'Navigate between segments/measurements and manage their visibility',
label: i18n.t('Buttons:Navigation'),
tooltip: i18n.t('Buttons:Navigate between segments/measurements and manage their visibility'),
evaluate: {
name: 'evaluate.navigationComponent',
hideWhenDisabled: true,
@@ -105,8 +107,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.trackingStatus',
props: {
icon: 'TrackingStatus',
label: 'Tracking Status',
tooltip: 'View and manage tracking status of measurements and annotations',
label: i18n.t('Buttons:Tracking Status'),
tooltip: i18n.t('Buttons:View and manage tracking status of measurements and annotations'),
evaluate: {
name: 'evaluate.trackingStatus',
hideWhenDisabled: true,
@@ -118,8 +120,10 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.dataOverlayMenu',
props: {
icon: 'ViewportViews',
label: 'Data Overlay',
tooltip: 'Configure data overlay options and manage foreground/background display sets',
label: i18n.t('Buttons:Data Overlay'),
tooltip: i18n.t(
'Buttons:Configure data overlay options and manage foreground/background display sets'
),
evaluate: 'evaluate.dataOverlayMenu',
},
},
@@ -128,8 +132,10 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.orientationMenu',
props: {
icon: 'OrientationSwitch',
label: 'Orientation',
tooltip: 'Change viewport orientation between axial, sagittal, coronal and reformat planes',
label: i18n.t('Buttons:Orientation'),
tooltip: i18n.t(
'Buttons:Change viewport orientation between axial, sagittal, coronal and reformat planes'
),
evaluate: {
name: 'evaluate.orientationMenu',
},
@@ -140,8 +146,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.windowLevelMenu',
props: {
icon: 'WindowLevel',
label: 'Window Level',
tooltip: 'Adjust window/level presets and customize image contrast settings',
label: i18n.t('Buttons:Window Level'),
tooltip: i18n.t('Buttons:Adjust window/level presets and customize image contrast settings'),
evaluate: 'evaluate.windowLevelMenu',
},
},
@@ -150,8 +156,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.voiManualControlMenu',
props: {
icon: 'WindowLevelAdvanced',
label: 'Advanced Window Level',
tooltip: 'Advanced window/level settings with manual controls and presets',
label: i18n.t('Buttons:Advanced Window Level'),
tooltip: i18n.t('Buttons:Advanced window/level settings with manual controls and presets'),
evaluate: 'evaluate.voiManualControlMenu',
},
},
@@ -160,8 +166,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.thresholdMenu',
props: {
icon: 'Threshold',
label: 'Threshold',
tooltip: 'Image threshold settings',
label: i18n.t('Buttons:Threshold'),
tooltip: i18n.t('Buttons:Image threshold settings'),
evaluate: {
name: 'evaluate.thresholdMenu',
hideWhenDisabled: true,
@@ -173,8 +179,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.opacityMenu',
props: {
icon: 'Opacity',
label: 'Opacity',
tooltip: 'Image opacity settings',
label: i18n.t('Buttons:Opacity'),
tooltip: i18n.t('Buttons:Image opacity settings'),
evaluate: {
name: 'evaluate.opacityMenu',
hideWhenDisabled: true,
@@ -186,7 +192,7 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.colorbar',
props: {
type: 'tool',
label: 'Colorbar',
label: i18n.t('Buttons:Colorbar'),
},
},
_createWwwcPreset(1, 'Soft tissue', '400 / 40'),
@@ -199,8 +205,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-window-level',
label: 'Window Level',
tooltip: 'Window Level',
label: i18n.t('Buttons:Window Level'),
tooltip: i18n.t('Buttons:Window Level'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -210,8 +216,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-length',
label: 'Length',
tooltip: 'Length Tool',
label: i18n.t('Buttons:Length'),
tooltip: i18n.t('Buttons:Length Tool'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -221,8 +227,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-bidirectional',
label: 'Bidirectional',
tooltip: 'Bidirectional Tool',
label: i18n.t('Buttons:Bidirectional'),
tooltip: i18n.t('Buttons:Bidirectional Tool'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -232,8 +238,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-annotate',
label: 'Annotation',
tooltip: 'Arrow Annotate',
label: i18n.t('Buttons:Annotation'),
tooltip: i18n.t('Buttons:Arrow Annotate'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -243,8 +249,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-ellipse',
label: 'Ellipse',
tooltip: 'Ellipse ROI',
label: i18n.t('Buttons:Ellipse'),
tooltip: i18n.t('Buttons:Ellipse ROI'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -254,8 +260,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-circle',
label: 'Circle',
tooltip: 'Circle Tool',
label: i18n.t('Buttons:Circle'),
tooltip: i18n.t('Buttons:Circle Tool'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -265,8 +271,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'icon-tool-freehand-roi',
label: 'Freehand ROI',
tooltip: 'Freehand ROI',
label: i18n.t('Buttons:Freehand ROI'),
tooltip: i18n.t('Buttons:Freehand ROI'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -276,8 +282,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'icon-tool-spline-roi',
label: 'Spline ROI',
tooltip: 'Spline ROI',
label: i18n.t('Buttons:Spline ROI'),
tooltip: i18n.t('Buttons:Spline ROI'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -287,8 +293,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'icon-tool-livewire',
label: 'Livewire tool',
tooltip: 'Livewire tool',
label: i18n.t('Buttons:Livewire tool'),
tooltip: i18n.t('Buttons:Livewire tool'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -298,8 +304,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-zoom',
label: 'Zoom',
tooltip: 'Zoom',
label: i18n.t('Buttons:Zoom'),
tooltip: i18n.t('Buttons:Zoom'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -310,8 +316,8 @@ const toolbarButtons: Button[] = [
props: {
type: 'tool',
icon: 'tool-move',
label: 'Pan',
tooltip: 'Pan',
label: i18n.t('Buttons:Pan'),
tooltip: i18n.t('Buttons:Pan'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -321,8 +327,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'icon-mpr',
label: 'MPR',
tooltip: 'MPR',
label: i18n.t('Buttons:MPR'),
tooltip: i18n.t('Buttons:MPR'),
commands: {
commandName: 'toggleHangingProtocol',
commandOptions: {
@@ -338,8 +344,8 @@ const toolbarButtons: Button[] = [
props: {
type: 'tool',
icon: 'tool-3d-rotate',
label: '3D Rotate',
tooltip: '3D Rotate',
label: i18n.t('Buttons:3D Rotate'),
tooltip: i18n.t('Buttons:3D Rotate'),
commands: setToolActiveToolbar,
},
},
@@ -348,8 +354,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-capture',
label: 'Capture',
tooltip: 'Capture',
label: i18n.t('Buttons:Capture'),
tooltip: i18n.t('Buttons:Capture'),
commands: 'showDownloadViewportModal',
evaluate: [
'evaluate.action',
@@ -376,8 +382,8 @@ const toolbarButtons: Button[] = [
props: {
type: 'tool',
icon: 'tool-crosshair',
label: 'Crosshairs',
tooltip: 'Crosshairs',
label: i18n.t('Buttons:Crosshairs'),
tooltip: i18n.t('Buttons:Crosshairs'),
commands: {
commandName: 'setToolActiveToolbar',
commandOptions: {
@@ -393,8 +399,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-reset',
label: 'Reset View',
tooltip: 'Reset View',
label: i18n.t('Buttons:Reset View'),
tooltip: i18n.t('Buttons:Reset View'),
commands: 'resetViewport',
evaluate: 'evaluate.action',
},
@@ -404,8 +410,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-rotate-right',
label: 'Rotate Right',
tooltip: 'Rotate +90',
label: i18n.t('Buttons:Rotate Right'),
tooltip: i18n.t('Buttons:Rotate +90'),
commands: 'rotateViewportCW',
evaluate: 'evaluate.action',
},
@@ -415,8 +421,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-flip-horizontal',
label: 'Flip Horizontal',
tooltip: 'Flip Horizontally',
label: i18n.t('Buttons:Flip Horizontal'),
tooltip: i18n.t('Buttons:Flip Horizontally'),
commands: 'flipViewportHorizontal',
evaluate: 'evaluate.viewportProperties.toggle',
},
@@ -426,8 +432,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'link',
label: 'Image Slice Sync',
tooltip: 'Enable position synchronization on stack viewports',
label: i18n.t('Buttons:Image Slice Sync'),
tooltip: i18n.t('Buttons:Enable position synchronization on stack viewports'),
commands: {
commandName: 'toggleSynchronizer',
commandOptions: {
@@ -448,8 +454,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-referenceLines',
label: 'Reference Lines',
tooltip: 'Show Reference Lines',
label: i18n.t('Buttons:Reference Lines'),
tooltip: i18n.t('Buttons:Show Reference Lines'),
commands: 'toggleEnabledDisabledToolbar',
evaluate: 'evaluate.cornerstoneTool.toggle',
},
@@ -459,8 +465,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'toggle-dicom-overlay',
label: 'Image Overlay',
tooltip: 'Toggle Image Overlay',
label: i18n.t('Buttons:Image Overlay'),
tooltip: i18n.t('Buttons:Toggle Image Overlay'),
commands: 'toggleEnabledDisabledToolbar',
evaluate: 'evaluate.cornerstoneTool.toggle',
},
@@ -470,8 +476,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-stack-scroll',
label: 'Stack Scroll',
tooltip: 'Stack Scroll',
label: i18n.t('Buttons:Stack Scroll'),
tooltip: i18n.t('Buttons:Stack Scroll'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -481,8 +487,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-invert',
label: 'Invert',
tooltip: 'Invert Colors',
label: i18n.t('Buttons:Invert'),
tooltip: i18n.t('Buttons:Invert Colors'),
commands: 'invertViewport',
evaluate: 'evaluate.viewportProperties.toggle',
},
@@ -492,8 +498,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-probe',
label: 'Probe',
tooltip: 'Probe',
label: i18n.t('Buttons:Probe'),
tooltip: i18n.t('Buttons:Probe'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -503,8 +509,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-cine',
label: 'Cine',
tooltip: 'Cine',
label: i18n.t('Buttons:Cine'),
tooltip: i18n.t('Buttons:Cine'),
commands: 'toggleCine',
evaluate: 'evaluate.cine',
},
@@ -514,8 +520,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-angle',
label: 'Angle',
tooltip: 'Angle',
label: i18n.t('Buttons:Angle'),
tooltip: i18n.t('Buttons:Angle'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -525,8 +531,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'icon-tool-cobb-angle',
label: 'Cobb Angle',
tooltip: 'Cobb Angle',
label: i18n.t('Buttons:Cobb Angle'),
tooltip: i18n.t('Buttons:Cobb Angle'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -536,8 +542,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-magnify',
label: 'Zoom-in',
tooltip: 'Zoom-in',
label: i18n.t('Buttons:Zoom-in'),
tooltip: i18n.t('Buttons:Zoom-in'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -547,8 +553,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-rectangle',
label: 'Rectangle',
tooltip: 'Rectangle',
label: i18n.t('Buttons:Rectangle'),
tooltip: i18n.t('Buttons:Rectangle'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -558,8 +564,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-calibration',
label: 'Calibration',
tooltip: 'Calibration Line',
label: i18n.t('Buttons:Calibration'),
tooltip: i18n.t('Buttons:Calibration Line'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -569,8 +575,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'dicom-tag-browser',
label: 'Dicom Tag Browser',
tooltip: 'Dicom Tag Browser',
label: i18n.t('Buttons:Dicom Tag Browser'),
tooltip: i18n.t('Buttons:Dicom Tag Browser'),
commands: 'openDICOMTagViewer',
},
},
@@ -579,8 +585,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'icon-tool-loupe',
label: 'Magnify Probe',
tooltip: 'Magnify Probe',
label: i18n.t('Buttons:Magnify Probe'),
tooltip: i18n.t('Buttons:Magnify Probe'),
commands: 'toggleActiveDisabledToolbar',
evaluate: 'evaluate.cornerstoneTool.toggle.ifStrictlyDisabled',
},
@@ -590,8 +596,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'icon-tool-ultrasound-bidirectional',
label: 'Ultrasound Directional',
tooltip: 'Ultrasound Directional',
label: i18n.t('Buttons:Ultrasound Directional'),
tooltip: i18n.t('Buttons:Ultrasound Directional'),
commands: setToolActiveToolbar,
evaluate: [
'evaluate.cornerstoneTool',
@@ -607,8 +613,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'icon-tool-window-region',
label: 'Window Level Region',
tooltip: 'Window Level Region',
label: i18n.t('Buttons:Window Level Region'),
tooltip: i18n.t('Buttons:Window Level Region'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
+90 -83
View File
@@ -2,6 +2,7 @@ import type { Button } from '@ohif/core/types';
import { EVENTS } from '@cornerstonejs/core';
import { ViewportGridService } from '@ohif/core';
import i18n from 'i18next';
const callbacks = (toolName: string) => [
{
@@ -48,8 +49,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.modalityLoadBadge',
props: {
icon: 'Status',
label: 'Status',
tooltip: 'Status',
label: i18n.t('Buttons:Status'),
tooltip: i18n.t('Buttons:Status'),
evaluate: {
name: 'evaluate.modalityLoadBadge',
hideWhenDisabled: true,
@@ -61,8 +62,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.navigationComponent',
props: {
icon: 'Navigation',
label: 'Navigation',
tooltip: 'Navigate between segments/measurements and manage their visibility',
label: i18n.t('Buttons:Navigation'),
tooltip: i18n.t('Buttons:Navigate between segments/measurements and manage their visibility'),
evaluate: {
name: 'evaluate.navigationComponent',
hideWhenDisabled: true,
@@ -74,8 +75,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.trackingStatus',
props: {
icon: 'TrackingStatus',
label: 'Tracking Status',
tooltip: 'View and manage tracking status of measurements and annotations',
label: i18n.t('Buttons:Tracking Status'),
tooltip: i18n.t('Buttons:View and manage tracking status of measurements and annotations'),
evaluate: {
name: 'evaluate.trackingStatus',
hideWhenDisabled: true,
@@ -87,8 +88,10 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.dataOverlayMenu',
props: {
icon: 'ViewportViews',
label: 'Data Overlay',
tooltip: 'Configure data overlay options and manage foreground/background display sets',
label: i18n.t('Buttons:Data Overlay'),
tooltip: i18n.t(
'Buttons:Configure data overlay options and manage foreground/background display sets'
),
evaluate: 'evaluate.dataOverlayMenu',
},
},
@@ -97,8 +100,10 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.orientationMenu',
props: {
icon: 'OrientationSwitch',
label: 'Orientation',
tooltip: 'Change viewport orientation between axial, sagittal, coronal and reformat planes',
label: i18n.t('Buttons:Orientation'),
tooltip: i18n.t(
'Buttons:Change viewport orientation between axial, sagittal, coronal and reformat planes'
),
evaluate: {
name: 'evaluate.orientationMenu',
// hideWhenDisabled: true,
@@ -110,8 +115,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.windowLevelMenuEmbedded',
props: {
icon: 'WindowLevel',
label: 'Window Level',
tooltip: 'Adjust window/level presets and customize image contrast settings',
label: i18n.t('Buttons:Window Level'),
tooltip: i18n.t('Buttons:Adjust window/level presets and customize image contrast settings'),
evaluate: {
name: 'evaluate.windowLevelMenuEmbedded',
hideWhenDisabled: true,
@@ -123,8 +128,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.windowLevelMenu',
props: {
icon: 'WindowLevel',
label: 'Window Level',
tooltip: 'Adjust window/level presets and customize image contrast settings',
label: i18n.t('Buttons:Window Level'),
tooltip: i18n.t('Buttons:Adjust window/level presets and customize image contrast settings'),
evaluate: {
name: 'evaluate.windowLevelMenu',
},
@@ -135,8 +140,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.voiManualControlMenu',
props: {
icon: 'WindowLevelAdvanced',
label: 'Advanced Window Level',
tooltip: 'Advanced window/level settings with manual controls and presets',
label: i18n.t('Buttons:Advanced Window Level'),
tooltip: i18n.t('Buttons:Advanced window/level settings with manual controls and presets'),
evaluate: 'evaluate.voiManualControlMenu',
},
},
@@ -145,8 +150,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.thresholdMenu',
props: {
icon: 'Threshold',
label: 'Threshold',
tooltip: 'Image threshold settings',
label: i18n.t('Buttons:Threshold'),
tooltip: i18n.t('Buttons:Image threshold settings'),
evaluate: {
name: 'evaluate.thresholdMenu',
hideWhenDisabled: true,
@@ -158,8 +163,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.opacityMenu',
props: {
icon: 'Opacity',
label: 'Opacity',
tooltip: 'Image opacity settings',
label: i18n.t('Buttons:Opacity'),
tooltip: i18n.t('Buttons:Image opacity settings'),
evaluate: {
name: 'evaluate.opacityMenu',
hideWhenDisabled: true,
@@ -171,7 +176,7 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.colorbar',
props: {
type: 'tool',
label: 'Colorbar',
label: i18n.t('Buttons:Colorbar'),
},
},
{
@@ -179,8 +184,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-reset',
label: 'Reset View',
tooltip: 'Reset View',
label: i18n.t('Buttons:Reset View'),
tooltip: i18n.t('Buttons:Reset View'),
commands: 'resetViewport',
evaluate: 'evaluate.action',
},
@@ -190,8 +195,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-rotate-right',
label: 'Rotate Right',
tooltip: 'Rotate +90',
label: i18n.t('Buttons:Rotate Right'),
tooltip: i18n.t('Buttons:Rotate +90'),
commands: 'rotateViewportCW',
evaluate: [
'evaluate.action',
@@ -207,8 +212,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-flip-horizontal',
label: 'Flip Horizontal',
tooltip: 'Flip Horizontally',
label: i18n.t('Buttons:Flip Horizontal'),
tooltip: i18n.t('Buttons:Flip Horizontally'),
commands: 'flipViewportHorizontal',
evaluate: [
'evaluate.viewportProperties.toggle',
@@ -224,8 +229,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'link',
label: 'Image Slice Sync',
tooltip: 'Enable position synchronization on stack viewports',
label: i18n.t('Buttons:Image Slice Sync'),
tooltip: i18n.t('Buttons:Enable position synchronization on stack viewports'),
commands: {
commandName: 'toggleSynchronizer',
commandOptions: {
@@ -252,8 +257,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-referenceLines',
label: 'Reference Lines',
tooltip: 'Show Reference Lines',
label: i18n.t('Buttons:Reference Lines'),
tooltip: i18n.t('Buttons:Show Reference Lines'),
commands: 'toggleEnabledDisabledToolbar',
listeners: {
[ViewportGridService.EVENTS.ACTIVE_VIEWPORT_ID_CHANGED]: callbacks('ReferenceLines'),
@@ -273,8 +278,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'toggle-dicom-overlay',
label: 'Image Overlay',
tooltip: 'Toggle Image Overlay',
label: i18n.t('Buttons:Image Overlay'),
tooltip: i18n.t('Buttons:Toggle Image Overlay'),
commands: 'toggleEnabledDisabledToolbar',
evaluate: [
'evaluate.cornerstoneTool.toggle',
@@ -290,8 +295,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-stack-scroll',
label: 'Stack Scroll',
tooltip: 'Stack Scroll',
label: i18n.t('Buttons:Stack Scroll'),
tooltip: i18n.t('Buttons:Stack Scroll'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -301,8 +306,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-invert',
label: 'Invert',
tooltip: 'Invert Colors',
label: i18n.t('Buttons:Invert'),
tooltip: i18n.t('Buttons:Invert Colors'),
commands: 'invertViewport',
evaluate: [
'evaluate.viewportProperties.toggle',
@@ -318,8 +323,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-probe',
label: 'Probe',
tooltip: 'Probe',
label: i18n.t('Buttons:Probe'),
tooltip: i18n.t('Buttons:Probe'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -329,8 +334,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-cine',
label: 'Cine',
tooltip: 'Cine',
label: i18n.t('Buttons:Cine'),
tooltip: i18n.t('Buttons:Cine'),
commands: 'toggleCine',
evaluate: [
'evaluate.cine',
@@ -346,8 +351,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-angle',
label: 'Angle',
tooltip: 'Angle',
label: i18n.t('Buttons:Angle'),
tooltip: i18n.t('Buttons:Angle'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -357,8 +362,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'icon-tool-cobb-angle',
label: 'Cobb Angle',
tooltip: 'Cobb Angle',
label: i18n.t('Buttons:Cobb Angle'),
tooltip: i18n.t('Buttons:Cobb Angle'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -368,8 +373,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-magnify',
label: 'Zoom-in',
tooltip: 'Zoom-in',
label: i18n.t('Buttons:Zoom-in'),
tooltip: i18n.t('Buttons:Zoom-in'),
commands: setToolActiveToolbar,
evaluate: [
'evaluate.cornerstoneTool',
@@ -385,8 +390,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-calibration',
label: 'Calibration',
tooltip: 'Calibration Line',
label: i18n.t('Buttons:Calibration'),
tooltip: i18n.t('Buttons:Calibration Line'),
commands: setToolActiveToolbar,
evaluate: [
'evaluate.cornerstoneTool',
@@ -402,8 +407,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'dicom-tag-browser',
label: 'Dicom Tag Browser',
tooltip: 'Dicom Tag Browser',
label: i18n.t('Buttons:Dicom Tag Browser'),
tooltip: i18n.t('Buttons:Dicom Tag Browser'),
commands: 'openDICOMTagViewer',
},
},
@@ -412,8 +417,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'icon-tool-loupe',
label: 'Magnify Probe',
tooltip: 'Magnify Probe',
label: i18n.t('Buttons:Magnify Probe'),
tooltip: i18n.t('Buttons:Magnify Probe'),
commands: 'toggleActiveDisabledToolbar',
evaluate: [
'evaluate.cornerstoneTool.toggle.ifStrictlyDisabled',
@@ -429,8 +434,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'icon-tool-ultrasound-bidirectional',
label: 'Ultrasound Directional',
tooltip: 'Ultrasound Directional',
label: i18n.t('Buttons:Ultrasound Directional'),
tooltip: i18n.t('Buttons:Ultrasound Directional'),
commands: setToolActiveToolbar,
evaluate: [
'evaluate.cornerstoneTool',
@@ -446,8 +451,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'icon-tool-window-region',
label: 'Window Level Region',
tooltip: 'Window Level Region',
label: i18n.t('Buttons:Window Level Region'),
tooltip: i18n.t('Buttons:Window Level Region'),
commands: setToolActiveToolbar,
evaluate: [
'evaluate.cornerstoneTool',
@@ -463,8 +468,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-length',
label: 'Length',
tooltip: 'Length Tool',
label: i18n.t('Buttons:Length'),
tooltip: i18n.t('Buttons:Length Tool'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -474,8 +479,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-bidirectional',
label: 'Bidirectional',
tooltip: 'Bidirectional Tool',
label: i18n.t('Buttons:Bidirectional'),
tooltip: i18n.t('Buttons:Bidirectional Tool'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -485,8 +490,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-annotate',
label: 'Annotation',
tooltip: 'Arrow Annotate',
label: i18n.t('Buttons:Annotation'),
tooltip: i18n.t('Buttons:Arrow Annotate'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -496,8 +501,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-ellipse',
label: 'Ellipse',
tooltip: 'Ellipse ROI',
label: i18n.t('Buttons:Ellipse'),
tooltip: i18n.t('Buttons:Ellipse ROI'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -507,8 +512,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-rectangle',
label: 'Rectangle',
tooltip: 'Rectangle ROI',
label: i18n.t('Buttons:Rectangle'),
tooltip: i18n.t('Buttons:Rectangle ROI'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -518,8 +523,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-circle',
label: 'Circle',
tooltip: 'Circle Tool',
label: i18n.t('Buttons:Circle'),
tooltip: i18n.t('Buttons:Circle Tool'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -529,8 +534,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'icon-tool-freehand-roi',
label: 'Freehand ROI',
tooltip: 'Freehand ROI',
label: i18n.t('Buttons:Freehand ROI'),
tooltip: i18n.t('Buttons:Freehand ROI'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -540,8 +545,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'icon-tool-spline-roi',
label: 'Spline ROI',
tooltip: 'Spline ROI',
label: i18n.t('Buttons:Spline ROI'),
tooltip: i18n.t('Buttons:Spline ROI'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -551,8 +556,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'icon-tool-livewire',
label: 'Livewire tool',
tooltip: 'Livewire tool',
label: i18n.t('Buttons:Livewire tool'),
tooltip: i18n.t('Buttons:Livewire tool'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -563,7 +568,7 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-window-level',
label: 'Window Level',
label: i18n.t('Buttons:Window Level'),
commands: setToolActiveToolbar,
evaluate: [
'evaluate.cornerstoneTool',
@@ -580,7 +585,7 @@ const toolbarButtons: Button[] = [
props: {
type: 'tool',
icon: 'tool-move',
label: 'Pan',
label: i18n.t('Buttons:Pan'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -591,7 +596,7 @@ const toolbarButtons: Button[] = [
props: {
type: 'tool',
icon: 'tool-zoom',
label: 'Zoom',
label: i18n.t('Buttons:Zoom'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -602,7 +607,7 @@ const toolbarButtons: Button[] = [
props: {
type: 'tool',
icon: 'tool-3d-rotate',
label: '3D Rotate',
label: i18n.t('Buttons:3D Rotate'),
commands: setToolActiveToolbar,
evaluate: {
name: 'evaluate.cornerstoneTool',
@@ -615,7 +620,7 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-capture',
label: 'Capture',
label: i18n.t('Buttons:Capture'),
commands: 'showDownloadViewportModal',
evaluate: [
'evaluate.action',
@@ -641,7 +646,7 @@ const toolbarButtons: Button[] = [
props: {
type: 'tool',
icon: 'tool-crosshair',
label: 'Crosshairs',
label: i18n.t('Buttons:Crosshairs'),
commands: {
commandName: 'setToolActiveToolbar',
commandOptions: {
@@ -667,8 +672,10 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolBoxButton',
props: {
icon: 'tool-segment-label',
label: 'Segment Label Display',
tooltip: 'Click to show or hide segment labels when hovering with your mouse.',
label: i18n.t('Buttons:Segment Label Display'),
tooltip: i18n.t(
'Buttons:Click to show or hide segment labels when hovering with your mouse.'
),
commands: { commandName: 'toggleSegmentLabel' },
evaluate: [
'evaluate.cornerstoneTool.toggle',
+18 -17
View File
@@ -1,4 +1,5 @@
import type { Button } from '@ohif/core/types';
import i18n from 'i18next';
export const setToolActiveToolbar = {
commandName: 'setToolActive',
@@ -21,8 +22,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-length',
label: 'Line',
tooltip: 'Line',
label: i18n.t('Buttons:Line'),
tooltip: i18n.t('Buttons:Line Tool'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.microscopyTool',
},
@@ -32,8 +33,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-point',
label: 'Point',
tooltip: 'Point Tool',
label: i18n.t('Buttons:Point'),
tooltip: i18n.t('Buttons:Point Tool'),
commands: {
...setToolActiveToolbar,
commandOptions: { toolName: 'point' },
@@ -46,8 +47,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-polygon',
label: 'Polygon',
tooltip: 'Polygon Tool',
label: i18n.t('Buttons:Polygon'),
tooltip: i18n.t('Buttons:Polygon Tool'),
commands: {
...setToolActiveToolbar,
commandOptions: { toolName: 'polygon' },
@@ -60,8 +61,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-circle',
label: 'Circle',
tooltip: 'Circle Tool',
label: i18n.t('Buttons:Circle'),
tooltip: i18n.t('Buttons:Circle Tool'),
commands: {
...setToolActiveToolbar,
commandOptions: { toolName: 'circle' },
@@ -74,8 +75,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-rectangle',
label: 'Box',
tooltip: 'Box Tool',
label: i18n.t('Buttons:Box'),
tooltip: i18n.t('Buttons:Box Tool'),
commands: {
...setToolActiveToolbar,
commandOptions: { toolName: 'box' },
@@ -88,8 +89,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-freehand-polygon',
label: 'Freehand Polygon',
tooltip: 'Freehand Polygon Tool',
label: i18n.t('Buttons:Freehand Polygon'),
tooltip: i18n.t('Buttons:Freehand Polygon Tool'),
commands: {
...setToolActiveToolbar,
commandOptions: { toolName: 'freehandpolygon' },
@@ -102,8 +103,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-freehand-line',
label: 'Freehand Line',
tooltip: 'Freehand Line Tool',
label: i18n.t('Buttons:Freehand Line'),
tooltip: i18n.t('Buttons:Freehand Line Tool'),
commands: {
...setToolActiveToolbar,
commandOptions: { toolName: 'freehandline' },
@@ -116,7 +117,7 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-move',
label: 'Pan',
label: i18n.t('Buttons:Pan'),
commands: {
...setToolActiveToolbar,
commandOptions: { toolName: 'dragPan' },
@@ -129,8 +130,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'dicom-tag-browser',
label: 'Dicom Tag Browser',
tooltip: 'Dicom Tag Browser',
label: i18n.t('Buttons:Dicom Tag Browser'),
tooltip: i18n.t('Buttons:Dicom Tag Browser'),
commands: 'openDICOMTagViewer',
evaluate: 'evaluate.action',
},
+44 -39
View File
@@ -1,5 +1,6 @@
import { toolGroupIds } from './initToolGroups';
import { ViewportGridService } from '@ohif/core';
import i18n from 'i18next';
const setToolActiveToolbar = {
commandName: 'setToolActiveToolbar',
@@ -51,8 +52,8 @@ const toolbarButtons = [
uiType: 'ohif.modalityLoadBadge',
props: {
icon: 'Status',
label: 'Status',
tooltip: 'Status',
label: i18n.t('Buttons:Status'),
tooltip: i18n.t('Buttons:Status'),
evaluate: {
name: 'evaluate.modalityLoadBadge',
hideWhenDisabled: true,
@@ -64,8 +65,8 @@ const toolbarButtons = [
uiType: 'ohif.navigationComponent',
props: {
icon: 'Navigation',
label: 'Navigation',
tooltip: 'Navigate between segments/measurements and manage their visibility',
label: i18n.t('Buttons:Navigation'),
tooltip: i18n.t('Buttons:Navigate between segments/measurements and manage their visibility'),
evaluate: {
name: 'evaluate.navigationComponent',
hideWhenDisabled: true,
@@ -77,8 +78,8 @@ const toolbarButtons = [
uiType: 'ohif.windowLevelMenuEmbedded',
props: {
icon: 'WindowLevel',
label: 'Window Level',
tooltip: 'Adjust window/level presets and customize image contrast settings',
label: i18n.t('Buttons:Window Level'),
tooltip: i18n.t('Buttons:Adjust window/level presets and customize image contrast settings'),
evaluate: {
name: 'evaluate.windowLevelMenuEmbedded',
hideWhenDisabled: true,
@@ -90,8 +91,8 @@ const toolbarButtons = [
uiType: 'ohif.trackingStatus',
props: {
icon: 'TrackingStatus',
label: 'Tracking Status',
tooltip: 'View and manage tracking status of measurements and annotations',
label: i18n.t('Buttons:Tracking Status'),
tooltip: i18n.t('Buttons:View and manage tracking status of measurements and annotations'),
evaluate: {
name: 'evaluate.trackingStatus',
hideWhenDisabled: true,
@@ -103,8 +104,8 @@ const toolbarButtons = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-length',
label: 'Length',
tooltip: 'Length Tool',
label: i18n.t('Buttons:Length'),
tooltip: i18n.t('Buttons:Length Tool'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -114,8 +115,8 @@ const toolbarButtons = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-bidirectional',
label: 'Bidirectional',
tooltip: 'Bidirectional Tool',
label: i18n.t('Buttons:Bidirectional'),
tooltip: i18n.t('Buttons:Bidirectional Tool'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -125,8 +126,8 @@ const toolbarButtons = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-annotate',
label: 'Annotation',
tooltip: 'Arrow Annotate',
label: i18n.t('Buttons:Annotation'),
tooltip: i18n.t('Buttons:Arrow Annotate'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -136,8 +137,8 @@ const toolbarButtons = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-ellipse',
label: 'Ellipse',
tooltip: 'Ellipse ROI',
label: i18n.t('Buttons:Ellipse'),
tooltip: i18n.t('Buttons:Ellipse ROI'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -147,7 +148,7 @@ const toolbarButtons = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-zoom',
label: 'Zoom',
label: i18n.t('Buttons:Zoom'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -157,7 +158,7 @@ const toolbarButtons = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-window-level',
label: 'Window Level',
label: i18n.t('Buttons:Window Level'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -168,7 +169,7 @@ const toolbarButtons = [
props: {
type: 'tool',
icon: 'tool-move',
label: 'Pan',
label: i18n.t('Buttons:Pan'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -179,7 +180,7 @@ const toolbarButtons = [
props: {
type: 'tool',
icon: 'tool-3d-rotate',
label: '3D Rotate',
label: i18n.t('Buttons:3D Rotate'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -189,7 +190,7 @@ const toolbarButtons = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-capture',
label: 'Capture',
label: i18n.t('Buttons:Capture'),
commands: 'showDownloadViewportModal',
evaluate: [
'evaluate.action',
@@ -216,7 +217,7 @@ const toolbarButtons = [
props: {
type: 'tool',
icon: 'tool-crosshair',
label: 'Crosshairs',
label: i18n.t('Buttons:Crosshairs'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -230,7 +231,7 @@ const toolbarButtons = [
uiType: 'ohif.toolBoxButton',
props: {
icon: 'tool-create-threshold',
label: 'Rectangle ROI Threshold',
label: i18n.t('Buttons:Rectangle ROI Threshold'),
commands: setToolActiveToolbar,
evaluate: {
name: 'evaluate.cornerstone.segmentation',
@@ -244,7 +245,7 @@ const toolbarButtons = [
uiType: 'ohif.toolButton',
props: {
icon: 'icon-tool-brush',
label: 'Brush',
label: i18n.t('Buttons:Brush'),
evaluate: {
name: 'evaluate.cornerstone.segmentation',
toolNames: ['CircularBrush', 'SphereBrush'],
@@ -282,7 +283,7 @@ const toolbarButtons = [
uiType: 'ohif.toolButton',
props: {
icon: 'icon-tool-eraser',
label: 'Eraser',
label: i18n.t('Buttons:Eraser'),
evaluate: {
name: 'evaluate.cornerstone.segmentation',
toolNames: ['CircularEraser', 'SphereEraser'],
@@ -320,7 +321,7 @@ const toolbarButtons = [
uiType: 'ohif.toolButton',
props: {
icon: 'icon-tool-threshold',
label: 'Threshold',
label: i18n.t('Buttons:Threshold'),
evaluate: {
name: 'evaluate.cornerstone.segmentation',
toolNames: ['ThresholdCircularBrush', 'ThresholdSphereBrush'],
@@ -401,8 +402,10 @@ const toolbarButtons = [
uiType: 'ohif.dataOverlayMenu',
props: {
icon: 'ViewportViews',
label: 'Data Overlay',
tooltip: 'Configure data overlay options and manage foreground/background display sets',
label: i18n.t('Buttons:Data Overlay'),
tooltip: i18n.t(
'Buttons:Configure data overlay options and manage foreground/background display sets'
),
evaluate: 'evaluate.dataOverlayMenu',
},
},
@@ -411,8 +414,10 @@ const toolbarButtons = [
uiType: 'ohif.orientationMenu',
props: {
icon: 'OrientationSwitch',
label: 'Orientation',
tooltip: 'Change viewport orientation between axial, sagittal, coronal and reformat planes',
label: i18n.t('Buttons:Orientation'),
tooltip: i18n.t(
'Buttons:Change viewport orientation between axial, sagittal, coronal and reformat planes'
),
evaluate: {
name: 'evaluate.orientationMenu',
// hideWhenDisabled: true,
@@ -424,8 +429,8 @@ const toolbarButtons = [
uiType: 'ohif.windowLevelMenu',
props: {
icon: 'WindowLevel',
label: 'Window Level',
tooltip: 'Adjust window/level presets and customize image contrast settings',
label: i18n.t('Buttons:Window Level'),
tooltip: i18n.t('Buttons:Adjust window/level presets and customize image contrast settings'),
evaluate: 'evaluate.windowLevelMenu',
},
},
@@ -434,8 +439,8 @@ const toolbarButtons = [
uiType: 'ohif.voiManualControlMenu',
props: {
icon: 'WindowLevelAdvanced',
label: 'Advanced Window Level',
tooltip: 'Advanced window/level settings with manual controls and presets',
label: i18n.t('Buttons:Advanced Window Level'),
tooltip: i18n.t('Buttons:Advanced window/level settings with manual controls and presets'),
evaluate: 'evaluate.voiManualControlMenu',
},
},
@@ -444,8 +449,8 @@ const toolbarButtons = [
uiType: 'ohif.thresholdMenu',
props: {
icon: 'Threshold',
label: 'Threshold',
tooltip: 'Image threshold settings',
label: i18n.t('Buttons:Threshold'),
tooltip: i18n.t('Buttons:Image threshold settings'),
evaluate: {
name: 'evaluate.thresholdMenu',
hideWhenDisabled: true,
@@ -457,8 +462,8 @@ const toolbarButtons = [
uiType: 'ohif.opacityMenu',
props: {
icon: 'Opacity',
label: 'Opacity',
tooltip: 'Image opacity settings',
label: i18n.t('Buttons:Opacity'),
tooltip: i18n.t('Buttons:Image opacity settings'),
evaluate: {
name: 'evaluate.opacityMenu',
hideWhenDisabled: true,
@@ -470,7 +475,7 @@ const toolbarButtons = [
uiType: 'ohif.colorbar',
props: {
type: 'tool',
label: 'Colorbar',
label: i18n.t('Buttons:Colorbar'),
},
},
];
@@ -39,6 +39,12 @@ const config = {
amd: '@ohif/ui',
root: '@ohif/ui',
},
i18next: {
commonjs2: 'i18next',
commonjs: 'i18next',
amd: 'i18next',
root: 'i18next',
},
},
],
module: {
+86 -74
View File
@@ -1,5 +1,6 @@
import type { Button } from '@ohif/core/types';
import { ViewportGridService } from '@ohif/core';
import i18n from 'i18next';
const setToolActiveToolbar = {
commandName: 'setToolActiveToolbar',
@@ -30,8 +31,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.modalityLoadBadge',
props: {
icon: 'Status',
label: 'Status',
tooltip: 'Status',
label: i18n.t('Buttons:Status'),
tooltip: i18n.t('Buttons:Status'),
evaluate: {
name: 'evaluate.modalityLoadBadge',
hideWhenDisabled: true,
@@ -43,8 +44,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.navigationComponent',
props: {
icon: 'Navigation',
label: 'Navigation',
tooltip: 'Navigate between segments/measurements and manage their visibility',
label: i18n.t('Buttons:Navigation'),
tooltip: i18n.t('Buttons:Navigate between segments/measurements and manage their visibility'),
evaluate: {
name: 'evaluate.navigationComponent',
hideWhenDisabled: true,
@@ -56,8 +57,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.trackingStatus',
props: {
icon: 'TrackingStatus',
label: 'Tracking Status',
tooltip: 'View and manage tracking status of measurements and annotations',
label: i18n.t('Buttons:Tracking Status'),
tooltip: i18n.t('Buttons:View and manage tracking status of measurements and annotations'),
evaluate: {
name: 'evaluate.trackingStatus',
hideWhenDisabled: true,
@@ -69,8 +70,10 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.dataOverlayMenu',
props: {
icon: 'ViewportViews',
label: 'Data Overlay',
tooltip: 'Configure data overlay options and manage foreground/background display sets',
label: i18n.t('Buttons:Data Overlay'),
tooltip: i18n.t(
'Buttons:Configure data overlay options and manage foreground/background display sets'
),
evaluate: 'evaluate.dataOverlayMenu',
},
},
@@ -79,8 +82,10 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.orientationMenu',
props: {
icon: 'OrientationSwitch',
label: 'Orientation',
tooltip: 'Change viewport orientation between axial, sagittal, coronal and reformat planes',
label: i18n.t('Buttons:Orientation'),
tooltip: i18n.t(
'Buttons:Change viewport orientation between axial, sagittal, coronal and reformat planes'
),
evaluate: {
name: 'evaluate.orientationMenu',
// hideWhenDisabled: true,
@@ -92,8 +97,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.windowLevelMenuEmbedded',
props: {
icon: 'WindowLevel',
label: 'Window Level',
tooltip: 'Adjust window/level presets and customize image contrast settings',
label: i18n.t('Buttons:Window Level'),
tooltip: i18n.t('Buttons:Adjust window/level presets and customize image contrast settings'),
evaluate: {
name: 'evaluate.windowLevelMenuEmbedded',
hideWhenDisabled: true,
@@ -105,8 +110,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.windowLevelMenu',
props: {
icon: 'WindowLevel',
label: 'Window Level',
tooltip: 'Adjust window/level presets and customize image contrast settings',
label: i18n.t('Buttons:Window Level'),
tooltip: i18n.t('Buttons:Adjust window/level presets and customize image contrast settings'),
evaluate: 'evaluate.windowLevelMenu',
},
},
@@ -115,8 +120,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.voiManualControlMenu',
props: {
icon: 'WindowLevelAdvanced',
label: 'Advanced Window Level',
tooltip: 'Advanced window/level settings with manual controls and presets',
label: i18n.t('Buttons:Advanced Window Level'),
tooltip: i18n.t('Buttons:Advanced window/level settings with manual controls and presets'),
evaluate: 'evaluate.voiManualControlMenu',
},
},
@@ -125,8 +130,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.thresholdMenu',
props: {
icon: 'Threshold',
label: 'Threshold',
tooltip: 'Image threshold settings',
label: i18n.t('Buttons:Threshold'),
tooltip: i18n.t('Buttons:Image threshold settings'),
evaluate: {
name: 'evaluate.thresholdMenu',
hideWhenDisabled: true,
@@ -138,8 +143,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.opacityMenu',
props: {
icon: 'Opacity',
label: 'Opacity',
tooltip: 'Image opacity settings',
label: i18n.t('Buttons:Opacity'),
tooltip: i18n.t('Buttons:Image opacity settings'),
evaluate: {
name: 'evaluate.opacityMenu',
hideWhenDisabled: true,
@@ -151,7 +156,7 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.colorbar',
props: {
type: 'tool',
label: 'Colorbar',
label: i18n.t('Buttons:Colorbar'),
},
},
// sections
@@ -190,7 +195,7 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-zoom',
label: 'Zoom',
label: i18n.t('Buttons:Zoom'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -200,7 +205,7 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-window-level',
label: 'Window Level',
label: i18n.t('Buttons:Window Level'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -210,7 +215,7 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-move',
label: 'Pan',
label: i18n.t('Buttons:Pan'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -221,11 +226,11 @@ const toolbarButtons: Button[] = [
props: {
type: 'tool',
icon: 'tool-3d-rotate',
label: '3D Rotate',
label: i18n.t('Buttons:3D Rotate'),
commands: setToolActiveToolbar,
evaluate: {
name: 'evaluate.cornerstoneTool',
disabledText: 'Select a 3D viewport to enable this tool',
disabledText: i18n.t('Buttons:Select a 3D viewport to enable this tool'),
},
},
},
@@ -234,7 +239,7 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-capture',
label: 'Capture',
label: i18n.t('Buttons:Capture'),
commands: 'showDownloadViewportModal',
evaluate: [
'evaluate.action',
@@ -260,7 +265,7 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-crosshair',
label: 'Crosshairs',
label: i18n.t('Buttons:Crosshairs'),
commands: {
commandName: 'setToolActiveToolbar',
commandOptions: {
@@ -269,7 +274,7 @@ const toolbarButtons: Button[] = [
},
evaluate: {
name: 'evaluate.cornerstoneTool',
disabledText: 'Select an MPR viewport to enable this tool',
disabledText: i18n.t('Buttons:Select an MPR viewport to enable this tool'),
},
},
},
@@ -278,8 +283,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-reset',
label: 'Reset View',
tooltip: 'Reset View',
label: i18n.t('Buttons:Reset View'),
tooltip: i18n.t('Buttons:Reset View'),
commands: 'resetViewport',
evaluate: 'evaluate.action',
},
@@ -289,8 +294,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-rotate-right',
label: 'Rotate Right',
tooltip: 'Rotate +90',
label: i18n.t('Buttons:Rotate Right'),
tooltip: i18n.t('Buttons:Rotate +90'),
commands: 'rotateViewportCW',
evaluate: 'evaluate.action',
},
@@ -300,8 +305,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-flip-horizontal',
label: 'Flip Horizontal',
tooltip: 'Flip Horizontally',
label: i18n.t('Buttons:Flip Horizontal'),
tooltip: i18n.t('Buttons:Flip Horizontally'),
commands: 'flipViewportHorizontal',
evaluate: [
'evaluate.viewportProperties.toggle',
@@ -317,8 +322,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-referenceLines',
label: 'Reference Lines',
tooltip: 'Show Reference Lines',
label: i18n.t('Buttons:Reference Lines'),
tooltip: i18n.t('Buttons:Show Reference Lines'),
commands: 'toggleEnabledDisabledToolbar',
evaluate: 'evaluate.cornerstoneTool.toggle',
},
@@ -328,8 +333,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'toggle-dicom-overlay',
label: 'Image Overlay',
tooltip: 'Toggle Image Overlay',
label: i18n.t('Buttons:Image Overlay'),
tooltip: i18n.t('Buttons:Toggle Image Overlay'),
commands: 'toggleEnabledDisabledToolbar',
evaluate: 'evaluate.cornerstoneTool.toggle',
},
@@ -339,8 +344,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-stack-scroll',
label: 'Stack Scroll',
tooltip: 'Stack Scroll',
label: i18n.t('Buttons:Stack Scroll'),
tooltip: i18n.t('Buttons:Stack Scroll'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -350,8 +355,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-invert',
label: 'Invert',
tooltip: 'Invert Colors',
label: i18n.t('Buttons:Invert'),
tooltip: i18n.t('Buttons:Invert Colors'),
commands: 'invertViewport',
evaluate: 'evaluate.viewportProperties.toggle',
},
@@ -361,8 +366,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-cine',
label: 'Cine',
tooltip: 'Cine',
label: i18n.t('Buttons:Cine'),
tooltip: i18n.t('Buttons:Cine'),
commands: 'toggleCine',
evaluate: [
'evaluate.cine',
@@ -378,8 +383,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-magnify',
label: 'Zoom-in',
tooltip: 'Zoom-in',
label: i18n.t('Buttons:Zoom-in'),
tooltip: i18n.t('Buttons:Zoom-in'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -389,8 +394,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'dicom-tag-browser',
label: 'Dicom Tag Browser',
tooltip: 'Dicom Tag Browser',
label: i18n.t('Buttons:Dicom Tag Browser'),
tooltip: i18n.t('Buttons:Dicom Tag Browser'),
commands: 'openDICOMTagViewer',
},
},
@@ -400,11 +405,11 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolBoxButton',
props: {
icon: 'icon-tool-brush',
label: 'Brush',
label: i18n.t('Buttons:Brush'),
evaluate: {
name: 'evaluate.cornerstone.segmentation',
toolNames: ['CircularBrush', 'SphereBrush'],
disabledText: 'Create new segmentation to enable this tool.',
disabledText: i18n.t('Buttons:Create new segmentation to enable this tool.'),
},
options: [
{
@@ -439,14 +444,15 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolBoxButton',
props: {
icon: 'icon-tool-interpolation',
label: 'Interpolate Labelmap',
tooltip:
'Automatically fill in missing slices between drawn segments. Use brush or threshold tools on at least two slices, then click to interpolate across slices. Works in any direction. Volume must be reconstructable.',
label: i18n.t('Buttons:Interpolate Labelmap'),
tooltip: i18n.t(
'Buttons:Automatically fill in missing slices between drawn segments. Use brush or threshold tools on at least two slices, then click to interpolate across slices. Works in any direction. Volume must be reconstructable.'
),
evaluate: [
'evaluate.cornerstone.segmentation',
{
name: 'evaluate.displaySetIsReconstructable',
disabledText: 'The current viewport cannot handle interpolation.',
disabledText: i18n.t('Buttons:The current viewport cannot handle interpolation.'),
},
],
commands: 'interpolateLabelmap',
@@ -457,12 +463,13 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolBoxButton',
props: {
icon: 'icon-tool-bidirectional-segment',
label: 'Segment Bidirectional',
tooltip:
'Automatically detects the largest length and width across slices for the selected segment and displays a bidirectional measurement.',
label: i18n.t('Buttons:Segment Bidirectional'),
tooltip: i18n.t(
'Buttons:Automatically detects the largest length and width across slices for the selected segment and displays a bidirectional measurement.'
),
evaluate: {
name: 'evaluate.cornerstone.segmentation',
disabledText: 'Create new segmentation to enable this tool.',
disabledText: i18n.t('Buttons:Create new segmentation to enable this tool.'),
},
commands: 'runSegmentBidirectional',
},
@@ -472,13 +479,14 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolBoxButton',
props: {
icon: 'icon-tool-click-segment',
label: 'One Click Segment',
tooltip:
'Detects segmentable regions with one click. Hover for visual feedback—click when a plus sign appears to auto-segment the lesion.',
label: i18n.t('Buttons:One Click Segment'),
tooltip: i18n.t(
'Buttons:Detects segmentable regions with one click. Hover for visual feedback—click when a plus sign appears to auto-segment the lesion.'
),
evaluate: {
name: 'evaluate.cornerstone.segmentation',
toolNames: ['RegionSegmentPlus'],
disabledText: 'Create new segmentation to enable this tool.',
disabledText: i18n.t('Buttons:Create new segmentation to enable this tool.'),
},
commands: 'setToolActiveToolbar',
},
@@ -488,9 +496,10 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolBoxButton',
props: {
icon: 'icon-labelmap-slice-propagation',
label: 'Labelmap Assist',
tooltip:
'Toggle AI assistance for segmenting nearby slices. After drawing on a slice, scroll to preview predictions. Press Enter to accept or Esc to skip.',
label: i18n.t('Buttons:Labelmap Assist'),
tooltip: i18n.t(
'Buttons:Toggle AI assistance for segmenting nearby slices. After drawing on a slice, scroll to preview predictions. Press Enter to accept or Esc to skip.'
),
evaluate: [
'evaluate.cornerstoneTool.toggle',
{
@@ -511,9 +520,10 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolBoxButton',
props: {
icon: 'icon-marker-labelmap',
label: 'Marker Guided Labelmap',
tooltip:
'Use include/exclude markers to guide AI (SAM) segmentation. Click to place markers, Enter to accept results, Esc to reject, and N to go to the next slice while keeping markers.',
label: i18n.t('Buttons:Marker Guided Labelmap'),
tooltip: i18n.t(
'Buttons:Use include/exclude markers to guide AI (SAM) segmentation. Click to place markers, Enter to accept results, Esc to reject, and N to go to the next slice while keeping markers.'
),
evaluate: [
{
name: 'evaluate.cornerstone.segmentation',
@@ -562,7 +572,7 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolBoxButton',
props: {
icon: 'icon-tool-eraser',
label: 'Eraser',
label: i18n.t('Buttons:Eraser'),
evaluate: {
name: 'evaluate.cornerstone.segmentation',
toolNames: ['CircularEraser', 'SphereEraser'],
@@ -717,11 +727,11 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolBoxButton',
props: {
icon: 'icon-tool-shape',
label: 'Shapes',
label: i18n.t('Buttons:Shapes'),
evaluate: {
name: 'evaluate.cornerstone.segmentation',
toolNames: ['CircleScissor', 'SphereScissor', 'RectangleScissor'],
disabledText: 'Create new segmentation to enable shapes tool.',
disabledText: i18n.t('Buttons:Create new segmentation to enable shapes tool.'),
},
options: [
{
@@ -744,8 +754,10 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolBoxButton',
props: {
icon: 'tool-segment-label',
label: 'Segment Label Display',
tooltip: 'Click to show or hide segment labels when hovering with your mouse.',
label: i18n.t('Buttons:Segment Label Display'),
tooltip: i18n.t(
'Buttons:Click to show or hide segment labels when hovering with your mouse.'
),
commands: { commandName: 'toggleSegmentLabel' },
evaluate: [
'evaluate.cornerstoneTool.toggle',
+44 -39
View File
@@ -1,4 +1,5 @@
import { toolGroupIds } from './initToolGroups';
import i18n from 'i18next';
const setToolActiveToolbar = {
commandName: 'setToolActiveToolbar',
@@ -41,8 +42,8 @@ const toolbarButtons = [
uiType: 'ohif.modalityLoadBadge',
props: {
icon: 'Status',
label: 'Status',
tooltip: 'Status',
label: i18n.t('Buttons:Status'),
tooltip: i18n.t('Buttons:Status'),
evaluate: {
name: 'evaluate.modalityLoadBadge',
hideWhenDisabled: true,
@@ -54,7 +55,7 @@ const toolbarButtons = [
uiType: 'ohif.colorbar',
props: {
type: 'tool',
label: 'Colorbar',
label: i18n.t('Buttons:Colorbar'),
},
},
{
@@ -62,8 +63,8 @@ const toolbarButtons = [
uiType: 'ohif.navigationComponent',
props: {
icon: 'Navigation',
label: 'Navigation',
tooltip: 'Navigate between segments/measurements and manage their visibility',
label: i18n.t('Buttons:Navigation'),
tooltip: i18n.t('Buttons:Navigate between segments/measurements and manage their visibility'),
evaluate: {
name: 'evaluate.navigationComponent',
hideWhenDisabled: true,
@@ -75,8 +76,8 @@ const toolbarButtons = [
uiType: 'ohif.windowLevelMenuEmbedded',
props: {
icon: 'WindowLevel',
label: 'Window Level',
tooltip: 'Adjust window/level presets and customize image contrast settings',
label: i18n.t('Buttons:Window Level'),
tooltip: i18n.t('Buttons:Adjust window/level presets and customize image contrast settings'),
evaluate: {
name: 'evaluate.windowLevelMenuEmbedded',
hideWhenDisabled: true,
@@ -88,8 +89,8 @@ const toolbarButtons = [
uiType: 'ohif.trackingStatus',
props: {
icon: 'TrackingStatus',
label: 'Tracking Status',
tooltip: 'View and manage tracking status of measurements and annotations',
label: i18n.t('Buttons:Tracking Status'),
tooltip: i18n.t('Buttons:View and manage tracking status of measurements and annotations'),
evaluate: {
name: 'evaluate.trackingStatus',
hideWhenDisabled: true,
@@ -101,8 +102,8 @@ const toolbarButtons = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-length',
label: 'Length',
tooltip: 'Length Tool',
label: i18n.t('Buttons:Length'),
tooltip: i18n.t('Buttons:Length Tool'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -112,8 +113,8 @@ const toolbarButtons = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-bidirectional',
label: 'Bidirectional',
tooltip: 'Bidirectional Tool',
label: i18n.t('Buttons:Bidirectional'),
tooltip: i18n.t('Buttons:Bidirectional Tool'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -123,8 +124,8 @@ const toolbarButtons = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-annotate',
label: 'Arrow Annotate',
tooltip: 'Arrow Annotate Tool',
label: i18n.t('Buttons:Arrow Annotate'),
tooltip: i18n.t('Buttons:Arrow Annotate Tool'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -134,8 +135,8 @@ const toolbarButtons = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-ellipse',
label: 'Ellipse',
tooltip: 'Ellipse Tool',
label: i18n.t('Buttons:Ellipse'),
tooltip: i18n.t('Buttons:Ellipse Tool'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -145,7 +146,7 @@ const toolbarButtons = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-zoom',
label: 'Zoom',
label: i18n.t('Buttons:Zoom'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -155,7 +156,7 @@ const toolbarButtons = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-window-level',
label: 'Window Level',
label: i18n.t('Buttons:Window Level'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -165,7 +166,7 @@ const toolbarButtons = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-crosshair',
label: 'Crosshairs',
label: i18n.t('Buttons:Crosshairs'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -175,7 +176,7 @@ const toolbarButtons = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-move',
label: 'Pan',
label: i18n.t('Buttons:Pan'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -185,13 +186,13 @@ const toolbarButtons = [
uiType: 'ohif.toolBoxButton',
props: {
icon: 'tool-create-threshold',
label: 'Rectangle ROI Threshold',
label: i18n.t('Buttons:Rectangle ROI Threshold'),
commands: setToolActiveToolbar,
evaluate: [
'evaluate.cornerstone.segmentation',
{
name: 'evaluate.cornerstoneTool',
disabledText: 'Select the PT Axial to enable this tool',
disabledText: i18n.t('Buttons:Select the PT Axial to enable this tool'),
},
],
options: 'tmtv.RectangleROIThresholdOptions',
@@ -203,11 +204,11 @@ const toolbarButtons = [
uiType: 'ohif.toolButton',
props: {
icon: 'icon-tool-brush',
label: 'Brush',
label: i18n.t('Buttons:Brush'),
evaluate: {
name: 'evaluate.cornerstone.segmentation',
toolNames: ['CircularBrush', 'SphereBrush'],
disabledText: 'Create new segmentation to enable this tool.',
disabledText: i18n.t('Buttons:Create new segmentation to enable this tool.'),
},
options: [
{
@@ -242,7 +243,7 @@ const toolbarButtons = [
uiType: 'ohif.toolButton',
props: {
icon: 'icon-tool-eraser',
label: 'Eraser',
label: i18n.t('Buttons:Eraser'),
evaluate: {
name: 'evaluate.cornerstone.segmentation',
toolNames: ['CircularEraser', 'SphereEraser'],
@@ -280,7 +281,7 @@ const toolbarButtons = [
uiType: 'ohif.toolButton',
props: {
icon: 'icon-tool-threshold',
label: 'Threshold Tool',
label: i18n.t('Buttons:Threshold Tool'),
evaluate: {
name: 'evaluate.cornerstone.segmentation',
toolNames: ['ThresholdCircularBrush', 'ThresholdSphereBrush'],
@@ -364,8 +365,10 @@ const toolbarButtons = [
uiType: 'ohif.dataOverlayMenu',
props: {
icon: 'ViewportViews',
label: 'Data Overlay',
tooltip: 'Configure data overlay options and manage foreground/background display sets',
label: i18n.t('Buttons:Data Overlay'),
tooltip: i18n.t(
'Buttons:Configure data overlay options and manage foreground/background display sets'
),
evaluate: 'evaluate.dataOverlayMenu',
},
},
@@ -374,8 +377,10 @@ const toolbarButtons = [
uiType: 'ohif.orientationMenu',
props: {
icon: 'OrientationSwitch',
label: 'Orientation',
tooltip: 'Change viewport orientation between axial, sagittal, coronal and reformat planes',
label: i18n.t('Buttons:Orientation'),
tooltip: i18n.t(
'Buttons:Change viewport orientation between axial, sagittal, coronal and reformat planes'
),
evaluate: {
name: 'evaluate.orientationMenu',
// hideWhenDisabled: true,
@@ -387,8 +392,8 @@ const toolbarButtons = [
uiType: 'ohif.windowLevelMenu',
props: {
icon: 'WindowLevel',
label: 'Window Level',
tooltip: 'Adjust window/level presets and customize image contrast settings',
label: i18n.t('Buttons:Window Level'),
tooltip: i18n.t('Buttons:Adjust window/level presets and customize image contrast settings'),
evaluate: 'evaluate.windowLevelMenu',
},
},
@@ -397,8 +402,8 @@ const toolbarButtons = [
uiType: 'ohif.voiManualControlMenu',
props: {
icon: 'WindowLevelAdvanced',
label: 'Advanced Window Level',
tooltip: 'Advanced window/level settings with manual controls and presets',
label: i18n.t('Buttons:Advanced Window Level'),
tooltip: i18n.t('Buttons:Advanced window/level settings with manual controls and presets'),
evaluate: 'evaluate.voiManualControlMenu',
},
},
@@ -407,8 +412,8 @@ const toolbarButtons = [
uiType: 'ohif.thresholdMenu',
props: {
icon: 'Threshold',
label: 'Threshold',
tooltip: 'Image threshold settings',
label: i18n.t('Buttons:Threshold'),
tooltip: i18n.t('Buttons:Image threshold settings'),
evaluate: {
name: 'evaluate.thresholdMenu',
hideWhenDisabled: true,
@@ -420,8 +425,8 @@ const toolbarButtons = [
uiType: 'ohif.opacityMenu',
props: {
icon: 'Opacity',
label: 'Opacity',
tooltip: 'Image opacity settings',
label: i18n.t('Buttons:Opacity'),
tooltip: i18n.t('Buttons:Image opacity settings'),
evaluate: {
name: 'evaluate.opacityMenu',
hideWhenDisabled: true,
+88 -83
View File
@@ -2,6 +2,7 @@ import type { Button } from '@ohif/core/types';
import { EVENTS } from '@cornerstonejs/core';
import { ViewportGridService } from '@ohif/core';
import i18n from 'i18next';
const callbacks = (toolName: string) => [
{
@@ -48,8 +49,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.modalityLoadBadge',
props: {
icon: 'Status',
label: 'Status',
tooltip: 'Status',
label: i18n.t('Buttons:Status'),
tooltip: i18n.t('Buttons:Status'),
evaluate: {
name: 'evaluate.modalityLoadBadge',
hideWhenDisabled: true,
@@ -61,8 +62,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.navigationComponent',
props: {
icon: 'Navigation',
label: 'Navigation',
tooltip: 'Navigate between segments/measurements and manage their visibility',
label: i18n.t('Buttons:Navigation'),
tooltip: i18n.t('Buttons:Navigate between segments/measurements and manage their visibility'),
evaluate: {
name: 'evaluate.navigationComponent',
hideWhenDisabled: true,
@@ -74,8 +75,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.trackingStatus',
props: {
icon: 'TrackingStatus',
label: 'Tracking Status',
tooltip: 'View and manage tracking status of measurements and annotations',
label: i18n.t('Buttons:Tracking Status'),
tooltip: i18n.t('Buttons:View and manage tracking status of measurements and annotations'),
evaluate: {
name: 'evaluate.trackingStatus',
hideWhenDisabled: true,
@@ -87,8 +88,10 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.dataOverlayMenu',
props: {
icon: 'ViewportViews',
label: 'Data Overlay',
tooltip: 'Configure data overlay options and manage foreground/background display sets',
label: i18n.t('Buttons:Data Overlay'),
tooltip: i18n.t(
'Buttons:Configure data overlay options and manage foreground/background display sets'
),
evaluate: 'evaluate.dataOverlayMenu',
},
},
@@ -97,8 +100,10 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.orientationMenu',
props: {
icon: 'OrientationSwitch',
label: 'Orientation',
tooltip: 'Change viewport orientation between axial, sagittal, coronal and reformat planes',
label: i18n.t('Buttons:Orientation'),
tooltip: i18n.t(
'Buttons:Change viewport orientation between axial, sagittal, coronal and reformat planes'
),
evaluate: {
name: 'evaluate.orientationMenu',
// hideWhenDisabled: true,
@@ -110,8 +115,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.windowLevelMenuEmbedded',
props: {
icon: 'WindowLevel',
label: 'Window Level',
tooltip: 'Adjust window/level presets and customize image contrast settings',
label: i18n.t('Buttons:Window Level'),
tooltip: i18n.t('Buttons:Adjust window/level presets and customize image contrast settings'),
evaluate: {
name: 'evaluate.windowLevelMenuEmbedded',
hideWhenDisabled: true,
@@ -123,8 +128,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.windowLevelMenu',
props: {
icon: 'WindowLevel',
label: 'Window Level',
tooltip: 'Adjust window/level presets and customize image contrast settings',
label: i18n.t('Buttons:Window Level'),
tooltip: i18n.t('Buttons:Adjust window/level presets and customize image contrast settings'),
evaluate: {
name: 'evaluate.windowLevelMenu',
},
@@ -135,8 +140,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.voiManualControlMenu',
props: {
icon: 'WindowLevelAdvanced',
label: 'Advanced Window Level',
tooltip: 'Advanced window/level settings with manual controls and presets',
label: i18n.t('Buttons:Advanced Window Level'),
tooltip: i18n.t('Buttons:Advanced window/level settings with manual controls and presets'),
evaluate: 'evaluate.voiManualControlMenu',
},
},
@@ -145,8 +150,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.thresholdMenu',
props: {
icon: 'Threshold',
label: 'Threshold',
tooltip: 'Image threshold settings',
label: i18n.t('Buttons:Threshold'),
tooltip: i18n.t('Buttons:Image threshold settings'),
evaluate: {
name: 'evaluate.thresholdMenu',
hideWhenDisabled: true,
@@ -158,8 +163,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.opacityMenu',
props: {
icon: 'Opacity',
label: 'Opacity',
tooltip: 'Image opacity settings',
label: i18n.t('Buttons:Opacity'),
tooltip: i18n.t('Buttons:Image opacity settings'),
evaluate: {
name: 'evaluate.opacityMenu',
hideWhenDisabled: true,
@@ -171,7 +176,7 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.colorbar',
props: {
type: 'tool',
label: 'Colorbar',
label: i18n.t('Buttons:Colorbar'),
},
},
{
@@ -179,8 +184,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-reset',
label: 'Reset View',
tooltip: 'Reset View',
label: i18n.t('Buttons:Reset View'),
tooltip: i18n.t('Buttons:Reset View'),
commands: 'resetViewport',
evaluate: 'evaluate.action',
},
@@ -190,8 +195,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-rotate-right',
label: 'Rotate Right',
tooltip: 'Rotate +90',
label: i18n.t('Buttons:Rotate Right'),
tooltip: i18n.t('Buttons:Rotate +90'),
commands: 'rotateViewportCW',
evaluate: [
'evaluate.action',
@@ -207,8 +212,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-flip-horizontal',
label: 'Flip Horizontal',
tooltip: 'Flip Horizontally',
label: i18n.t('Buttons:Flip Horizontal'),
tooltip: i18n.t('Buttons:Flip Horizontally'),
commands: 'flipViewportHorizontal',
evaluate: [
'evaluate.viewportProperties.toggle',
@@ -224,8 +229,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'link',
label: 'Image Slice Sync',
tooltip: 'Enable position synchronization on stack viewports',
label: i18n.t('Buttons:Image Slice Sync'),
tooltip: i18n.t('Buttons:Enable position synchronization on stack viewports'),
commands: {
commandName: 'toggleSynchronizer',
commandOptions: {
@@ -252,8 +257,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-referenceLines',
label: 'Reference Lines',
tooltip: 'Show Reference Lines',
label: i18n.t('Buttons:Reference Lines'),
tooltip: i18n.t('Buttons:Show Reference Lines'),
commands: 'toggleEnabledDisabledToolbar',
listeners: {
[ViewportGridService.EVENTS.ACTIVE_VIEWPORT_ID_CHANGED]: callbacks('ReferenceLines'),
@@ -273,8 +278,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'toggle-dicom-overlay',
label: 'Image Overlay',
tooltip: 'Toggle Image Overlay',
label: i18n.t('Buttons:Image Overlay'),
tooltip: i18n.t('Buttons:Toggle Image Overlay'),
commands: 'toggleEnabledDisabledToolbar',
evaluate: [
'evaluate.cornerstoneTool.toggle',
@@ -290,8 +295,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-stack-scroll',
label: 'Stack Scroll',
tooltip: 'Stack Scroll',
label: i18n.t('Buttons:Stack Scroll'),
tooltip: i18n.t('Buttons:Stack Scroll'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -301,8 +306,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-invert',
label: 'Invert',
tooltip: 'Invert Colors',
label: i18n.t('Buttons:Invert'),
tooltip: i18n.t('Buttons:Invert Colors'),
commands: 'invertViewport',
evaluate: [
'evaluate.viewportProperties.toggle',
@@ -318,8 +323,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-probe',
label: 'Probe',
tooltip: 'Probe',
label: i18n.t('Buttons:Probe'),
tooltip: i18n.t('Buttons:Probe'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -329,8 +334,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-cine',
label: 'Cine',
tooltip: 'Cine',
label: i18n.t('Buttons:Cine'),
tooltip: i18n.t('Buttons:Cine'),
commands: 'toggleCine',
evaluate: [
'evaluate.cine',
@@ -346,8 +351,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-angle',
label: 'Angle',
tooltip: 'Angle',
label: i18n.t('Buttons:Angle'),
tooltip: i18n.t('Buttons:Angle'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -357,8 +362,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'icon-tool-cobb-angle',
label: 'Cobb Angle',
tooltip: 'Cobb Angle',
label: i18n.t('Buttons:Cobb Angle'),
tooltip: i18n.t('Buttons:Cobb Angle'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -368,8 +373,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-magnify',
label: 'Zoom-in',
tooltip: 'Zoom-in',
label: i18n.t('Buttons:Zoom-in'),
tooltip: i18n.t('Buttons:Zoom-in'),
commands: setToolActiveToolbar,
evaluate: [
'evaluate.cornerstoneTool',
@@ -385,8 +390,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-calibration',
label: 'Calibration',
tooltip: 'Calibration Line',
label: i18n.t('Buttons:Calibration'),
tooltip: i18n.t('Buttons:Calibration Line'),
commands: setToolActiveToolbar,
evaluate: [
'evaluate.cornerstoneTool',
@@ -402,8 +407,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'dicom-tag-browser',
label: 'Dicom Tag Browser',
tooltip: 'Dicom Tag Browser',
label: i18n.t('Buttons:Dicom Tag Browser'),
tooltip: i18n.t('Buttons:Dicom Tag Browser'),
commands: 'openDICOMTagViewer',
},
},
@@ -412,8 +417,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'icon-tool-loupe',
label: 'Magnify Probe',
tooltip: 'Magnify Probe',
label: i18n.t('Buttons:Magnify Probe'),
tooltip: i18n.t('Buttons:Magnify Probe'),
commands: 'toggleActiveDisabledToolbar',
evaluate: [
'evaluate.cornerstoneTool.toggle.ifStrictlyDisabled',
@@ -429,8 +434,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'icon-tool-ultrasound-bidirectional',
label: 'Ultrasound Directional',
tooltip: 'Ultrasound Directional',
label: i18n.t('Buttons:Ultrasound Directional'),
tooltip: i18n.t('Buttons:Ultrasound Directional'),
commands: setToolActiveToolbar,
evaluate: [
'evaluate.cornerstoneTool',
@@ -446,8 +451,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'icon-tool-ultrasound-bidirectional',
label: 'US Pleura B-line Annotation',
tooltip: 'US Pleura B-line Annotation',
label: i18n.t('Buttons:US Pleura B-line Annotation'),
tooltip: i18n.t('Buttons:US Pleura B-line Annotation'),
commands: setToolActiveToolbar,
evaluate: [
'evaluate.cornerstoneTool',
@@ -463,8 +468,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'icon-tool-window-region',
label: 'Window Level Region',
tooltip: 'Window Level Region',
label: i18n.t('Buttons:Window Level Region'),
tooltip: i18n.t('Buttons:Window Level Region'),
commands: setToolActiveToolbar,
evaluate: [
'evaluate.cornerstoneTool',
@@ -480,8 +485,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-length',
label: 'Length',
tooltip: 'Length Tool',
label: i18n.t('Buttons:Length'),
tooltip: i18n.t('Buttons:Length Tool'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -491,8 +496,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-bidirectional',
label: 'Bidirectional',
tooltip: 'Bidirectional Tool',
label: i18n.t('Buttons:Bidirectional'),
tooltip: i18n.t('Buttons:Bidirectional Tool'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -502,8 +507,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-annotate',
label: 'Annotation',
tooltip: 'Arrow Annotate',
label: i18n.t('Buttons:Annotation'),
tooltip: i18n.t('Buttons:Arrow Annotate'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -513,8 +518,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-ellipse',
label: 'Ellipse',
tooltip: 'Ellipse ROI',
label: i18n.t('Buttons:Ellipse'),
tooltip: i18n.t('Buttons:Ellipse ROI'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -524,8 +529,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-rectangle',
label: 'Rectangle',
tooltip: 'Rectangle ROI',
label: i18n.t('Buttons:Rectangle'),
tooltip: i18n.t('Buttons:Rectangle ROI'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -535,8 +540,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-circle',
label: 'Circle',
tooltip: 'Circle Tool',
label: i18n.t('Buttons:Circle'),
tooltip: i18n.t('Buttons:Circle Tool'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -546,8 +551,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'icon-tool-freehand-roi',
label: 'Freehand ROI',
tooltip: 'Freehand ROI',
label: i18n.t('Buttons:Freehand ROI'),
tooltip: i18n.t('Buttons:Freehand ROI'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -557,8 +562,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'icon-tool-spline-roi',
label: 'Spline ROI',
tooltip: 'Spline ROI',
label: i18n.t('Buttons:Spline ROI'),
tooltip: i18n.t('Buttons:Spline ROI'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -568,8 +573,8 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'icon-tool-livewire',
label: 'Livewire tool',
tooltip: 'Livewire tool',
label: i18n.t('Buttons:Livewire tool'),
tooltip: i18n.t('Buttons:Livewire tool'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -580,7 +585,7 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-window-level',
label: 'Window Level',
label: i18n.t('Buttons:Window Level'),
commands: setToolActiveToolbar,
evaluate: [
'evaluate.cornerstoneTool',
@@ -597,7 +602,7 @@ const toolbarButtons: Button[] = [
props: {
type: 'tool',
icon: 'tool-move',
label: 'Pan',
label: i18n.t('Buttons:Pan'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -608,7 +613,7 @@ const toolbarButtons: Button[] = [
props: {
type: 'tool',
icon: 'tool-zoom',
label: 'Zoom',
label: i18n.t('Buttons:Zoom'),
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
},
@@ -619,7 +624,7 @@ const toolbarButtons: Button[] = [
props: {
type: 'tool',
icon: 'tool-3d-rotate',
label: '3D Rotate',
label: i18n.t('Buttons:3D Rotate'),
commands: setToolActiveToolbar,
evaluate: {
name: 'evaluate.cornerstoneTool',
@@ -632,7 +637,7 @@ const toolbarButtons: Button[] = [
uiType: 'ohif.toolButton',
props: {
icon: 'tool-capture',
label: 'Capture',
label: i18n.t('Buttons:Capture'),
commands: 'showDownloadViewportModal',
evaluate: [
'evaluate.action',
@@ -658,7 +663,7 @@ const toolbarButtons: Button[] = [
props: {
type: 'tool',
icon: 'tool-crosshair',
label: 'Crosshairs',
label: i18n.t('Buttons:Crosshairs'),
commands: {
commandName: 'setToolActiveToolbar',
commandOptions: {