Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web
commit
0343ba6043
|
@ -1866,8 +1866,23 @@ export default {
|
|||
this.$refs['measurementList'].modifyMeasuredData(data)
|
||||
this.activeTool = ''
|
||||
},
|
||||
saveImage() {
|
||||
this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].saveImage()
|
||||
async saveImage() {
|
||||
// this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].saveImage()
|
||||
// canvas为转换后的Canvas对象
|
||||
const divForDownloadViewport = document.querySelector(
|
||||
`div[data-canvas-uid="dicomCanvas${this.currentDicomCanvasIndex}"]`
|
||||
)
|
||||
var canvas = await html2canvas(divForDownloadViewport)
|
||||
let oImg = new Image()
|
||||
oImg = canvas.toDataURL('image/png', 1)// 导出图片
|
||||
var oA = document.createElement('a')
|
||||
var subjectCode = this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].subjectCode
|
||||
var taskBlindName = this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].stack.taskBlindName
|
||||
oA.download = `${subjectCode}_${taskBlindName}`// 设置下载的文件名,默认是'下载'
|
||||
oA.href = oImg
|
||||
document.body.appendChild(oA)
|
||||
oA.click()
|
||||
oA.remove() // 下载之后把创建的元素删除
|
||||
},
|
||||
// 设置窗宽/窗位
|
||||
setDicomCanvasWwwc(v) {
|
||||
|
|
|
@ -528,6 +528,7 @@ export default {
|
|||
activeCanvasWW: null,
|
||||
activeCanvasWC: null,
|
||||
fusion: { visible: false } // 历史记录融合调窗
|
||||
// initFirstAnnotation:false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -691,9 +692,9 @@ export default {
|
|||
this.setUpToolGroups()
|
||||
|
||||
this.setUpSynchronizers()
|
||||
this.$refs['CT_AXIAL'].scroll(0)
|
||||
this.$refs['PT_AXIAL'].scroll(0)
|
||||
this.$refs['FUSION_AXIAL'].scroll(0)
|
||||
// this.$refs['CT_AXIAL'].scroll(0)
|
||||
// this.$refs['PT_AXIAL'].scroll(0)
|
||||
// this.$refs['FUSION_AXIAL'].scroll(0)
|
||||
const viewport = renderingEngine.getViewport('CT_AXIAL')
|
||||
if (viewport) {
|
||||
this.defaultCamera = viewport.getCamera()
|
||||
|
@ -709,18 +710,20 @@ export default {
|
|||
}
|
||||
})
|
||||
eventTarget.addEventListener(cornerstoneTools.Enums.Events.ANNOTATION_ADDED, (e) => {
|
||||
console.log('ANNOTATION_ADDED')
|
||||
this.onAnnotationAdded(e)
|
||||
})
|
||||
|
||||
const debouncedCallback = this.debounce((e) => {
|
||||
const { annotation } = e.detail
|
||||
const { remark } = annotation.data
|
||||
var idx = this.initAnnotations.findIndex(i => i.orderMark === remark)
|
||||
if (this.initAnnotations.length > 0 && idx > -1 && this.initAnnotations[idx].orderMark === remark && !this.initAnnotations[idx].isInit) {
|
||||
this.initAnnotations[idx].isInit = true
|
||||
} else {
|
||||
this.onAnnotationModified(e)
|
||||
}
|
||||
this.onAnnotationModified(e)
|
||||
// const { annotation } = e.detail
|
||||
// const { remark } = annotation.data
|
||||
// var idx = this.initAnnotations.findIndex(i => i.orderMark === remark)
|
||||
// if (this.initAnnotations.length > 0 && idx > -1 && this.initAnnotations[idx].orderMark === remark && !this.initAnnotations[idx].isInit) {
|
||||
// this.initAnnotations[idx].isInit = true
|
||||
// } else {
|
||||
// this.onAnnotationModified(e)
|
||||
// }
|
||||
// const { cachedStats } = annotation.data
|
||||
// var isNotValidAnnotationNum = 0
|
||||
// for (const volumeId in cachedStats) {
|
||||
|
@ -756,6 +759,7 @@ export default {
|
|||
// }
|
||||
}, 120)
|
||||
eventTarget.addEventListener(cornerstoneTools.Enums.Events.ANNOTATION_MODIFIED, (e) => {
|
||||
console.log('ANNOTATION_MODIFIED')
|
||||
debouncedCallback(e)
|
||||
})
|
||||
eventTarget.addEventListener(cornerstoneTools.Enums.Events.ANNOTATION_SELECTION_CHANGE, (e) => {
|
||||
|
@ -1996,12 +2000,14 @@ export default {
|
|||
if (index > -1) {
|
||||
viewportId = 'PT_AXIAL'
|
||||
this.$refs[viewportId].scroll(index)
|
||||
} else {
|
||||
index = this.ctSeries.instanceList.findIndex(i => i === instanceId)
|
||||
if (index > -1) {
|
||||
viewportId = 'CT_AXIAL'
|
||||
this.$refs[viewportId].scroll(index)
|
||||
}
|
||||
}
|
||||
index = this.ctSeries.instanceList.findIndex(i => i === instanceId)
|
||||
if (index > -1) {
|
||||
viewportId = 'CT_AXIAL'
|
||||
this.$refs[viewportId].scroll(index)
|
||||
}
|
||||
|
||||
resolve()
|
||||
})
|
||||
},
|
||||
|
|
|
@ -232,7 +232,9 @@ export default {
|
|||
methods: {
|
||||
handleVolumeNewImage(e) {
|
||||
const { imageIndex } = e.detail
|
||||
this.seriesInfo.imageIdIndex = imageIndex
|
||||
if (this.viewportId === e.detail.viewportId && this.index !== 4) {
|
||||
this.seriesInfo.imageIdIndex = imageIndex
|
||||
}
|
||||
renderingEngine = getRenderingEngine(this.renderingEngineId)
|
||||
viewport = renderingEngine.getViewport(this.viewportId)
|
||||
|
||||
|
|
Loading…
Reference in New Issue