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.$refs['measurementList'].modifyMeasuredData(data)
|
||||||
this.activeTool = ''
|
this.activeTool = ''
|
||||||
},
|
},
|
||||||
saveImage() {
|
async saveImage() {
|
||||||
this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].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) {
|
setDicomCanvasWwwc(v) {
|
||||||
|
|
|
@ -528,6 +528,7 @@ export default {
|
||||||
activeCanvasWW: null,
|
activeCanvasWW: null,
|
||||||
activeCanvasWC: null,
|
activeCanvasWC: null,
|
||||||
fusion: { visible: false } // 历史记录融合调窗
|
fusion: { visible: false } // 历史记录融合调窗
|
||||||
|
// initFirstAnnotation:false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -691,9 +692,9 @@ export default {
|
||||||
this.setUpToolGroups()
|
this.setUpToolGroups()
|
||||||
|
|
||||||
this.setUpSynchronizers()
|
this.setUpSynchronizers()
|
||||||
this.$refs['CT_AXIAL'].scroll(0)
|
// this.$refs['CT_AXIAL'].scroll(0)
|
||||||
this.$refs['PT_AXIAL'].scroll(0)
|
// this.$refs['PT_AXIAL'].scroll(0)
|
||||||
this.$refs['FUSION_AXIAL'].scroll(0)
|
// this.$refs['FUSION_AXIAL'].scroll(0)
|
||||||
const viewport = renderingEngine.getViewport('CT_AXIAL')
|
const viewport = renderingEngine.getViewport('CT_AXIAL')
|
||||||
if (viewport) {
|
if (viewport) {
|
||||||
this.defaultCamera = viewport.getCamera()
|
this.defaultCamera = viewport.getCamera()
|
||||||
|
@ -709,18 +710,20 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
eventTarget.addEventListener(cornerstoneTools.Enums.Events.ANNOTATION_ADDED, (e) => {
|
eventTarget.addEventListener(cornerstoneTools.Enums.Events.ANNOTATION_ADDED, (e) => {
|
||||||
|
console.log('ANNOTATION_ADDED')
|
||||||
this.onAnnotationAdded(e)
|
this.onAnnotationAdded(e)
|
||||||
})
|
})
|
||||||
|
|
||||||
const debouncedCallback = this.debounce((e) => {
|
const debouncedCallback = this.debounce((e) => {
|
||||||
const { annotation } = e.detail
|
this.onAnnotationModified(e)
|
||||||
const { remark } = annotation.data
|
// const { annotation } = e.detail
|
||||||
var idx = this.initAnnotations.findIndex(i => i.orderMark === remark)
|
// const { remark } = annotation.data
|
||||||
if (this.initAnnotations.length > 0 && idx > -1 && this.initAnnotations[idx].orderMark === remark && !this.initAnnotations[idx].isInit) {
|
// var idx = this.initAnnotations.findIndex(i => i.orderMark === remark)
|
||||||
this.initAnnotations[idx].isInit = true
|
// if (this.initAnnotations.length > 0 && idx > -1 && this.initAnnotations[idx].orderMark === remark && !this.initAnnotations[idx].isInit) {
|
||||||
} else {
|
// this.initAnnotations[idx].isInit = true
|
||||||
this.onAnnotationModified(e)
|
// } else {
|
||||||
}
|
// this.onAnnotationModified(e)
|
||||||
|
// }
|
||||||
// const { cachedStats } = annotation.data
|
// const { cachedStats } = annotation.data
|
||||||
// var isNotValidAnnotationNum = 0
|
// var isNotValidAnnotationNum = 0
|
||||||
// for (const volumeId in cachedStats) {
|
// for (const volumeId in cachedStats) {
|
||||||
|
@ -756,6 +759,7 @@ export default {
|
||||||
// }
|
// }
|
||||||
}, 120)
|
}, 120)
|
||||||
eventTarget.addEventListener(cornerstoneTools.Enums.Events.ANNOTATION_MODIFIED, (e) => {
|
eventTarget.addEventListener(cornerstoneTools.Enums.Events.ANNOTATION_MODIFIED, (e) => {
|
||||||
|
console.log('ANNOTATION_MODIFIED')
|
||||||
debouncedCallback(e)
|
debouncedCallback(e)
|
||||||
})
|
})
|
||||||
eventTarget.addEventListener(cornerstoneTools.Enums.Events.ANNOTATION_SELECTION_CHANGE, (e) => {
|
eventTarget.addEventListener(cornerstoneTools.Enums.Events.ANNOTATION_SELECTION_CHANGE, (e) => {
|
||||||
|
@ -1996,12 +2000,14 @@ export default {
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
viewportId = 'PT_AXIAL'
|
viewportId = 'PT_AXIAL'
|
||||||
this.$refs[viewportId].scroll(index)
|
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()
|
resolve()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
@ -232,7 +232,9 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
handleVolumeNewImage(e) {
|
handleVolumeNewImage(e) {
|
||||||
const { imageIndex } = e.detail
|
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)
|
renderingEngine = getRenderingEngine(this.renderingEngineId)
|
||||||
viewport = renderingEngine.getViewport(this.viewportId)
|
viewport = renderingEngine.getViewport(this.viewportId)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue