feat(4D): Add 4D dynamic volume rendering and new pre-clinical 4d pt/ct mode (#3664)
Co-authored-by: Alireza <ar.sedghi@gmail.com> Co-authored-by: Neil <neil.a.macphee@gmail.com>
This commit is contained in:
200 files changed
+9589
-2178
No files matched your search
@@ -1,8 +1,6 @@
|
||||
import type { Button } from '@ohif/core/types';
|
||||
import { defaults, ToolbarService, ViewportGridService } from '@ohif/core';
|
||||
import { WindowLevelMenuItem } from '@ohif/ui';
|
||||
|
||||
const { windowLevelPresets } = defaults;
|
||||
const { createButton } = ToolbarService;
|
||||
|
||||
const ReferenceLinesListeners: RunCommand = [
|
||||
@@ -12,23 +10,6 @@ const ReferenceLinesListeners: RunCommand = [
|
||||
},
|
||||
];
|
||||
|
||||
function _createWwwcPreset(preset, title, subtitle) {
|
||||
return {
|
||||
id: preset.toString(),
|
||||
title,
|
||||
subtitle,
|
||||
commands: [
|
||||
{
|
||||
commandName: 'setWindowLevel',
|
||||
commandOptions: {
|
||||
...windowLevelPresets[preset],
|
||||
},
|
||||
context: 'CORNERSTONE',
|
||||
},
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
export const setToolActiveToolbar = {
|
||||
commandName: 'setToolActiveToolbar',
|
||||
commandOptions: {
|
||||
@@ -36,6 +17,20 @@ export const setToolActiveToolbar = {
|
||||
},
|
||||
};
|
||||
|
||||
export const toggleEnabledDisabledToolbar = {
|
||||
commandName: 'toggleEnabledDisabledToolbar',
|
||||
commandOptions: {
|
||||
toolGroupIds: ['default', 'mpr', 'SRToolGroup'],
|
||||
},
|
||||
};
|
||||
|
||||
export const toggleActiveDisabledToolbar = {
|
||||
commandName: 'toggleActiveDisabledToolbar',
|
||||
commandOptions: {
|
||||
toolGroupIds: ['default', 'mpr', 'SRToolGroup'],
|
||||
},
|
||||
};
|
||||
|
||||
const toolbarButtons: Button[] = [
|
||||
{
|
||||
id: 'Zoom',
|
||||
@@ -168,13 +163,7 @@ const toolbarButtons: Button[] = [
|
||||
icon: 'tool-referenceLines',
|
||||
label: 'Reference Lines',
|
||||
tooltip: 'Show Reference Lines',
|
||||
commands: {
|
||||
commandName: 'setToolEnabled',
|
||||
commandOptions: {
|
||||
toolName: 'ReferenceLines',
|
||||
toggle: true, // Toggle the tool on/off upon click
|
||||
},
|
||||
},
|
||||
commands: toggleEnabledDisabledToolbar,
|
||||
listeners: {
|
||||
[ViewportGridService.EVENTS.ACTIVE_VIEWPORT_ID_CHANGED]: ReferenceLinesListeners,
|
||||
[ViewportGridService.EVENTS.VIEWPORTS_READY]: ReferenceLinesListeners,
|
||||
@@ -182,17 +171,11 @@ const toolbarButtons: Button[] = [
|
||||
evaluate: 'evaluate.cornerstoneTool.toggle',
|
||||
}),
|
||||
createButton({
|
||||
id: 'ImageOverlay',
|
||||
id: 'ImageOverlayViewer',
|
||||
icon: 'toggle-dicom-overlay',
|
||||
label: 'Image Overlay',
|
||||
tooltip: 'Toggle Image Overlay',
|
||||
commands: {
|
||||
commandName: 'setToolEnabled',
|
||||
commandOptions: {
|
||||
toolName: 'ImageOverlayViewer',
|
||||
toggle: true, // Toggle the tool on/off upon click
|
||||
},
|
||||
},
|
||||
commands: toggleEnabledDisabledToolbar,
|
||||
evaluate: 'evaluate.cornerstoneTool.toggle',
|
||||
}),
|
||||
createButton({
|
||||
@@ -271,7 +254,7 @@ const toolbarButtons: Button[] = [
|
||||
icon: 'icon-tool-loupe',
|
||||
label: 'Loupe',
|
||||
tooltip: 'Loupe',
|
||||
commands: setToolActiveToolbar,
|
||||
commands: toggleActiveDisabledToolbar,
|
||||
evaluate: 'evaluate.cornerstoneTool',
|
||||
}),
|
||||
createButton({
|
||||
|
||||
Reference in new issue
Block a user