|
|
|
@ -303,8 +303,8 @@ export default {
|
|
|
|
|
|
|
|
|
|
],
|
|
|
|
|
scrollSyncInfo: { offset: 0 },
|
|
|
|
|
hideMeasureArr: []
|
|
|
|
|
|
|
|
|
|
hideMeasureArr: [],
|
|
|
|
|
isInitWwwc: true
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
@ -565,7 +565,6 @@ export default {
|
|
|
|
|
e.stopPropagation()
|
|
|
|
|
e.preventDefault()
|
|
|
|
|
} else if (this.activeToolName === 'Length' || this.activeToolName === 'Bidirectional' && this.readingTaskState < 2) {
|
|
|
|
|
console.log(e.detail.image)
|
|
|
|
|
if (!e.detail.image.columnPixelSpacing || !e.detail.image.rowPixelSpacing) {
|
|
|
|
|
// '该影像不具备测量长度所需的必要数据,不能进行长度测量。请选择其他工具进行标注。'
|
|
|
|
|
this.$confirm(this.$t('trials:reading:warnning:msg56'), '', {
|
|
|
|
@ -578,6 +577,13 @@ export default {
|
|
|
|
|
e.stopPropagation()
|
|
|
|
|
e.preventDefault()
|
|
|
|
|
}
|
|
|
|
|
} else if (this.CriterionType === 21 && this.activeToolName === 'Probe' && this.readingTaskState < 2) {
|
|
|
|
|
if (!(e.detail.image.imageFrame.photometricInterpretation === 'MONOCHROME1' || e.detail.image.imageFrame.photometricInterpretation === 'MONOCHROME2')) {
|
|
|
|
|
this.$alert(this.$t('trials:MRIPDFF:message:message5'))
|
|
|
|
|
e.stopImmediatePropagation()
|
|
|
|
|
e.stopPropagation()
|
|
|
|
|
e.preventDefault()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
pointNearTool(e) {
|
|
|
|
@ -668,7 +674,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
sliderMousemove(e) {
|
|
|
|
|
if (!this.sliderInfo.isMove) return
|
|
|
|
|
console.log('sliderMousemove')
|
|
|
|
|
// console.log('sliderMousemove')
|
|
|
|
|
var PX = this.sliderInfo.oldB - (this.sliderInfo.oldM - e.clientY)
|
|
|
|
|
var boxHeight = this.$refs['sliderBox'].clientHeight
|
|
|
|
|
if (PX < 0) return
|
|
|
|
@ -792,6 +798,7 @@ export default {
|
|
|
|
|
} else if (toolType === 'Length') {
|
|
|
|
|
// toolState.data[i].length = this.calculateLenth(toolState.data[i])
|
|
|
|
|
}
|
|
|
|
|
measureData.largestPixelValue = image.imageFrame.largestPixelValue
|
|
|
|
|
measureData.imageId = imageId
|
|
|
|
|
measureData.studyId = this.stack.studyId
|
|
|
|
|
measureData.seriesId = this.stack.seriesId
|
|
|
|
@ -1025,6 +1032,7 @@ export default {
|
|
|
|
|
var questionInfo = this.measureData[idx]
|
|
|
|
|
// const canvas = this.canvas.querySelector('canvas')
|
|
|
|
|
// measureData.pictureBaseStr = canvas.toDataURL('image/png', 1)
|
|
|
|
|
measureData.largestPixelValue = image.imageFrame.largestPixelValue
|
|
|
|
|
measureData.imageId = imageId
|
|
|
|
|
measureData.studyId = this.stack.studyId
|
|
|
|
|
measureData.seriesId = this.stack.seriesId
|
|
|
|
@ -1051,6 +1059,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
loadImageStack(dicomSeries) {
|
|
|
|
|
return new Promise(resolve => {
|
|
|
|
|
this.isInitWwwc = true
|
|
|
|
|
this.isCurrentTask = dicomSeries.isCurrentTask
|
|
|
|
|
this.isBaseline = dicomSeries.isBaseLineTask
|
|
|
|
|
this.readingTaskState = dicomSeries.readingTaskState
|
|
|
|
@ -1219,7 +1228,7 @@ export default {
|
|
|
|
|
this.stack.frame = this.stack.isExistMutiFrames ? parseInt(frame) : null
|
|
|
|
|
this.stack.instanceId = instanceId
|
|
|
|
|
this.height = (this.stack.currentImageIdIndex) * 100 / (this.stack.imageIds.length - 1)
|
|
|
|
|
// this.resetWwwc()
|
|
|
|
|
|
|
|
|
|
resolve()
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
@ -1317,6 +1326,9 @@ export default {
|
|
|
|
|
this.scrollSyncInfo.offset = 0
|
|
|
|
|
}
|
|
|
|
|
this.renderMeasuredData(e)
|
|
|
|
|
if (this.isInitWwwc) {
|
|
|
|
|
this.resetWwwc()
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
getOrientationMarker(element) {
|
|
|
|
|
const enabledElement = cornerstone.getEnabledElement(element)
|
|
|
|
@ -1353,6 +1365,7 @@ export default {
|
|
|
|
|
this.stack.frame = this.stack.isExistMutiFrames ? parseInt(frame) : null
|
|
|
|
|
if (e.detail.toolName === 'Length' || e.detail.toolName === 'ArrowAnnotate' || e.detail.toolName === 'RectangleRoi') {
|
|
|
|
|
const measureData = {}
|
|
|
|
|
measureData.largestPixelValue = element.image.imageFrame.largestPixelValue
|
|
|
|
|
measureData.imageId = imageId
|
|
|
|
|
measureData.studyId = this.stack.studyId
|
|
|
|
|
measureData.seriesId = this.stack.seriesId
|
|
|
|
@ -1371,6 +1384,7 @@ export default {
|
|
|
|
|
cornerstoneTools.setToolPassiveForElement(this.canvas, e.detail.toolName)
|
|
|
|
|
} else if (e.detail.toolName === 'Bidirectional') {
|
|
|
|
|
const measureData = {}
|
|
|
|
|
measureData.largestPixelValue = element.image.imageFrame.largestPixelValue
|
|
|
|
|
measureData.imageId = imageId
|
|
|
|
|
measureData.studyId = this.stack.studyId
|
|
|
|
|
measureData.seriesId = this.stack.seriesId
|
|
|
|
@ -1388,6 +1402,7 @@ export default {
|
|
|
|
|
cornerstoneTools.setToolPassiveForElement(this.canvas, e.detail.toolName)
|
|
|
|
|
} else if (e.detail.toolName === 'Probe') {
|
|
|
|
|
const measureData = {}
|
|
|
|
|
measureData.largestPixelValue = element.image.imageFrame.largestPixelValue
|
|
|
|
|
measureData.imageId = imageId
|
|
|
|
|
measureData.studyId = this.stack.studyId
|
|
|
|
|
measureData.seriesId = this.stack.seriesId
|
|
|
|
@ -1498,6 +1513,7 @@ export default {
|
|
|
|
|
var questionInfo = this.measureData[idx]
|
|
|
|
|
// const canvas = this.canvas.querySelector('canvas')
|
|
|
|
|
// measureData.pictureBaseStr = canvas.toDataURL('image/png', 1)
|
|
|
|
|
measureData.largestPixelValue = element.image.imageFrame.largestPixelValue
|
|
|
|
|
measureData.imageId = imageId
|
|
|
|
|
measureData.studyId = this.stack.studyId
|
|
|
|
|
measureData.seriesId = this.stack.seriesId
|
|
|
|
@ -1690,6 +1706,8 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
resetWwwc() {
|
|
|
|
|
// console.log('resetWwwc')
|
|
|
|
|
this.isInitWwwc = true
|
|
|
|
|
this.toolState.viewportInvert = false
|
|
|
|
|
var viewport = cornerstone.getViewport(this.canvas)
|
|
|
|
|
// viewport.invert = false
|
|
|
|
@ -1700,7 +1718,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
setWwwc(ww, wc) {
|
|
|
|
|
// console.log('setWwwc', ww, wc)
|
|
|
|
|
this.isInitWwwc = false
|
|
|
|
|
var viewport = cornerstone.getViewport(this.canvas)
|
|
|
|
|
viewport.voi.windowWidth = ww
|
|
|
|
|
viewport.voi.windowCenter = wc
|
|
|
|
|