Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web
continuous-integration/drone/push Build is running
Details
continuous-integration/drone/push Build is running
Details
commit
143b6e9fc1
|
@ -262,9 +262,15 @@ export default {
|
|||
apiTool
|
||||
)
|
||||
if (!toolAlreadyAddedToElement) {
|
||||
if (toolName === 'RectangleRoi') {
|
||||
cornerstoneTools.addToolForElement(element, apiTool, { configuration: { showMinMax: true, showStatsText: true}})
|
||||
} else if (toolName === 'EllipticalRoi') {
|
||||
cornerstoneTools.addToolForElement(element, apiTool, { configuration: { showMinMax: true}})
|
||||
} else {
|
||||
cornerstoneTools.addToolForElement(element, apiTool)
|
||||
}
|
||||
}
|
||||
}
|
||||
// Setup button listener
|
||||
// Prevent right click context menu for our menu buttons
|
||||
toolBtn.addEventListener(
|
||||
|
|
|
@ -40,7 +40,8 @@ export default class RectangleRoiTool extends cornerstoneTools.RectangleRoiTool
|
|||
drawHandles: true,
|
||||
drawHandlesOnHover: false,
|
||||
hideHandlesIfMoving: false,
|
||||
renderDashed: false
|
||||
renderDashed: false,
|
||||
showStatsText: false
|
||||
// showMinMax: false,
|
||||
// showHounsfieldUnits: true
|
||||
},
|
||||
|
@ -531,12 +532,15 @@ function _createTextBoxContent(
|
|||
minString += ' '
|
||||
}
|
||||
|
||||
otherLines.push(`${minString}${maxString}`)
|
||||
otherLines.push(`${minString}`)
|
||||
otherLines.push(`${maxString}`)
|
||||
}
|
||||
}
|
||||
if (options.showStatsText) {
|
||||
textLines.push(_formatArea(area, hasPixelSpacing))
|
||||
otherLines.forEach(x => textLines.push(x))
|
||||
}
|
||||
|
||||
// textLines.push(_formatArea(area, hasPixelSpacing))
|
||||
// otherLines.forEach(x => textLines.push(x))
|
||||
if (data.hasOwnProperty('remark')) {
|
||||
if (data.hasOwnProperty('status') && data.status) {
|
||||
textLines.push(`${data.remark}(${data.status})`)
|
||||
|
@ -546,3 +550,11 @@ function _createTextBoxContent(
|
|||
}
|
||||
return textLines
|
||||
}
|
||||
function _formatArea(area, hasPixelSpacing) {
|
||||
// This uses Char code 178 for a superscript 2
|
||||
const suffix = hasPixelSpacing
|
||||
? ` mm${String.fromCharCode(178)}`
|
||||
: ` px${String.fromCharCode(178)}`;
|
||||
|
||||
return `Area: ${numbersWithCommas(area.toFixed(2))}${suffix}`;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue