From 5ef5987d1d15bc1918bdd0f9b16dd5236485114f Mon Sep 17 00:00:00 2001 From: Adithyan Dinesh Date: Mon, 1 Dec 2025 18:58:52 +0530 Subject: [PATCH] Made the right form panel open by default in segmentation mode and handled the evaluate function for segmentation tools --- modes/segmentation/src/index.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modes/segmentation/src/index.tsx b/modes/segmentation/src/index.tsx index 91ebc2f8779..03cc20a7ffc 100644 --- a/modes/segmentation/src/index.tsx +++ b/modes/segmentation/src/index.tsx @@ -115,6 +115,11 @@ function modeFactory({ modeConfiguration }) { 'Shapes', ]); toolbarService.createButtonSection('brushToolsSection', ['Brush', 'Eraser', 'Threshold']); + // Making the 'cornerstone.panelTool' the default/first right panel will automaically + // handle the evaluate functions for segmentation panel tools through the toolbox components. + // But since we changed the order, we need to call this here to handle the evaluate functions. + const sectionToolProps = toolbarService.getButtonPropsInButtonSection('segmentationToolbox'); + sectionToolProps.forEach(props => toolbarService.handleEvaluateNested(props)); customizationService.setCustomizations({ 'panelSegmentation.tableMode': { @@ -195,7 +200,7 @@ function modeFactory({ modeConfiguration }) { props: { leftPanels: [ohif.leftPanel], leftPanelResizable: true, - rightPanels: [cornerstone.panelTool, cornerstone.measurements, gradienthealth.form], + rightPanels: [gradienthealth.form, cornerstone.panelTool, cornerstone.measurements], rightPanelResizable: true, // leftPanelClosed: true, viewports: [