Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
424 changes: 424 additions & 0 deletions extensions/default/src/Toolbar/ToolbarModeSelector.tsx

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions extensions/default/src/Toolbar/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ export * from './ToolRowWrapper';
export * from './ToolBoxWrapper';
export * from './ToolbarDivider';
export * from './ToolbarLayoutSelector';
export { default as ToolbarModeSelector } from './ToolbarModeSelector';
6 changes: 6 additions & 0 deletions extensions/default/src/getToolbarModule.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { utils } from '@ohif/ui-next';

import ToolbarLayoutSelectorWithServices from './Toolbar/ToolbarLayoutSelector';
import ToolbarModeSelectorWithServices from './Toolbar/ToolbarModeSelector';

// legacy
import { ProgressDropdownWithService } from './Components/ProgressDropdownWithService';
Expand Down Expand Up @@ -42,6 +43,11 @@ export default function getToolbarModule({ commandsManager, servicesManager }: w
defaultComponent: props =>
ToolbarLayoutSelectorWithServices({ ...props, commandsManager, servicesManager }),
},
{
name: 'ohif.modeSelector',
defaultComponent: props =>
ToolbarModeSelectorWithServices({ ...props, commandsManager, servicesManager }),
},
{
name: 'ohif.progressDropdown',
defaultComponent: ProgressDropdownWithService,
Expand Down
1 change: 1 addition & 0 deletions modes/basic-dev-mode/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ function modeFactory({ modeConfiguration }) {
'Zoom',
'WindowLevel',
'Pan',
'Mode',
'Layout',
'MoreTools',
]);
Expand Down
7 changes: 7 additions & 0 deletions modes/basic-dev-mode/src/toolbarButtons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,13 @@ const toolbarButtons: Button[] = [
],
},
},
{
id: 'Mode',
uiType: 'ohif.modeSelector',
props: {
evaluate: 'evaluate.action',
},
},
{
id: 'Layout',
uiType: 'ohif.layoutSelector',
Expand Down
1 change: 1 addition & 0 deletions modes/basic-test-mode/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ function modeFactory() {
'WindowLevelGroup',
'Pan',
'Capture',
'Mode',
'Layout',
'MPR',
'Crosshairs',
Expand Down
7 changes: 7 additions & 0 deletions modes/basic-test-mode/src/toolbarButtons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,13 @@ const toolbarButtons: Button[] = [
],
},
},
{
id: 'Mode',
uiType: 'ohif.modeSelector',
props: {
evaluate: 'evaluate.action',
},
},
{
id: 'Layout',
uiType: 'ohif.layoutSelector',
Expand Down
1 change: 1 addition & 0 deletions modes/basic/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ export const toolbarSections = {
'TrackballRotate',
'WindowLevel',
'Capture',
'Mode',
'Layout',
'Crosshairs',
'MoreTools',
Expand Down
7 changes: 7 additions & 0 deletions modes/basic/src/toolbarButtons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -631,6 +631,13 @@ const toolbarButtons: Button[] = [
],
},
},
{
id: 'Mode',
uiType: 'ohif.modeSelector',
props: {
evaluate: 'evaluate.action',
},
},
{
id: 'Layout',
uiType: 'ohif.layoutSelector',
Expand Down
2 changes: 1 addition & 1 deletion modes/preclinical-4d/src/getWorkflowSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function getDefaultButtons({ toolbarService }) {
return [
{
buttonSection: toolbarService.sections.primary,
buttons: ['MeasurementTools', 'Zoom', 'WindowLevel', 'Crosshairs', 'Pan'],
buttons: ['MeasurementTools', 'Zoom', 'Mode', 'WindowLevel', 'Crosshairs', 'Pan'],
},
{
buttonSection: 'MeasurementTools',
Expand Down
7 changes: 7 additions & 0 deletions modes/preclinical-4d/src/toolbarButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,13 @@ const toolbarButtons = [
],
},
},
{
id: 'Mode',
uiType: 'ohif.modeSelector',
props: {
evaluate: 'evaluate.action',
},
},
{
id: 'Layout',
uiType: 'ohif.layoutSelector',
Expand Down
1 change: 1 addition & 0 deletions modes/segmentation/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ function modeFactory({ modeConfiguration }) {
'Zoom',
'TrackballRotate',
'Capture',
'Mode',
'Layout',
'Crosshairs',
'MoreTools',
Expand Down
7 changes: 7 additions & 0 deletions modes/segmentation/src/toolbarButtons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,13 @@ export const toolbarButtons: Button[] = [
],
},
},
{
id: 'Mode',
uiType: 'ohif.modeSelector',
props: {
evaluate: 'evaluate.action',
},
},
{
id: 'Layout',
uiType: 'ohif.layoutSelector',
Expand Down
1 change: 1 addition & 0 deletions modes/tmtv/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ function modeFactory({ modeConfiguration }) {
toolbarService.updateSection(toolbarService.sections.primary, [
'MeasurementTools',
'Zoom',
'Mode',
'Pan',
'WindowLevel',
'Crosshairs',
Expand Down
7 changes: 7 additions & 0 deletions modes/tmtv/src/toolbarButtons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,13 @@ const toolbarButtons = [
evaluate: 'evaluate.cornerstoneTool',
},
},
{
id: 'Mode',
uiType: 'ohif.modeSelector',
props: {
evaluate: 'evaluate.action',
},
},
{
id: 'WindowLevel',
uiType: 'ohif.toolButton',
Expand Down
1 change: 1 addition & 0 deletions modes/usAnnotation/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ function modeFactory({ modeConfiguration }) {
'TrackballRotate',
'WindowLevel',
'Capture',
'Mode',
'Layout',
'Crosshairs',
'MoreTools',
Expand Down
7 changes: 7 additions & 0 deletions modes/usAnnotation/src/toolbarButtons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,13 @@ const toolbarButtons: Button[] = [
],
},
},
{
id: 'Mode',
uiType: 'ohif.modeSelector',
props: {
evaluate: 'evaluate.action',
},
},
{
id: 'Layout',
uiType: 'ohif.layoutSelector',
Expand Down
7 changes: 7 additions & 0 deletions platform/i18n/src/locales/en-US/ToolbarModeSelector.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"Browse modes": "Browse modes",
"Modes": "Modes",
"Loading study metadata for modes…": "Loading study metadata for modes…",
"Current mode": "Current mode",
"Unable to evaluate this mode": "Unable to evaluate this mode"
}
2 changes: 2 additions & 0 deletions platform/i18n/src/locales/en-US/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import WindowLevelActionMenu from './WindowLevelActionMenu.json';
import CaptureViewportModal from './CaptureViewportModal.json';
import Hps from './Hps.json';
import ToolbarLayoutSelector from './ToolbarLayoutSelector.json';
import ToolbarModeSelector from './ToolbarModeSelector.json';
import Tools from './Tools.json';
import Onboarding from './Onboarding.json';
import Colormaps from './Colormaps.json';
Expand Down Expand Up @@ -61,6 +62,7 @@ export default {
CaptureViewportModal,
Hps,
ToolbarLayoutSelector,
ToolbarModeSelector,
Tools,
Onboarding,
Colormaps,
Expand Down
8 changes: 8 additions & 0 deletions platform/i18n/src/locales/fr/ToolbarModeSelector.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"Browse modes": "Browse modes",
"Modes": "Modes",
"Loading study metadata for modes…": "Loading study metadata for modes…",
"Study information unavailable": "Study information unavailable",
Comment thread
greptile-apps[bot] marked this conversation as resolved.
Outdated
"Current mode": "Current mode",
"Unable to evaluate this mode": "Unable to evaluate this mode"
}
2 changes: 2 additions & 0 deletions platform/i18n/src/locales/fr/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import Local from './Local.json';
import ErrorBoundary from './ErrorBoundary.json';
import Hps from './Hps.json';
import ToolbarLayoutSelector from './ToolbarLayoutSelector.json';
import ToolbarModeSelector from './ToolbarModeSelector.json';
import WindowLevelActionMenu from './WindowLevelActionMenu.json';
import CaptureViewportModal from './CaptureViewportModal.json';
import Tools from './Tools.json';
Expand Down Expand Up @@ -56,6 +57,7 @@ export default {
ErrorBoundary,
Hps,
ToolbarLayoutSelector,
ToolbarModeSelector,
WindowLevelActionMenu,
CaptureViewportModal,
Tools,
Expand Down
8 changes: 8 additions & 0 deletions platform/i18n/src/locales/nl/ToolbarModeSelector.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"Browse modes": "Browse modes",
"Modes": "Modi",
"Loading study metadata for modes…": "Loading study metadata for modes…",
"Study information unavailable": "Study information unavailable",
"Current mode": "Current mode",
"Unable to evaluate this mode": "Unable to evaluate this mode"
}
2 changes: 2 additions & 0 deletions platform/i18n/src/locales/nl/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import WindowLevelActionMenu from './WindowLevelActionMenu.json';
import CaptureViewportModal from './CaptureViewportModal.json';
import Hps from './Hps.json';
import ToolbarLayoutSelector from './ToolbarLayoutSelector.json';
import ToolbarModeSelector from './ToolbarModeSelector.json';
import Tools from './Tools.json';
import Onboarding from './Onboarding.json';
import Colormaps from './Colormaps.json';
Expand Down Expand Up @@ -60,6 +61,7 @@ export default {
CaptureViewportModal,
Hps,
ToolbarLayoutSelector,
ToolbarModeSelector,
Tools,
Onboarding,
Colormaps,
Expand Down
8 changes: 8 additions & 0 deletions platform/i18n/src/locales/test-LNG/ToolbarModeSelector.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"Browse modes": "Browse modes",
"Modes": "Modes",
"Loading study metadata for modes…": "Loading study metadata for modes…",
"Study information unavailable": "Study information unavailable",
"Current mode": "Current mode",
"Unable to evaluate this mode": "Unable to evaluate this mode"
}
2 changes: 2 additions & 0 deletions platform/i18n/src/locales/test-LNG/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import CaptureViewportModal from './CaptureViewportModal.json';
import Tools from './Tools.json';
import Hps from './Hps.json';
import ToolbarLayoutSelector from './ToolbarLayoutSelector.json';
import ToolbarModeSelector from './ToolbarModeSelector.json';
import USAnnotationPanel from './USAnnotationPanel.json';

export default {
Expand Down Expand Up @@ -72,6 +73,7 @@ export default {
Tools,
Hps,
ToolbarLayoutSelector,
ToolbarModeSelector,
USAnnotationPanel,
},
};
8 changes: 8 additions & 0 deletions platform/i18n/src/locales/zh/ToolbarModeSelector.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"Browse modes": "Browse modes",
"Modes": "模式",
"Loading study metadata for modes…": "Loading study metadata for modes…",
"Study information unavailable": "Study information unavailable",
"Current mode": "Current mode",
"Unable to evaluate this mode": "Unable to evaluate this mode"
}
2 changes: 2 additions & 0 deletions platform/i18n/src/locales/zh/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import WindowLevelActionMenu from './WindowLevelActionMenu.json';
import CaptureViewportModal from './CaptureViewportModal.json';
import Hps from './Hps.json';
import ToolbarLayoutSelector from './ToolbarLayoutSelector.json';
import ToolbarModeSelector from './ToolbarModeSelector.json';
import Tools from './Tools.json';

export default {
Expand Down Expand Up @@ -52,6 +53,7 @@ export default {
CaptureViewportModal,
Hps,
ToolbarLayoutSelector,
ToolbarModeSelector,
Tools,
},
};
Loading