feat(SM): remove SM measurements from measurement panel (#4022)
This commit is contained in:
parent
77693ddef4
commit
df49a653be
25
.codecov.yml
25
.codecov.yml
@ -1,25 +0,0 @@
|
|||||||
# ABOUT:
|
|
||||||
# https://docs.codecov.io/docs/codecov-yaml
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# COMMIT STATUS:
|
|
||||||
# https://docs.codecov.io/docs/commit-status
|
|
||||||
coverage:
|
|
||||||
status:
|
|
||||||
project:
|
|
||||||
default:
|
|
||||||
threshold: 0.5%
|
|
||||||
core:
|
|
||||||
flags: core
|
|
||||||
threshold: 0.5%
|
|
||||||
viewer:
|
|
||||||
flags: viewer
|
|
||||||
threshold: 0.5%
|
|
||||||
patch: off
|
|
||||||
flags:
|
|
||||||
core:
|
|
||||||
paths:
|
|
||||||
- platform/core
|
|
||||||
viewer:
|
|
||||||
paths:
|
|
||||||
- platform/app
|
|
||||||
@ -46,8 +46,8 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.20.13",
|
"@babel/runtime": "^7.20.13",
|
||||||
"@cornerstonejs/adapters": "^1.70.0",
|
"@cornerstonejs/adapters": "^1.70.5",
|
||||||
"@cornerstonejs/core": "^1.70.0",
|
"@cornerstonejs/core": "^1.70.5",
|
||||||
"@kitware/vtk.js": "30.3.1",
|
"@kitware/vtk.js": "30.3.1",
|
||||||
"react-color": "^2.19.3"
|
"react-color": "^2.19.3"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -46,9 +46,9 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.20.13",
|
"@babel/runtime": "^7.20.13",
|
||||||
"@cornerstonejs/adapters": "^1.70.0",
|
"@cornerstonejs/adapters": "^1.70.5",
|
||||||
"@cornerstonejs/core": "^1.70.0",
|
"@cornerstonejs/core": "^1.70.5",
|
||||||
"@cornerstonejs/tools": "^1.70.0",
|
"@cornerstonejs/tools": "^1.70.5",
|
||||||
"classnames": "^2.3.2"
|
"classnames": "^2.3.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -42,9 +42,9 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.20.13",
|
"@babel/runtime": "^7.20.13",
|
||||||
"@cornerstonejs/core": "^1.70.0",
|
"@cornerstonejs/core": "^1.70.5",
|
||||||
"@cornerstonejs/streaming-image-volume-loader": "^1.70.0",
|
"@cornerstonejs/streaming-image-volume-loader": "^1.70.5",
|
||||||
"@cornerstonejs/tools": "^1.70.0",
|
"@cornerstonejs/tools": "^1.70.5",
|
||||||
"classnames": "^2.3.2"
|
"classnames": "^2.3.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -38,7 +38,7 @@
|
|||||||
"@cornerstonejs/codec-libjpeg-turbo-8bit": "^1.2.2",
|
"@cornerstonejs/codec-libjpeg-turbo-8bit": "^1.2.2",
|
||||||
"@cornerstonejs/codec-openjpeg": "^1.2.2",
|
"@cornerstonejs/codec-openjpeg": "^1.2.2",
|
||||||
"@cornerstonejs/codec-openjph": "^2.4.2",
|
"@cornerstonejs/codec-openjph": "^2.4.2",
|
||||||
"@cornerstonejs/dicom-image-loader": "^1.70.0",
|
"@cornerstonejs/dicom-image-loader": "^1.70.5",
|
||||||
"@icr/polyseg-wasm": "^0.4.0",
|
"@icr/polyseg-wasm": "^0.4.0",
|
||||||
"@ohif/core": "3.8.0-beta.78",
|
"@ohif/core": "3.8.0-beta.78",
|
||||||
"@ohif/ui": "3.8.0-beta.78",
|
"@ohif/ui": "3.8.0-beta.78",
|
||||||
@ -55,10 +55,10 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.20.13",
|
"@babel/runtime": "^7.20.13",
|
||||||
"@cornerstonejs/adapters": "^1.70.0",
|
"@cornerstonejs/adapters": "^1.70.5",
|
||||||
"@cornerstonejs/core": "^1.70.0",
|
"@cornerstonejs/core": "^1.70.5",
|
||||||
"@cornerstonejs/streaming-image-volume-loader": "^1.70.0",
|
"@cornerstonejs/streaming-image-volume-loader": "^1.70.5",
|
||||||
"@cornerstonejs/tools": "^1.70.0",
|
"@cornerstonejs/tools": "^1.70.5",
|
||||||
"@icr/polyseg-wasm": "^0.4.0",
|
"@icr/polyseg-wasm": "^0.4.0",
|
||||||
"@kitware/vtk.js": "30.3.1",
|
"@kitware/vtk.js": "30.3.1",
|
||||||
"html2canvas": "^1.4.1",
|
"html2canvas": "^1.4.1",
|
||||||
|
|||||||
@ -10,7 +10,7 @@ import {
|
|||||||
utilities as csUtils,
|
utilities as csUtils,
|
||||||
} from '@cornerstonejs/core';
|
} from '@cornerstonejs/core';
|
||||||
import { MeasurementService } from '@ohif/core';
|
import { MeasurementService } from '@ohif/core';
|
||||||
import { Notification, useViewportDialog, Types as UITypes, AllInOneMenu } from '@ohif/ui';
|
import { Notification, useViewportDialog, AllInOneMenu } from '@ohif/ui';
|
||||||
import { IStackViewport, IVolumeViewport } from '@cornerstonejs/core/dist/esm/types';
|
import { IStackViewport, IVolumeViewport } from '@cornerstonejs/core/dist/esm/types';
|
||||||
|
|
||||||
import { setEnabledElement } from '../state';
|
import { setEnabledElement } from '../state';
|
||||||
@ -114,7 +114,6 @@ const OHIFCornerstoneViewport = React.memo(props => {
|
|||||||
// of the imageData in the OHIFCornerstoneViewport. This prop is used
|
// of the imageData in the OHIFCornerstoneViewport. This prop is used
|
||||||
// to set the initial state of the viewport's first image to render
|
// to set the initial state of the viewport's first image to render
|
||||||
initialImageIndex,
|
initialImageIndex,
|
||||||
onReady,
|
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
const viewportId = viewportOptions.viewportId;
|
const viewportId = viewportOptions.viewportId;
|
||||||
@ -142,7 +141,6 @@ const OHIFCornerstoneViewport = React.memo(props => {
|
|||||||
viewportGridService,
|
viewportGridService,
|
||||||
stateSyncService,
|
stateSyncService,
|
||||||
viewportActionCornersService,
|
viewportActionCornersService,
|
||||||
customizationService,
|
|
||||||
} = servicesManager.services as CornerstoneServices;
|
} = servicesManager.services as CornerstoneServices;
|
||||||
|
|
||||||
const [viewportDialogState] = useViewportDialog();
|
const [viewportDialogState] = useViewportDialog();
|
||||||
@ -203,7 +201,6 @@ const OHIFCornerstoneViewport = React.memo(props => {
|
|||||||
|
|
||||||
if (onElementEnabled) {
|
if (onElementEnabled) {
|
||||||
onElementEnabled(evt);
|
onElementEnabled(evt);
|
||||||
onReady?.(evt);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[viewportId, onElementEnabled, toolGroupService]
|
[viewportId, onElementEnabled, toolGroupService]
|
||||||
|
|||||||
@ -275,16 +275,16 @@ function commandsModule({
|
|||||||
|
|
||||||
actions.setViewportWindowLevel({ ...props, viewportId });
|
actions.setViewportWindowLevel({ ...props, viewportId });
|
||||||
},
|
},
|
||||||
setToolEnabled: ({ toolName, toggle }) => {
|
setToolEnabled: ({ toolName, toggle, toolGroupId }) => {
|
||||||
const { viewports } = viewportGridService.getState();
|
const { viewports } = viewportGridService.getState();
|
||||||
|
|
||||||
if (!viewports.size) {
|
if (!viewports.size) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const toolGroup = toolGroupService.getToolGroup(null);
|
const toolGroup = toolGroupService.getToolGroup(toolGroupId ?? null);
|
||||||
|
|
||||||
if (!toolGroup) {
|
if (!toolGroup || !toolGroup.hasTool(toolName)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -293,6 +293,8 @@ function commandsModule({
|
|||||||
// Toggle the tool's state only if the toggle is true
|
// Toggle the tool's state only if the toggle is true
|
||||||
if (toggle) {
|
if (toggle) {
|
||||||
toolIsEnabled ? toolGroup.setToolDisabled(toolName) : toolGroup.setToolEnabled(toolName);
|
toolIsEnabled ? toolGroup.setToolDisabled(toolName) : toolGroup.setToolEnabled(toolName);
|
||||||
|
} else {
|
||||||
|
toolGroup.setToolEnabled(toolName);
|
||||||
}
|
}
|
||||||
|
|
||||||
const renderingEngine = cornerstoneViewportService.getRenderingEngine();
|
const renderingEngine = cornerstoneViewportService.getRenderingEngine();
|
||||||
|
|||||||
@ -15,7 +15,6 @@ import {
|
|||||||
utilities as csUtilities,
|
utilities as csUtilities,
|
||||||
Enums as csEnums,
|
Enums as csEnums,
|
||||||
} from '@cornerstonejs/core';
|
} from '@cornerstonejs/core';
|
||||||
import { utilities } from '@cornerstonejs/tools';
|
|
||||||
import {
|
import {
|
||||||
cornerstoneStreamingImageVolumeLoader,
|
cornerstoneStreamingImageVolumeLoader,
|
||||||
cornerstoneStreamingDynamicImageVolumeLoader,
|
cornerstoneStreamingDynamicImageVolumeLoader,
|
||||||
|
|||||||
@ -35,6 +35,7 @@ import {
|
|||||||
PlanarFreehandROITool,
|
PlanarFreehandROITool,
|
||||||
SplineROITool,
|
SplineROITool,
|
||||||
LivewireContourTool,
|
LivewireContourTool,
|
||||||
|
OrientationMarkerTool,
|
||||||
} from '@cornerstonejs/tools';
|
} from '@cornerstonejs/tools';
|
||||||
|
|
||||||
import CalibrationLineTool from './tools/CalibrationLineTool';
|
import CalibrationLineTool from './tools/CalibrationLineTool';
|
||||||
@ -80,6 +81,7 @@ export default function initCornerstoneTools(configuration = {}) {
|
|||||||
addTool(PlanarFreehandROITool);
|
addTool(PlanarFreehandROITool);
|
||||||
addTool(SplineROITool);
|
addTool(SplineROITool);
|
||||||
addTool(LivewireContourTool);
|
addTool(LivewireContourTool);
|
||||||
|
addTool(OrientationMarkerTool);
|
||||||
|
|
||||||
// Modify annotation tools to use dashed lines on SR
|
// Modify annotation tools to use dashed lines on SR
|
||||||
const annotationStyle = {
|
const annotationStyle = {
|
||||||
@ -132,6 +134,7 @@ const toolNames = {
|
|||||||
SplineROI: SplineROITool.toolName,
|
SplineROI: SplineROITool.toolName,
|
||||||
LivewireContour: LivewireContourTool.toolName,
|
LivewireContour: LivewireContourTool.toolName,
|
||||||
PlanarFreehandROI: PlanarFreehandROITool.toolName,
|
PlanarFreehandROI: PlanarFreehandROITool.toolName,
|
||||||
|
OrientationMarker: OrientationMarkerTool.toolName,
|
||||||
};
|
};
|
||||||
|
|
||||||
export { toolNames };
|
export { toolNames };
|
||||||
|
|||||||
@ -1,11 +1,10 @@
|
|||||||
import React, { useState, useEffect } from 'react';
|
import React, { useState, useEffect } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { ServicesManager, ExtensionManager, CommandsManager, DicomMetadataStore } from '@ohif/core';
|
import { ServicesManager, ExtensionManager, CommandsManager, DicomMetadataStore } from '@ohif/core';
|
||||||
import { MeasurementTable, Icon, ButtonGroup, Button } from '@ohif/ui';
|
import { MeasurementTable } from '@ohif/ui';
|
||||||
import { withTranslation, WithTranslation } from 'react-i18next';
|
import { withTranslation, WithTranslation } from 'react-i18next';
|
||||||
import { EVENTS as MicroscopyEvents } from '../../services/MicroscopyService';
|
import { EVENTS as MicroscopyEvents } from '../../services/MicroscopyService';
|
||||||
import dcmjs from 'dcmjs';
|
import dcmjs from 'dcmjs';
|
||||||
import styles from '../../utils/styles';
|
|
||||||
import callInputDialog from '../../utils/callInputDialog';
|
import callInputDialog from '../../utils/callInputDialog';
|
||||||
import constructSR from '../../utils/constructSR';
|
import constructSR from '../../utils/constructSR';
|
||||||
import { saveByteArray } from '../../utils/saveByteArray';
|
import { saveByteArray } from '../../utils/saveByteArray';
|
||||||
@ -286,6 +285,11 @@ function MicroscopyPanel(props: IMicroscopyPanelProps) {
|
|||||||
props.commandsManager.runCommand('setLabel', { uid }, 'MICROSCOPY');
|
props.commandsManager.runCommand('setLabel', { uid }, 'MICROSCOPY');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const onMeasurementDeleteHandler = ({ uid, isActive }: { uid: string; isActive: boolean }) => {
|
||||||
|
const roiAnnotation = microscopyService.getAnnotation(uid);
|
||||||
|
microscopyService.removeAnnotation(roiAnnotation);
|
||||||
|
};
|
||||||
|
|
||||||
// Convert ROI annotations managed by microscopyService into our
|
// Convert ROI annotations managed by microscopyService into our
|
||||||
// own format for display
|
// own format for display
|
||||||
const data = roiAnnotations.map((roiAnnotation, index) => {
|
const data = roiAnnotations.map((roiAnnotation, index) => {
|
||||||
@ -322,8 +326,6 @@ function MicroscopyPanel(props: IMicroscopyPanelProps) {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
const disabled = data.length === 0;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div
|
<div
|
||||||
@ -336,6 +338,7 @@ function MicroscopyPanel(props: IMicroscopyPanelProps) {
|
|||||||
data={data}
|
data={data}
|
||||||
onClick={onMeasurementItemClickHandler}
|
onClick={onMeasurementItemClickHandler}
|
||||||
onEdit={onMeasurementItemEditHandler}
|
onEdit={onMeasurementItemEditHandler}
|
||||||
|
onDelete={onMeasurementDeleteHandler}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@ -32,8 +32,8 @@
|
|||||||
"start": "yarn run dev"
|
"start": "yarn run dev"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@cornerstonejs/core": "^1.70.0",
|
"@cornerstonejs/core": "^1.70.5",
|
||||||
"@cornerstonejs/tools": "^1.70.0",
|
"@cornerstonejs/tools": "^1.70.5",
|
||||||
"@ohif/core": "3.8.0-beta.78",
|
"@ohif/core": "3.8.0-beta.78",
|
||||||
"@ohif/extension-cornerstone-dicom-sr": "3.8.0-beta.78",
|
"@ohif/extension-cornerstone-dicom-sr": "3.8.0-beta.78",
|
||||||
"@ohif/ui": "3.8.0-beta.78",
|
"@ohif/ui": "3.8.0-beta.78",
|
||||||
|
|||||||
@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
|
|||||||
import { Icon, ActionButtons } from '@ohif/ui';
|
import { Icon, ActionButtons } from '@ohif/ui';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
export default function PanelRoiThresholdSegmentation({ servicesManager, commandsManager }) {
|
export default function PanelRoiThresholdSegmentation({ servicesManager, commandsManager }) {
|
||||||
const { segmentationService } = servicesManager.services;
|
const { segmentationService, uiNotificationService } = servicesManager.services;
|
||||||
const { t } = useTranslation('PanelSUVExport');
|
const { t } = useTranslation('PanelSUVExport');
|
||||||
|
|
||||||
const [segmentations, setSegmentations] = useState(() => segmentationService.getSegmentations());
|
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 tmtvValue = segmentations?.[0]?.cachedStats?.tmtv?.value || null;
|
||||||
const config = segmentations?.[0]?.cachedStats?.tmtv?.config || {};
|
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 = [
|
const actions = [
|
||||||
{
|
{
|
||||||
label: 'Export CSV',
|
label: 'Export CSV',
|
||||||
|
|||||||
@ -53,6 +53,7 @@ function modeFactory({ modeConfiguration }) {
|
|||||||
customizationService,
|
customizationService,
|
||||||
hangingProtocolService,
|
hangingProtocolService,
|
||||||
displaySetService,
|
displaySetService,
|
||||||
|
viewportGridService,
|
||||||
} = servicesManager.services;
|
} = servicesManager.services;
|
||||||
|
|
||||||
const utilityModule = extensionManager.getModuleEntry(
|
const utilityModule = extensionManager.getModuleEntry(
|
||||||
@ -111,6 +112,19 @@ function modeFactory({ modeConfiguration }) {
|
|||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
// This is a hack and we need to find a better way to enable
|
||||||
|
// some tools that require the viewport to be ready
|
||||||
|
const { unsubscribe: unsub1 } = viewportGridService.subscribe(
|
||||||
|
viewportGridService.EVENTS.VIEWPORTS_READY,
|
||||||
|
() => {
|
||||||
|
commandsManager.run('setToolEnabled', {
|
||||||
|
toolName: 'OrientationMarker',
|
||||||
|
toolGroupId: 'mipToolGroup',
|
||||||
|
});
|
||||||
|
unsub1();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
// For the hanging protocol we need to decide on the window level
|
// For the hanging protocol we need to decide on the window level
|
||||||
// based on whether the SUV is corrected or not, hence we can't hard
|
// based on whether the SUV is corrected or not, hence we can't hard
|
||||||
// code the window level in the hanging protocol but we add a custom
|
// code the window level in the hanging protocol but we add a custom
|
||||||
|
|||||||
@ -102,7 +102,17 @@ function _initToolGroups(toolNames, Enums, toolGroupService, commandsManager, mo
|
|||||||
bindings: [{ mouseButton: Enums.MouseBindings.Primary }],
|
bindings: [{ mouseButton: Enums.MouseBindings.Primary }],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
enabled: [{ toolName: toolNames.SegmentationDisplay }],
|
enabled: [
|
||||||
|
{ toolName: toolNames.SegmentationDisplay },
|
||||||
|
{
|
||||||
|
toolName: toolNames.OrientationMarker,
|
||||||
|
configuration: {
|
||||||
|
orientationWidget: {
|
||||||
|
viewportCorner: 'BOTTOM_LEFT',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
toolGroupService.createToolGroupAndAddTools(toolGroupIds.MIP, mipTools);
|
toolGroupService.createToolGroupAndAddTools(toolGroupIds.MIP, mipTools);
|
||||||
|
|||||||
@ -54,7 +54,7 @@
|
|||||||
"@cornerstonejs/codec-libjpeg-turbo-8bit": "^1.2.2",
|
"@cornerstonejs/codec-libjpeg-turbo-8bit": "^1.2.2",
|
||||||
"@cornerstonejs/codec-openjpeg": "^1.2.2",
|
"@cornerstonejs/codec-openjpeg": "^1.2.2",
|
||||||
"@cornerstonejs/codec-openjph": "^2.4.5",
|
"@cornerstonejs/codec-openjph": "^2.4.5",
|
||||||
"@cornerstonejs/dicom-image-loader": "^1.70.0",
|
"@cornerstonejs/dicom-image-loader": "^1.70.5",
|
||||||
"@emotion/serialize": "^1.1.3",
|
"@emotion/serialize": "^1.1.3",
|
||||||
"@ohif/core": "3.8.0-beta.78",
|
"@ohif/core": "3.8.0-beta.78",
|
||||||
"@ohif/extension-cornerstone": "3.8.0-beta.78",
|
"@ohif/extension-cornerstone": "3.8.0-beta.78",
|
||||||
|
|||||||
@ -340,7 +340,7 @@ function ViewerViewportGrid(props) {
|
|||||||
viewportOptions={viewportOptions}
|
viewportOptions={viewportOptions}
|
||||||
displaySetOptions={displaySetOptions}
|
displaySetOptions={displaySetOptions}
|
||||||
needsRerendering={displaySetsNeedsRerendering}
|
needsRerendering={displaySetsNeedsRerendering}
|
||||||
onReady={() => {
|
onElementEnabled={() => {
|
||||||
viewportGridService.setViewportIsReady(viewportId, true);
|
viewportGridService.setViewportIsReady(viewportId, true);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@ -37,7 +37,7 @@
|
|||||||
"@cornerstonejs/codec-libjpeg-turbo-8bit": "^1.2.2",
|
"@cornerstonejs/codec-libjpeg-turbo-8bit": "^1.2.2",
|
||||||
"@cornerstonejs/codec-openjpeg": "^1.2.2",
|
"@cornerstonejs/codec-openjpeg": "^1.2.2",
|
||||||
"@cornerstonejs/codec-openjph": "^2.4.2",
|
"@cornerstonejs/codec-openjph": "^2.4.2",
|
||||||
"@cornerstonejs/dicom-image-loader": "^1.70.0",
|
"@cornerstonejs/dicom-image-loader": "^1.70.5",
|
||||||
"@ohif/ui": "3.8.0-beta.78",
|
"@ohif/ui": "3.8.0-beta.78",
|
||||||
"cornerstone-math": "0.1.9",
|
"cornerstone-math": "0.1.9",
|
||||||
"dicom-parser": "^1.8.21"
|
"dicom-parser": "^1.8.21"
|
||||||
|
|||||||
@ -2,11 +2,10 @@ import React from 'react';
|
|||||||
import { ServicesManager } from '@ohif/core';
|
import { ServicesManager } from '@ohif/core';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { annotation as CsAnnotation } from '@cornerstonejs/tools';
|
|
||||||
|
|
||||||
import MeasurementItem from './MeasurementItem';
|
import MeasurementItem from './MeasurementItem';
|
||||||
|
|
||||||
const MeasurementTable = ({ data, title, onClick, onEdit, servicesManager }) => {
|
const MeasurementTable = ({ data, title, onClick, onEdit, onDelete, servicesManager }) => {
|
||||||
servicesManager = servicesManager as ServicesManager;
|
servicesManager = servicesManager as ServicesManager;
|
||||||
const { customizationService, measurementService } = servicesManager.services;
|
const { customizationService, measurementService } = servicesManager.services;
|
||||||
const { t } = useTranslation('MeasurementTable');
|
const { t } = useTranslation('MeasurementTable');
|
||||||
@ -20,6 +19,7 @@ const MeasurementTable = ({ data, title, onClick, onEdit, servicesManager }) =>
|
|||||||
|
|
||||||
const onMeasurementDeleteHandler = ({ uid }) => {
|
const onMeasurementDeleteHandler = ({ uid }) => {
|
||||||
const measurement = measurementService.getMeasurement(uid);
|
const measurement = measurementService.getMeasurement(uid);
|
||||||
|
onDelete?.({ uid });
|
||||||
measurementService.remove(
|
measurementService.remove(
|
||||||
uid,
|
uid,
|
||||||
{
|
{
|
||||||
|
|||||||
@ -189,6 +189,7 @@ export {
|
|||||||
ViewportOverlay,
|
ViewportOverlay,
|
||||||
WindowLevel,
|
WindowLevel,
|
||||||
WindowLevelMenuItem,
|
WindowLevelMenuItem,
|
||||||
|
MeasurementItem,
|
||||||
InputDoubleRange,
|
InputDoubleRange,
|
||||||
LabellingFlow,
|
LabellingFlow,
|
||||||
HeaderPatientInfo,
|
HeaderPatientInfo,
|
||||||
@ -197,5 +198,4 @@ export {
|
|||||||
ToolSettings,
|
ToolSettings,
|
||||||
Toolbox,
|
Toolbox,
|
||||||
InvestigationalUseDialog,
|
InvestigationalUseDialog,
|
||||||
MeasurementItem,
|
|
||||||
};
|
};
|
||||||
|
|||||||
@ -125,12 +125,12 @@ export {
|
|||||||
WindowLevelMenuItem,
|
WindowLevelMenuItem,
|
||||||
ImageScrollbar,
|
ImageScrollbar,
|
||||||
ViewportOverlay,
|
ViewportOverlay,
|
||||||
|
MeasurementItem,
|
||||||
LabellingFlow,
|
LabellingFlow,
|
||||||
HeaderPatientInfo,
|
HeaderPatientInfo,
|
||||||
ToolSettings,
|
ToolSettings,
|
||||||
Toolbox,
|
Toolbox,
|
||||||
InvestigationalUseDialog,
|
InvestigationalUseDialog,
|
||||||
MeasurementItem,
|
|
||||||
LayoutPreset,
|
LayoutPreset,
|
||||||
} from './components';
|
} from './components';
|
||||||
|
|
||||||
|
|||||||
48
yarn.lock
48
yarn.lock
@ -1568,13 +1568,13 @@
|
|||||||
resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9"
|
resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9"
|
||||||
integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==
|
integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==
|
||||||
|
|
||||||
"@cornerstonejs/adapters@^1.70.0":
|
"@cornerstonejs/adapters@^1.70.5":
|
||||||
version "1.70.0"
|
version "1.70.5"
|
||||||
resolved "https://registry.yarnpkg.com/@cornerstonejs/adapters/-/adapters-1.70.0.tgz#e824bc193e4bbcdc33036b9c6aa41a3742cfe469"
|
resolved "https://registry.yarnpkg.com/@cornerstonejs/adapters/-/adapters-1.70.5.tgz#aa1e706a18b1e5d597b1b95bac928ee85b400a33"
|
||||||
integrity sha512-Eny4vsutkPo9WMQ+i8h5XxCaSqgg9SEj6nizsygDrYZGpJUmTVjJyTkMfSsO0AuiFRwgaWP+rmnF2323YfHtYA==
|
integrity sha512-Jmxqz8crNx37jSBmlsfAKxKHi4wj0vICPzvCQ3c5F4+rSaEswD3JefHfzrNCk1xMaAGE7hkA7szWNDVCoovDBQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@babel/runtime-corejs2" "^7.17.8"
|
"@babel/runtime-corejs2" "^7.17.8"
|
||||||
"@cornerstonejs/tools" "^1.70.0"
|
"@cornerstonejs/tools" "^1.70.5"
|
||||||
buffer "^6.0.3"
|
buffer "^6.0.3"
|
||||||
dcmjs "^0.29.8"
|
dcmjs "^0.29.8"
|
||||||
gl-matrix "^3.4.3"
|
gl-matrix "^3.4.3"
|
||||||
@ -1621,10 +1621,10 @@
|
|||||||
resolved "https://registry.yarnpkg.com/@cornerstonejs/codec-openjph/-/codec-openjph-2.4.5.tgz#8690b61a86fa53ef38a70eee9d665a79229517c0"
|
resolved "https://registry.yarnpkg.com/@cornerstonejs/codec-openjph/-/codec-openjph-2.4.5.tgz#8690b61a86fa53ef38a70eee9d665a79229517c0"
|
||||||
integrity sha512-MZCUy8VG0VG5Nl1l58+g+kH3LujAzLYTfJqkwpWI2gjSrGXnP6lgwyy4GmPRZWVoS40/B1LDNALK905cNWm+sg==
|
integrity sha512-MZCUy8VG0VG5Nl1l58+g+kH3LujAzLYTfJqkwpWI2gjSrGXnP6lgwyy4GmPRZWVoS40/B1LDNALK905cNWm+sg==
|
||||||
|
|
||||||
"@cornerstonejs/core@^1.70.0":
|
"@cornerstonejs/core@^1.70.5":
|
||||||
version "1.70.0"
|
version "1.70.5"
|
||||||
resolved "https://registry.yarnpkg.com/@cornerstonejs/core/-/core-1.70.0.tgz#e4ae043fe720caff26320de44b41b1d5d1bfd884"
|
resolved "https://registry.yarnpkg.com/@cornerstonejs/core/-/core-1.70.5.tgz#4667c018a22f06e83548d230c55a4c8d6b6630ea"
|
||||||
integrity sha512-tmSY9SPy6VnRYgMSWikDG1Wy4bF0Vg8F/7TfsviA18sKFr9ABlL7MS+fvU9L1e6/6oC7G+wGzBMFvx+krWDt8g==
|
integrity sha512-cqSRLA3V6C1MAQ+S5EQoNdxuTG0c/c8bULZ9XKiZYd9YIY26wDsboDJ9a+vzJWNxw9ZFDW0H0F+zJsIu64a3ig==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@kitware/vtk.js" "30.3.1"
|
"@kitware/vtk.js" "30.3.1"
|
||||||
comlink "^4.4.1"
|
comlink "^4.4.1"
|
||||||
@ -1632,34 +1632,34 @@
|
|||||||
gl-matrix "^3.4.3"
|
gl-matrix "^3.4.3"
|
||||||
lodash.clonedeep "4.5.0"
|
lodash.clonedeep "4.5.0"
|
||||||
|
|
||||||
"@cornerstonejs/dicom-image-loader@^1.70.0":
|
"@cornerstonejs/dicom-image-loader@^1.70.5":
|
||||||
version "1.70.0"
|
version "1.70.5"
|
||||||
resolved "https://registry.yarnpkg.com/@cornerstonejs/dicom-image-loader/-/dicom-image-loader-1.70.0.tgz#c2f51b942b526254197edc86b3c5201bd24c5752"
|
resolved "https://registry.yarnpkg.com/@cornerstonejs/dicom-image-loader/-/dicom-image-loader-1.70.5.tgz#6d41e3ee1df8ba659bb5bc69f660b421cd38d0ad"
|
||||||
integrity sha512-szV0IdeQ2MdYL30xq5dpCp8tfi+vXjOP3qtKI4ZbNQicuYGTuIxIQYTsHgBdqv2tyC1H7wuIIANv4XbHYbQTyA==
|
integrity sha512-j8kNnzv5bE2A8jVEXdDFY1ZXoowNGRRAFCO1FlO0aU7yA3YwRXNAeAerJCRJROxl6E//Bsj2WbjRd+mPXE4JVg==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@cornerstonejs/codec-charls" "^1.2.3"
|
"@cornerstonejs/codec-charls" "^1.2.3"
|
||||||
"@cornerstonejs/codec-libjpeg-turbo-8bit" "^1.2.2"
|
"@cornerstonejs/codec-libjpeg-turbo-8bit" "^1.2.2"
|
||||||
"@cornerstonejs/codec-openjpeg" "^1.2.2"
|
"@cornerstonejs/codec-openjpeg" "^1.2.2"
|
||||||
"@cornerstonejs/codec-openjph" "^2.4.5"
|
"@cornerstonejs/codec-openjph" "^2.4.5"
|
||||||
"@cornerstonejs/core" "^1.70.0"
|
"@cornerstonejs/core" "^1.70.5"
|
||||||
dicom-parser "^1.8.9"
|
dicom-parser "^1.8.9"
|
||||||
pako "^2.0.4"
|
pako "^2.0.4"
|
||||||
uuid "^9.0.0"
|
uuid "^9.0.0"
|
||||||
|
|
||||||
"@cornerstonejs/streaming-image-volume-loader@^1.70.0":
|
"@cornerstonejs/streaming-image-volume-loader@^1.70.5":
|
||||||
version "1.70.0"
|
version "1.70.5"
|
||||||
resolved "https://registry.yarnpkg.com/@cornerstonejs/streaming-image-volume-loader/-/streaming-image-volume-loader-1.70.0.tgz#a8d96abf4b9963e6b30ea86db99c10f63e237dea"
|
resolved "https://registry.yarnpkg.com/@cornerstonejs/streaming-image-volume-loader/-/streaming-image-volume-loader-1.70.5.tgz#d6044b4258e28b38c00e8463afef064af85bd3ec"
|
||||||
integrity sha512-ZeFkKUhDlHAvjM4QGTeIsNvkih87rHS98k2DcIX2nJOilNT7KG8bsd1Clllm6Dq99rQCGGfs0ZLSb3CVLI5JXA==
|
integrity sha512-p7NZBixKRmQtZ4/auUvGEsX78/Xcdb6D5gG+hjk1ScF3d9kX5uafgBMj1aBQuO9WlcU6r7AGdIRy4hfGW+s/2w==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@cornerstonejs/core" "^1.70.0"
|
"@cornerstonejs/core" "^1.70.5"
|
||||||
comlink "^4.4.1"
|
comlink "^4.4.1"
|
||||||
|
|
||||||
"@cornerstonejs/tools@^1.70.0":
|
"@cornerstonejs/tools@^1.70.5":
|
||||||
version "1.70.0"
|
version "1.70.5"
|
||||||
resolved "https://registry.yarnpkg.com/@cornerstonejs/tools/-/tools-1.70.0.tgz#563e08fb664d92aaf74ef8c0f49322f17e8b90a6"
|
resolved "https://registry.yarnpkg.com/@cornerstonejs/tools/-/tools-1.70.5.tgz#ebf7700516169c8283d44d146e5e995ed42dd1a2"
|
||||||
integrity sha512-dj4RuYTMFKEWfi3PIyf3xebAC3lfjsuYD95SunkYRH2sxESd5l6A7Vnzk4cdajGqKeXrDVd6LD/P3dxbu/25bw==
|
integrity sha512-gIo+JfcduvmxpQSXj3BX0N7IwkQZg9yGhexTToSDPo/kpAs5ju2rbnEK++y7kT5zn+G9blDzz9q1clS+++q90w==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@cornerstonejs/core" "^1.70.0"
|
"@cornerstonejs/core" "^1.70.5"
|
||||||
"@icr/polyseg-wasm" "0.4.0"
|
"@icr/polyseg-wasm" "0.4.0"
|
||||||
"@types/offscreencanvas" "2019.7.3"
|
"@types/offscreencanvas" "2019.7.3"
|
||||||
comlink "^4.4.1"
|
comlink "^4.4.1"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user