Compare commits
No commits in common. "8c68866acae857b414ab441359a6f5fde1fdbe88" and "3b7ea6491e34debfd75f137577370790b4ba29a1" have entirely different histories.
8c68866aca
...
3b7ea6491e
|
@ -108,8 +108,6 @@ import invertOrientationString from '@/views/trials/trials-panel/reading/dicoms/
|
||||||
import calculateSUV from '@/views/trials/trials-panel/reading/dicoms/tools/calculateSUV'
|
import calculateSUV from '@/views/trials/trials-panel/reading/dicoms/tools/calculateSUV'
|
||||||
// import requestPoolManager from '@/utils/request-pool'
|
// import requestPoolManager from '@/utils/request-pool'
|
||||||
import ScaleOverlayTool from '@/views/trials/trials-panel/reading/dicoms/tools/ScaleOverlay/ScaleOverlayTool'
|
import ScaleOverlayTool from '@/views/trials/trials-panel/reading/dicoms/tools/ScaleOverlay/ScaleOverlayTool'
|
||||||
import RectangleRoiTool from '@/views/trials/trials-panel/reading/dicoms/tools/RectangleRoi/RectangleRoiTool'
|
|
||||||
import EllipticalRoiTool from '@/views/trials/trials-panel/reading/dicoms/tools/EllipticalRoi/EllipticalRoiTool'
|
|
||||||
cornerstoneTools.external.cornerstone = cornerstone
|
cornerstoneTools.external.cornerstone = cornerstone
|
||||||
cornerstoneTools.external.Hammer = Hammer
|
cornerstoneTools.external.Hammer = Hammer
|
||||||
cornerstoneTools.external.cornerstoneMath = cornerstoneMath
|
cornerstoneTools.external.cornerstoneMath = cornerstoneMath
|
||||||
|
@ -264,13 +262,7 @@ export default {
|
||||||
apiTool
|
apiTool
|
||||||
)
|
)
|
||||||
if (!toolAlreadyAddedToElement) {
|
if (!toolAlreadyAddedToElement) {
|
||||||
if (toolName === 'RectangleRoi') {
|
cornerstoneTools.addToolForElement(element, apiTool)
|
||||||
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
|
// Setup button listener
|
||||||
|
@ -330,7 +322,7 @@ export default {
|
||||||
// cornerstoneTools.addStackStateManager(this.canvas, ['stack', 'stackPrefetch', 'playClip'])
|
// cornerstoneTools.addStackStateManager(this.canvas, ['stack', 'stackPrefetch', 'playClip'])
|
||||||
cornerstoneTools.addToolState(this.canvas, 'stack', this.stack)
|
cornerstoneTools.addToolState(this.canvas, 'stack', this.stack)
|
||||||
// cornerstoneTools.stackPrefetch.enable(this.canvas)
|
// cornerstoneTools.stackPrefetch.enable(this.canvas)
|
||||||
cornerstone.updateImage(element, true)
|
cornerstone.updateImage(element, true)
|
||||||
// cornerstoneTools.stackPrefetch.setConfiguration({ maxImagesToPrefetch: Infinity,
|
// cornerstoneTools.stackPrefetch.setConfiguration({ maxImagesToPrefetch: Infinity,
|
||||||
// preserveExistingPool: true })
|
// preserveExistingPool: true })
|
||||||
// cornerstoneTools.stackPrefetch.enable(this.canvas)
|
// cornerstoneTools.stackPrefetch.enable(this.canvas)
|
||||||
|
|
|
@ -40,8 +40,7 @@ export default class RectangleRoiTool extends cornerstoneTools.RectangleRoiTool
|
||||||
drawHandles: true,
|
drawHandles: true,
|
||||||
drawHandlesOnHover: false,
|
drawHandlesOnHover: false,
|
||||||
hideHandlesIfMoving: false,
|
hideHandlesIfMoving: false,
|
||||||
renderDashed: false,
|
renderDashed: false
|
||||||
showStatsText: false
|
|
||||||
// showMinMax: false,
|
// showMinMax: false,
|
||||||
// showHounsfieldUnits: true
|
// showHounsfieldUnits: true
|
||||||
},
|
},
|
||||||
|
@ -532,15 +531,12 @@ function _createTextBoxContent(
|
||||||
minString += ' '
|
minString += ' '
|
||||||
}
|
}
|
||||||
|
|
||||||
otherLines.push(`${minString}`)
|
otherLines.push(`${minString}${maxString}`)
|
||||||
otherLines.push(`${maxString}`)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (options.showStatsText) {
|
|
||||||
textLines.push(_formatArea(area, hasPixelSpacing))
|
// textLines.push(_formatArea(area, hasPixelSpacing))
|
||||||
otherLines.forEach(x => textLines.push(x))
|
// otherLines.forEach(x => textLines.push(x))
|
||||||
}
|
|
||||||
|
|
||||||
if (data.hasOwnProperty('remark')) {
|
if (data.hasOwnProperty('remark')) {
|
||||||
if (data.hasOwnProperty('status') && data.status) {
|
if (data.hasOwnProperty('status') && data.status) {
|
||||||
textLines.push(`${data.remark}(${data.status})`)
|
textLines.push(`${data.remark}(${data.status})`)
|
||||||
|
@ -550,11 +546,3 @@ function _createTextBoxContent(
|
||||||
}
|
}
|
||||||
return textLines
|
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