dicom阅片添加椭圆工具
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
a3ca9fe4d0
commit
86a1312b60
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
Loading…
Reference in New Issue