矩形、圆形周长
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
505c18b611
commit
2e882b4d59
|
@ -1084,6 +1084,7 @@ export default {
|
|||
},
|
||||
getRectangleROIToolTextLines(data, targetId) {
|
||||
const cachedVolumeStats = data.cachedStats[targetId]
|
||||
const points = data.handles.points
|
||||
const { area, mean, max, stdDev, areaUnit, modalityUnit } = cachedVolumeStats
|
||||
|
||||
if (mean === undefined) {
|
||||
|
@ -1105,7 +1106,16 @@ export default {
|
|||
textLines.push(`Mean: ${this.reRound(csUtils.roundNumber(mean), this.digitPlaces)} ${modalityUnit}`)
|
||||
textLines.push(`Max: ${this.reRound(csUtils.roundNumber(max), this.digitPlaces)} ${modalityUnit}`)
|
||||
textLines.push(`Std Dev: ${this.reRound(csUtils.roundNumber(stdDev), this.digitPlaces)} ${modalityUnit}`)
|
||||
|
||||
if (Array.isArray(points) && points.length === 4) {
|
||||
let perimeter = 2 * Math.abs(points[0][0] - points[1][0]) + 2 * Math.abs(points[1][1] - points[2][1])
|
||||
if (perimeter) {
|
||||
if (ps) {
|
||||
textLines.push(`Perimeter: ${this.reRound(csUtils.roundNumber(perimeter * ps), this.digitPlaces)} mm`)
|
||||
} else {
|
||||
textLines.push(`Perimeter: ${this.reRound(csUtils.roundNumber(perimeter), this.digitPlaces)} px`)
|
||||
}
|
||||
}
|
||||
}
|
||||
return textLines
|
||||
},
|
||||
// 椭圆工具注释信息
|
||||
|
@ -1132,13 +1142,12 @@ export default {
|
|||
textLines.push(`Mean: ${this.reRound(csUtils.roundNumber(mean), this.digitPlaces)} ${modalityUnit}`)
|
||||
textLines.push(`Max: ${this.reRound(csUtils.roundNumber(max), this.digitPlaces)} ${modalityUnit}`)
|
||||
textLines.push(`Std Dev: ${this.reRound(csUtils.roundNumber(stdDev), this.digitPlaces)} ${modalityUnit}`)
|
||||
|
||||
return textLines
|
||||
},
|
||||
// 圆形工具注释信息
|
||||
getCircleROIToolTextLines(data, targetId) {
|
||||
const cachedVolumeStats = data.cachedStats[targetId]
|
||||
const { area, mean, max, stdDev, areaUnit, modalityUnit } = cachedVolumeStats
|
||||
const { area, mean, max, stdDev, perimeter, areaUnit, modalityUnit } = cachedVolumeStats
|
||||
|
||||
if (mean === undefined) {
|
||||
return
|
||||
|
@ -1159,7 +1168,13 @@ export default {
|
|||
textLines.push(`Mean: ${this.reRound(csUtils.roundNumber(mean), this.digitPlaces)} ${modalityUnit}`)
|
||||
textLines.push(`Max: ${this.reRound(csUtils.roundNumber(max), this.digitPlaces)} ${modalityUnit}`)
|
||||
textLines.push(`Std Dev: ${this.reRound(csUtils.roundNumber(stdDev), this.digitPlaces)} ${modalityUnit}`)
|
||||
|
||||
if (perimeter) {
|
||||
if (ps) {
|
||||
textLines.push(`Perimeter: ${this.reRound(csUtils.roundNumber(perimeter * ps), this.digitPlaces)} mm`)
|
||||
} else {
|
||||
textLines.push(`Perimeter: ${this.reRound(csUtils.roundNumber(perimeter), this.digitPlaces)} px`)
|
||||
}
|
||||
}
|
||||
return textLines
|
||||
},
|
||||
reRound(result, finalPrecision) {
|
||||
|
|
Loading…
Reference in New Issue