feat(ViewportActionMenu): window level per viewport / new patient info / colorbars/ 3D presets and 3D volume rendering (#3963)
Co-authored-by: Joe Boccanfuso <109477394+jbocce@users.noreply.github.com>
This commit is contained in:
1 parent
07301fc020
commit
b7f90e3951
164 files changed
+5887
-932
No files matched your search
@@ -7,29 +7,6 @@ import type { Button } from '@ohif/core/types';
|
||||
const { windowLevelPresets } = defaults;
|
||||
const { createButton } = ToolbarService;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {*} preset - preset number (from above import)
|
||||
* @param {*} title
|
||||
* @param {*} subtitle
|
||||
*/
|
||||
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: {
|
||||
@@ -111,33 +88,15 @@ const toolbarButtons: Button[] = [
|
||||
evaluate: 'evaluate.cornerstoneTool',
|
||||
},
|
||||
},
|
||||
// Window Level + Presets...
|
||||
// Window Level
|
||||
{
|
||||
id: 'WindowLevel',
|
||||
uiType: 'ohif.splitButton',
|
||||
uiType: 'ohif.radioGroup',
|
||||
props: {
|
||||
groupId: 'WindowLevel',
|
||||
primary: createButton({
|
||||
id: 'WindowLevel',
|
||||
icon: 'tool-window-level',
|
||||
label: 'Window Level',
|
||||
tooltip: 'Window Level',
|
||||
commands: setToolActiveToolbar,
|
||||
evaluate: 'evaluate.cornerstoneTool',
|
||||
}),
|
||||
secondary: {
|
||||
icon: 'chevron-down',
|
||||
label: 'W/L Manual',
|
||||
tooltip: 'W/L Presets',
|
||||
},
|
||||
renderer: WindowLevelMenuItem,
|
||||
items: [
|
||||
_createWwwcPreset(1, 'Soft tissue', '400 / 40'),
|
||||
_createWwwcPreset(2, 'Lung', '1500 / -600'),
|
||||
_createWwwcPreset(3, 'Liver', '150 / 90'),
|
||||
_createWwwcPreset(4, 'Bone', '2500 / 480'),
|
||||
_createWwwcPreset(5, 'Brain', '80 / 40'),
|
||||
],
|
||||
icon: 'tool-window-level',
|
||||
label: 'Window Level',
|
||||
commands: setToolActiveToolbar,
|
||||
evaluate: 'evaluate.cornerstoneTool',
|
||||
},
|
||||
},
|
||||
// Pan...
|
||||
|
||||
Reference in new issue
Block a user