From 35bc074a53bd8c804dba44830145a6633302f11d Mon Sep 17 00:00:00 2001 From: Alireza Date: Tue, 5 Aug 2025 09:26:52 -0400 Subject: [PATCH] fix(annotation): Add command to show pleura percentage in USAnnotationPanel and update condition for BLinePleuraPercentage (#5297) --- extensions/usAnnotation/src/panels/USAnnotationPanel.tsx | 1 + modes/usAnnotation/src/index.ts | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/extensions/usAnnotation/src/panels/USAnnotationPanel.tsx b/extensions/usAnnotation/src/panels/USAnnotationPanel.tsx index 8372d1e1b..a625ec456 100644 --- a/extensions/usAnnotation/src/panels/USAnnotationPanel.tsx +++ b/extensions/usAnnotation/src/panels/USAnnotationPanel.tsx @@ -110,6 +110,7 @@ export default function USAnnotationPanel() { */ const setShowOverlayCommand = (value: boolean) => { commandsManager.runCommand('setDisplayFanAnnotation', { value }); + commandsManager.runCommand('setShowPleuraPercentage', { value }); setShowOverlay(value); }; /** diff --git a/modes/usAnnotation/src/index.ts b/modes/usAnnotation/src/index.ts index e160bfe81..5535373ab 100644 --- a/modes/usAnnotation/src/index.ts +++ b/modes/usAnnotation/src/index.ts @@ -3,6 +3,7 @@ import { id } from './id'; import initToolGroups from './initToolGroups'; import toolbarButtons from './toolbarButtons'; import { UltrasoundPleuraBLineTool } from '@cornerstonejs/tools'; +import { showPercentage } from '../../../extensions/usAnnotation/src/PleuraBlinePercentage'; const ohif = { layout: '@ohif/extension-default.layoutTemplateModule.viewerLayout', @@ -237,7 +238,8 @@ function modeFactory({ modeConfiguration }) { inheritsFrom: 'ohif.overlayItem', label: '', title: 'BLinePleuraPercentage', - condition: ({ referenceInstance }) => referenceInstance?.Modality.includes('US'), + condition: ({ referenceInstance }) => + referenceInstance?.Modality.includes('US') && showPercentage, contentF: () => { const { viewportGridService, toolGroupService, cornerstoneViewportService } = servicesManager.services;