feat(SM): remove SM measurements from measurement panel (#4022)

This commit is contained in:
Alireza authored and GitHub committed 2024-04-10 13:44:25 -04:00
1 parent 77693ddef4
commit df49a653be
21 files changed
+106 -85

No files matched your search

@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import { Icon, ActionButtons } from '@ohif/ui';
import { useTranslation } from 'react-i18next';
export default function PanelRoiThresholdSegmentation({ servicesManager, commandsManager }) {
const { segmentationService } = servicesManager.services;
const { segmentationService, uiNotificationService } = servicesManager.services;
const { t } = useTranslation('PanelSUVExport');
const [segmentations, setSegmentations] = useState(() => segmentationService.getSegmentations());
@@ -36,6 +36,24 @@ export default function PanelRoiThresholdSegmentation({ servicesManager, command
const tmtvValue = segmentations?.[0]?.cachedStats?.tmtv?.value || null;
const config = segmentations?.[0]?.cachedStats?.tmtv?.config || {};
segmentations.forEach(segmentation => {
const { cachedStats } = segmentation;
if (!cachedStats) {
return;
}
// segment 1
const suvPeak = cachedStats?.['1']?.suvPeak?.suvPeak;
if (Number.isNaN(suvPeak)) {
uiNotificationService.show({
title: 'Unable to calculate SUV Peak',
message: 'The resulting threshold is not big enough.',
type: 'warning',
});
}
});
const actions = [
{
label: 'Export CSV',