fix(viewport): Reset viewport state and fix CINE looping, thumbnail resolution, and dynamic tool settings (#4037)

This commit is contained in:
Alireza authored and GitHub committed 2024-04-16 11:04:48 -04:00
1 parent a6c6fff43a
commit f99a0bfb31
80 files changed
+1129 -801

No files matched your search

+2 -2
View File
@@ -50,7 +50,7 @@ function initDefaultToolGroup(extensionManager, toolGroupService, commandsManage
{ toolName: toolNames.Angle },
{ toolName: toolNames.Magnify },
{ toolName: toolNames.SegmentationDisplay },
{ toolName: toolNames.AdvancedMagnify },
{ toolName: toolNames.UltrasoundDirectional },
{ toolName: toolNames.PlanarFreehandROI },
{ toolName: toolNames.SplineROI },
@@ -59,7 +59,7 @@ function initDefaultToolGroup(extensionManager, toolGroupService, commandsManage
// enabled
enabled: [{ toolName: toolNames.ImageOverlayViewer }],
// disabled
disabled: [{ toolName: toolNames.ReferenceLines }],
disabled: [{ toolName: toolNames.ReferenceLines }, { toolName: toolNames.AdvancedMagnify }],
};
toolGroupService.createToolGroupAndAddTools(toolGroupId, tools);
+4 -11
View File
@@ -11,13 +11,6 @@ const ReferenceLinesListeners: RunCommand = [
},
];
export const toggleEnabledDisabledToolbar = {
commandName: 'toggleEnabledDisabledToolbar',
commandOptions: {
toolGroupIds: ['default', 'mpr', 'SRToolGroup', 'volume3d'],
},
};
const moreTools = [
{
id: 'MoreTools',
@@ -87,7 +80,7 @@ const moreTools = [
icon: 'tool-referenceLines',
label: 'Reference Lines',
tooltip: 'Show Reference Lines',
commands: toggleEnabledDisabledToolbar,
commands: 'toggleEnabledDisabledToolbar',
listeners: {
[ViewportGridService.EVENTS.ACTIVE_VIEWPORT_ID_CHANGED]: ReferenceLinesListeners,
[ViewportGridService.EVENTS.VIEWPORTS_READY]: ReferenceLinesListeners,
@@ -99,7 +92,7 @@ const moreTools = [
icon: 'toggle-dicom-overlay',
label: 'Image Overlay',
tooltip: 'Toggle Image Overlay',
commands: toggleEnabledDisabledToolbar,
commands: 'toggleEnabledDisabledToolbar',
evaluate: 'evaluate.cornerstoneTool.toggle',
}),
createButton({
@@ -178,8 +171,8 @@ const moreTools = [
icon: 'icon-tool-loupe',
label: 'Loupe',
tooltip: 'Loupe',
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
commands: 'toggleActiveDisabledToolbar',
evaluate: 'evaluate.cornerstoneTool.toggle.ifStrictlyDisabled',
}),
createButton({
id: 'UltrasoundDirectionalTool',