dicom阅片添加椭圆工具
continuous-integration/drone/push Build is passing Details

main
wangxiaoshuang 2026-01-22 16:57:24 +08:00
parent a3ca9fe4d0
commit 86a1312b60
2 changed files with 64 additions and 1 deletions

View File

@ -524,6 +524,7 @@ const {
MIPJumpToClickTool, MIPJumpToClickTool,
VolumeRotateTool, VolumeRotateTool,
CrosshairsTool, CrosshairsTool,
EllipticalROITool,
synchronizers synchronizers
// cursors // cursors
} = cornerstoneTools } = cornerstoneTools
@ -1187,6 +1188,7 @@ export default {
cornerstoneTools.addTool(BidirectionalTool) cornerstoneTools.addTool(BidirectionalTool)
cornerstoneTools.addTool(ScaleOverlayTool) cornerstoneTools.addTool(ScaleOverlayTool)
cornerstoneTools.addTool(CircleROITool) cornerstoneTools.addTool(CircleROITool)
cornerstoneTools.addTool(EllipticalROITool)
cornerstoneTools.addTool(AngleTool) cornerstoneTools.addTool(AngleTool)
cornerstoneTools.addTool(CobbAngleTool) cornerstoneTools.addTool(CobbAngleTool)
cornerstoneTools.addTool(MIPJumpToClickTool) cornerstoneTools.addTool(MIPJumpToClickTool)
@ -1251,6 +1253,9 @@ export default {
toolGroup.addTool(CircleROITool.toolName, { toolGroup.addTool(CircleROITool.toolName, {
getTextLines: this.getCircleROIToolTextLines getTextLines: this.getCircleROIToolTextLines
}) })
toolGroup.addTool(EllipticalROITool.toolName, {
getTextLines: this.getEllipticalROIToolTextLines
})
toolGroup.addTool(AngleTool.toolName, { toolGroup.addTool(AngleTool.toolName, {
getTextLines: this.getAngleToolTextLines getTextLines: this.getAngleToolTextLines
}) })
@ -1310,6 +1315,7 @@ export default {
toolGroup.setToolPassive(LengthTool.toolName) toolGroup.setToolPassive(LengthTool.toolName)
toolGroup.setToolPassive(BidirectionalTool.toolName) toolGroup.setToolPassive(BidirectionalTool.toolName)
toolGroup.setToolPassive(CircleROITool.toolName) toolGroup.setToolPassive(CircleROITool.toolName)
toolGroup.setToolPassive(EllipticalROITool.toolName)
toolGroup.setToolPassive(AngleTool.toolName) toolGroup.setToolPassive(AngleTool.toolName)
toolGroup.setToolPassive(CobbAngleTool.toolName) toolGroup.setToolPassive(CobbAngleTool.toolName)
} else { } else {
@ -1319,6 +1325,7 @@ export default {
toolGroup.setToolEnabled(LengthTool.toolName) toolGroup.setToolEnabled(LengthTool.toolName)
toolGroup.setToolEnabled(BidirectionalTool.toolName) toolGroup.setToolEnabled(BidirectionalTool.toolName)
toolGroup.setToolEnabled(CircleROITool.toolName) toolGroup.setToolEnabled(CircleROITool.toolName)
toolGroup.setToolEnabled(EllipticalROITool.toolName)
toolGroup.setToolEnabled(AngleTool.toolName) toolGroup.setToolEnabled(AngleTool.toolName)
toolGroup.setToolEnabled(CobbAngleTool.toolName) toolGroup.setToolEnabled(CobbAngleTool.toolName)
} }
@ -1991,6 +1998,53 @@ export default {
return textLines 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) { getAngleToolTextLines(data, targetId) {
const cachedVolumeStats = data.cachedStats[targetId] const cachedVolumeStats = data.cachedStats[targetId]
const { label } = data const { label } = data

View File

@ -267,7 +267,7 @@ const config = {
'disabledReason': '' 'disabledReason': ''
}, },
{ {
'name': '圆工具', 'name': '工具',
'icon': 'oval', 'icon': 'oval',
'toolName': 'CircleROI', 'toolName': 'CircleROI',
'props': ['radius', 'area', 'mean', 'max', 'stdDev'], 'props': ['radius', 'area', 'mean', 'max', 'stdDev'],
@ -275,6 +275,15 @@ const config = {
'isDisabled': false, 'isDisabled': false,
'disabledReason': '' 'disabledReason': ''
}, },
{
'name': '椭圆工具',
'icon': 'elliptical',
'toolName': 'EllipticalROI',
'props': ['area', 'mean', 'max', 'stdDev'],
'i18nKey': 'trials:reading:button:Elliptical',
'isDisabled': false,
'disabledReason': ''
},
{ {
'name': '角度工具', 'name': '角度工具',
'icon': 'angle', 'icon': 'angle',