Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web
commit
6e4a674b62
|
@ -339,6 +339,7 @@
|
||||||
:is-reading-task-view-in-order="isReadingTaskViewInOrder"
|
:is-reading-task-view-in-order="isReadingTaskViewInOrder"
|
||||||
:current-dicom-canvas-index="currentDicomCanvasIndex"
|
:current-dicom-canvas-index="currentDicomCanvasIndex"
|
||||||
:custom-wwc-tpl="customWwcTpl"
|
:custom-wwc-tpl="customWwcTpl"
|
||||||
|
:data-canvas-uid="`dicomCanvas${i-1}`"
|
||||||
@setCornerstoneStyle="setCornerstoneStyle(i-1)"
|
@setCornerstoneStyle="setCornerstoneStyle(i-1)"
|
||||||
@setMeasureData="setMeasureData"
|
@setMeasureData="setMeasureData"
|
||||||
@modifyMeasureData="modifyMeasureData"
|
@modifyMeasureData="modifyMeasureData"
|
||||||
|
@ -636,6 +637,7 @@ import Hotkeys from './Hotkeys'
|
||||||
import WL from './WL'
|
import WL from './WL'
|
||||||
import Others from './Others'
|
import Others from './Others'
|
||||||
import DicomEvent from './DicomEvent'
|
import DicomEvent from './DicomEvent'
|
||||||
|
import html2canvas from 'html2canvas'
|
||||||
export default {
|
export default {
|
||||||
name: 'DicomViewer',
|
name: 'DicomViewer',
|
||||||
components: {
|
components: {
|
||||||
|
@ -887,9 +889,14 @@ export default {
|
||||||
}
|
}
|
||||||
console.log('getMeasureData')
|
console.log('getMeasureData')
|
||||||
})
|
})
|
||||||
DicomEvent.$on('getScreenshots', (callback) => {
|
DicomEvent.$on('getScreenshots', async(callback) => {
|
||||||
if (this.currentDicomCanvasIndex > -1) {
|
if (this.currentDicomCanvasIndex > -1) {
|
||||||
var base64Str = this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].getScreenshots()
|
// var base64Str = this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].getScreenshots()
|
||||||
|
const divForDownloadViewport = document.querySelector(
|
||||||
|
`div[data-canvas-uid="dicomCanvas${this.currentDicomCanvasIndex}"]`
|
||||||
|
)
|
||||||
|
var canvas = await html2canvas(divForDownloadViewport)
|
||||||
|
var base64Str = canvas.toDataURL('image/png', 1)
|
||||||
callback(base64Str)
|
callback(base64Str)
|
||||||
}
|
}
|
||||||
console.log('getScreenshots')
|
console.log('getScreenshots')
|
||||||
|
|
|
@ -375,6 +375,7 @@ import vtkColorTransferFunction from '@kitware/vtk.js/Rendering/Core/ColorTransf
|
||||||
import vtkPiecewiseFunction from '@kitware/vtk.js/Common/DataModel/PiecewiseFunction'
|
import vtkPiecewiseFunction from '@kitware/vtk.js/Common/DataModel/PiecewiseFunction'
|
||||||
// import vtkOrientationMarkerWidget from '@kitware/vtk.js/Interaction/Widgets/OrientationMarkerWidget'
|
// import vtkOrientationMarkerWidget from '@kitware/vtk.js/Interaction/Widgets/OrientationMarkerWidget'
|
||||||
import { mat4, vec3 } from 'gl-matrix'
|
import { mat4, vec3 } from 'gl-matrix'
|
||||||
|
import html2canvas from 'html2canvas'
|
||||||
// import vtkColorTransferFunction from '@kitware/vtk.js/Rendering/Core/ColorTransferFunction'
|
// import vtkColorTransferFunction from '@kitware/vtk.js/Rendering/Core/ColorTransferFunction'
|
||||||
// import vtkMath from '@kitware/vtk.js/Common/Core/Math'
|
// import vtkMath from '@kitware/vtk.js/Common/Core/Math'
|
||||||
import CircleROITool from './tools/CircleROITool'
|
import CircleROITool from './tools/CircleROITool'
|
||||||
|
@ -596,8 +597,13 @@ export default {
|
||||||
this.imageLocation(obj)
|
this.imageLocation(obj)
|
||||||
})
|
})
|
||||||
FusionEvent.$on('getScreenshots', async(callback) => {
|
FusionEvent.$on('getScreenshots', async(callback) => {
|
||||||
var base64Str = await this.$refs['FUSION_AXIAL'].getScreenshots()
|
// var base64Str = await this.$refs['FUSION_AXIAL'].getScreenshots()
|
||||||
callback(base64Str)
|
const divForDownloadViewport = document.querySelector(
|
||||||
|
'.dicom-container'
|
||||||
|
)
|
||||||
|
var canvas = await html2canvas(divForDownloadViewport)
|
||||||
|
var pictureBaseStr = canvas.toDataURL('image/png', 1)
|
||||||
|
callback(pictureBaseStr)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
destroyed() {
|
destroyed() {
|
||||||
|
@ -803,7 +809,7 @@ export default {
|
||||||
},
|
},
|
||||||
removeAnnotation(obj) {
|
removeAnnotation(obj) {
|
||||||
const { otherMeasureData, type } = obj
|
const { otherMeasureData, type } = obj
|
||||||
if(!otherMeasureData || !otherMeasureData.data) return
|
if (!otherMeasureData || !otherMeasureData.data) return
|
||||||
const { data } = otherMeasureData
|
const { data } = otherMeasureData
|
||||||
const i = this.measureDatas.findIndex(item => item.OtherMeasureData && item.OtherMeasureData.data.remark === data.remark)
|
const i = this.measureDatas.findIndex(item => item.OtherMeasureData && item.OtherMeasureData.data.remark === data.remark)
|
||||||
if (i > -1) {
|
if (i > -1) {
|
||||||
|
|
|
@ -340,7 +340,7 @@ export default {
|
||||||
|
|
||||||
if (question.Childrens.length > 0) {
|
if (question.Childrens.length > 0) {
|
||||||
this.resetChild(question.Childrens)
|
this.resetChild(question.Childrens)
|
||||||
}else{
|
} else {
|
||||||
this.$emit('setFormItemData', { key: question.Id, val: v })
|
this.$emit('setFormItemData', { key: question.Id, val: v })
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue