fix(annotation): Add command to show pleura percentage in USAnnotationPanel and update condition for BLinePleuraPercentage (#5297)

This commit is contained in:
Alireza 2025-08-05 09:26:52 -04:00 committed by GitHub
parent 4d74611eb1
commit 35bc074a53
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View File

@ -110,6 +110,7 @@ export default function USAnnotationPanel() {
*/
const setShowOverlayCommand = (value: boolean) => {
commandsManager.runCommand('setDisplayFanAnnotation', { value });
commandsManager.runCommand('setShowPleuraPercentage', { value });
setShowOverlay(value);
};
/**

View File

@ -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;