fix(annotation): Add command to show pleura percentage in USAnnotationPanel and update condition for BLinePleuraPercentage (#5297)
This commit is contained in:
parent
4d74611eb1
commit
35bc074a53
@ -110,6 +110,7 @@ export default function USAnnotationPanel() {
|
|||||||
*/
|
*/
|
||||||
const setShowOverlayCommand = (value: boolean) => {
|
const setShowOverlayCommand = (value: boolean) => {
|
||||||
commandsManager.runCommand('setDisplayFanAnnotation', { value });
|
commandsManager.runCommand('setDisplayFanAnnotation', { value });
|
||||||
|
commandsManager.runCommand('setShowPleuraPercentage', { value });
|
||||||
setShowOverlay(value);
|
setShowOverlay(value);
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -3,6 +3,7 @@ import { id } from './id';
|
|||||||
import initToolGroups from './initToolGroups';
|
import initToolGroups from './initToolGroups';
|
||||||
import toolbarButtons from './toolbarButtons';
|
import toolbarButtons from './toolbarButtons';
|
||||||
import { UltrasoundPleuraBLineTool } from '@cornerstonejs/tools';
|
import { UltrasoundPleuraBLineTool } from '@cornerstonejs/tools';
|
||||||
|
import { showPercentage } from '../../../extensions/usAnnotation/src/PleuraBlinePercentage';
|
||||||
|
|
||||||
const ohif = {
|
const ohif = {
|
||||||
layout: '@ohif/extension-default.layoutTemplateModule.viewerLayout',
|
layout: '@ohif/extension-default.layoutTemplateModule.viewerLayout',
|
||||||
@ -237,7 +238,8 @@ function modeFactory({ modeConfiguration }) {
|
|||||||
inheritsFrom: 'ohif.overlayItem',
|
inheritsFrom: 'ohif.overlayItem',
|
||||||
label: '',
|
label: '',
|
||||||
title: 'BLinePleuraPercentage',
|
title: 'BLinePleuraPercentage',
|
||||||
condition: ({ referenceInstance }) => referenceInstance?.Modality.includes('US'),
|
condition: ({ referenceInstance }) =>
|
||||||
|
referenceInstance?.Modality.includes('US') && showPercentage,
|
||||||
contentF: () => {
|
contentF: () => {
|
||||||
const { viewportGridService, toolGroupService, cornerstoneViewportService } =
|
const { viewportGridService, toolGroupService, cornerstoneViewportService } =
|
||||||
servicesManager.services;
|
servicesManager.services;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user