feat(segmentation): Enhanced segmentation panel design for TMTV (#3988)

Co-authored-by: Alireza <ar.sedghi@gmail.com>
This commit is contained in:
IbrahimandAlireza authored and GitHub committed 2024-04-02 23:33:04 -04:00
1 parent e8e209291c
commit 9f3235ff09
51 files changed
+2001 -572

No files matched your search

+8 -2
View File
@@ -119,7 +119,10 @@ const toolbarButtons: Button[] = [
icon: 'tool-3d-rotate',
label: '3D Rotate',
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
evaluate: {
name: 'evaluate.cornerstoneTool',
disabledText: 'Select a 3D viewport to enable this tool',
},
},
},
{
@@ -154,7 +157,10 @@ const toolbarButtons: Button[] = [
toolGroupIds: ['mpr'],
},
},
evaluate: 'evaluate.cornerstoneTool',
evaluate: {
name: 'evaluate.cornerstoneTool',
disabledText: 'Select an MPR viewport to enable this tool',
},
},
},
];
@@ -25,6 +25,7 @@ const toolbarButtons: Button[] = [
evaluate: {
name: 'evaluate.cornerstone.segmentation',
options: { toolNames: ['CircularBrush', 'SphereBrush'] },
disabledText: 'Create new segmentation to enable this tool.',
},
commands: _createSetToolActiveCommands('CircularBrush'),
options: [
@@ -95,7 +96,7 @@ const toolbarButtons: Button[] = [
{
id: 'Threshold',
icon: 'icon-tool-threshold',
label: 'Eraser',
label: 'Threshold Tool',
evaluate: {
name: 'evaluate.cornerstone.segmentation',
options: { toolNames: ['ThresholdCircularBrush', 'ThresholdSphereBrush'] },
+8 -2
View File
@@ -75,7 +75,10 @@ const toolbarButtons: Button[] = [
icon: 'tool-3d-rotate',
label: '3D Rotate',
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
evaluate: {
name: 'evaluate.cornerstoneTool',
disabledText: 'Select a 3D viewport to enable this tool',
},
},
},
{
@@ -110,7 +113,10 @@ const toolbarButtons: Button[] = [
toolGroupIds: ['mpr'],
},
},
evaluate: 'evaluate.cornerstoneTool',
evaluate: {
name: 'evaluate.cornerstoneTool',
disabledText: 'Select an MPR viewport to enable this tool',
},
},
},
{
+1 -1
View File
@@ -89,8 +89,8 @@ function modeFactory({ modeConfiguration }) {
'Crosshairs',
'Pan',
'SyncToggle',
'RectangleROIStartEndThreshold',
]);
toolbarService.createButtonSection('tmtvToolbox', ['RectangleROIStartEndThreshold']);
// For the hanging protocol we need to decide on the window level
// based on whether the SUV is corrected or not, hence we can't hard
+5 -35
View File
@@ -1,42 +1,8 @@
import { defaults, ToolbarService } from '@ohif/core';
import { WindowLevelMenuItem } from '@ohif/ui';
import { toolGroupIds } from './initToolGroups';
const { windowLevelPresets } = defaults;
function _createColormap(label, colormap) {
return {
id: label,
label,
type: 'action',
commands: [
{
commandName: 'setFusionPTColormap',
commandOptions: {
toolGroupId: toolGroupIds.Fusion,
colormap,
},
},
],
};
}
function _createWwwcPreset(preset, title, subtitle) {
return {
id: preset.toString(),
title,
subtitle,
commands: [
{
commandName: 'setWindowLevel',
commandOptions: {
...windowLevelPresets[preset],
},
context: 'CORNERSTONE',
},
],
};
}
const setToolActiveToolbar = {
commandName: 'setToolActiveToolbar',
commandOptions: {
@@ -141,7 +107,11 @@ const toolbarButtons = [
icon: 'tool-create-threshold',
label: 'Rectangle ROI Threshold',
commands: setToolActiveToolbar,
evaluate: 'evaluate.cornerstoneTool',
evaluate: {
name: 'evaluate.cornerstoneTool',
disabledText: 'Select the PT Axial to enable this tool',
},
options: 'tmtv.RectangleROIThresholdOptions',
},
},
];