From 86a1312b60b77081286dc285e7645166121992e2 Mon Sep 17 00:00:00 2001 From: wangxiaoshuang <825034831@qq.com> Date: Thu, 22 Jan 2026 16:57:24 +0800 Subject: [PATCH] =?UTF-8?q?dicom=E9=98=85=E7=89=87=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=A4=AD=E5=9C=86=E5=B7=A5=E5=85=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../reading/dicoms3D/components/ReadPage.vue | 54 +++++++++++++++++++ .../reading/dicoms3D/components/toolConfig.js | 11 +++- 2 files changed, 64 insertions(+), 1 deletion(-) diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue index 32c1cf88..4f4cda01 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue @@ -524,6 +524,7 @@ const { MIPJumpToClickTool, VolumeRotateTool, CrosshairsTool, + EllipticalROITool, synchronizers // cursors } = cornerstoneTools @@ -1187,6 +1188,7 @@ export default { cornerstoneTools.addTool(BidirectionalTool) cornerstoneTools.addTool(ScaleOverlayTool) cornerstoneTools.addTool(CircleROITool) + cornerstoneTools.addTool(EllipticalROITool) cornerstoneTools.addTool(AngleTool) cornerstoneTools.addTool(CobbAngleTool) cornerstoneTools.addTool(MIPJumpToClickTool) @@ -1251,6 +1253,9 @@ export default { toolGroup.addTool(CircleROITool.toolName, { getTextLines: this.getCircleROIToolTextLines }) + toolGroup.addTool(EllipticalROITool.toolName, { + getTextLines: this.getEllipticalROIToolTextLines + }) toolGroup.addTool(AngleTool.toolName, { getTextLines: this.getAngleToolTextLines }) @@ -1310,6 +1315,7 @@ export default { toolGroup.setToolPassive(LengthTool.toolName) toolGroup.setToolPassive(BidirectionalTool.toolName) toolGroup.setToolPassive(CircleROITool.toolName) + toolGroup.setToolPassive(EllipticalROITool.toolName) toolGroup.setToolPassive(AngleTool.toolName) toolGroup.setToolPassive(CobbAngleTool.toolName) } else { @@ -1319,6 +1325,7 @@ export default { toolGroup.setToolEnabled(LengthTool.toolName) toolGroup.setToolEnabled(BidirectionalTool.toolName) toolGroup.setToolEnabled(CircleROITool.toolName) + toolGroup.setToolEnabled(EllipticalROITool.toolName) toolGroup.setToolEnabled(AngleTool.toolName) toolGroup.setToolEnabled(CobbAngleTool.toolName) } @@ -1991,6 +1998,53 @@ export default { return textLines }, + getEllipticalROIToolTextLines(data, targetId) { + const cachedVolumeStats = data.cachedStats[targetId] + const { + // radius, + // radiusUnit, + area, + mean, + stdDev, + max, + isEmptyArea, + areaUnit, + modalityUnit + } = cachedVolumeStats + const textLines = [] + if (data.label) { + // textLines.push(data.label) + textLines.push(data.label) + } + + // if (radius) { + // const radiusLine = isEmptyArea + // ? `Radius: Oblique not supported` + // : `Radius: ${this.reRound(radius, this.digitPlaces)} ${radiusUnit}` + // textLines.push(radiusLine) + // } + + if (area) { + const areaLine = isEmptyArea + ? `Area: Oblique not supported` + : `Area: ${parseFloat(area).toFixed(2)} ${areaUnit}` + textLines.push(areaLine) + } + + if (mean) { + textLines.push(`Mean: ${this.reRound(mean, this.digitPlaces)} ${modalityUnit}`) + } + + if (max) { + textLines.push(`Max: ${this.reRound(max, this.digitPlaces)} ${modalityUnit}`) + } + + if (stdDev) { + textLines.push(`Std Dev: ${this.reRound(stdDev, this.digitPlaces)} ${modalityUnit}`) + } + + return textLines + }, getAngleToolTextLines(data, targetId) { const cachedVolumeStats = data.cachedStats[targetId] const { label } = data diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/toolConfig.js b/src/views/trials/trials-panel/reading/dicoms3D/components/toolConfig.js index 9dd68cc1..67713036 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/toolConfig.js +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/toolConfig.js @@ -267,7 +267,7 @@ const config = { 'disabledReason': '' }, { - 'name': '椭圆工具', + 'name': '圆形工具', 'icon': 'oval', 'toolName': 'CircleROI', 'props': ['radius', 'area', 'mean', 'max', 'stdDev'], @@ -275,6 +275,15 @@ const config = { 'isDisabled': false, 'disabledReason': '' }, + { + 'name': '椭圆工具', + 'icon': 'elliptical', + 'toolName': 'EllipticalROI', + 'props': ['area', 'mean', 'max', 'stdDev'], + 'i18nKey': 'trials:reading:button:Elliptical', + 'isDisabled': false, + 'disabledReason': '' + }, { 'name': '角度工具', 'icon': 'angle',