非dicom角度工具添加注释
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
fe0ba42736
commit
5394a2cde5
|
|
@ -574,7 +574,10 @@ export default {
|
||||||
cachedStats: false,
|
cachedStats: false,
|
||||||
getTextLines: this.getCircleROIToolTextLines
|
getTextLines: this.getCircleROIToolTextLines
|
||||||
})
|
})
|
||||||
toolGroup.addTool(AngleTool.toolName)
|
toolGroup.addTool(AngleTool.toolName, {
|
||||||
|
cachedStats: false,
|
||||||
|
getTextLines: this.getAngleToolTextLines
|
||||||
|
})
|
||||||
toolGroup.addTool(PlanarFreehandROITool.toolName, {
|
toolGroup.addTool(PlanarFreehandROITool.toolName, {
|
||||||
allowOpenContours: false,
|
allowOpenContours: false,
|
||||||
cachedStats: false,
|
cachedStats: false,
|
||||||
|
|
@ -1541,6 +1544,25 @@ export default {
|
||||||
}
|
}
|
||||||
return textLines
|
return textLines
|
||||||
},
|
},
|
||||||
|
// 角度工具注释信息
|
||||||
|
getAngleToolTextLines(data, targetId) {
|
||||||
|
const cachedVolumeStats = data.cachedStats[targetId]
|
||||||
|
const { label } = data
|
||||||
|
const { angle } = cachedVolumeStats
|
||||||
|
if (angle === undefined) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isNaN(angle)) {
|
||||||
|
return [`${angle}`]
|
||||||
|
}
|
||||||
|
const textLines = []
|
||||||
|
if (label) {
|
||||||
|
textLines.push(label)
|
||||||
|
}
|
||||||
|
textLines.push(`${angle.toFixed(this.digitPlaces)} ${String.fromCharCode(176)}`)
|
||||||
|
return textLines
|
||||||
|
},
|
||||||
reRound(result, finalPrecision) {
|
reRound(result, finalPrecision) {
|
||||||
if (typeof result === 'string' && result.includes(', ')) {
|
if (typeof result === 'string' && result.includes(', ')) {
|
||||||
const numStrs = result.split(', ')
|
const numStrs = result.split(', ')
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue