|
|
|
|
@ -703,7 +703,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
immediate: true
|
|
|
|
|
},
|
|
|
|
|
// currentReadingTaskState() { console.log(this.currentReadingTaskState, 'currentReadingTaskState') },
|
|
|
|
|
currentReadingTaskState() { console.log(this.currentReadingTaskState, 'currentReadingTaskState') },
|
|
|
|
|
activeTaskId: {
|
|
|
|
|
immediate: true,
|
|
|
|
|
handler(id) {
|
|
|
|
|
@ -722,7 +722,7 @@ export default {
|
|
|
|
|
this.clipPlaying = false
|
|
|
|
|
this.fps = 15
|
|
|
|
|
}
|
|
|
|
|
if (index === this.cells.length - 1 && series && series.TaskInfo) {
|
|
|
|
|
if (index === this.cells.length - 1 && series) {
|
|
|
|
|
this.lastViewportTaskId = series.TaskInfo.VisitTaskId
|
|
|
|
|
this.currentVisitInfo = series.TaskInfo
|
|
|
|
|
}
|
|
|
|
|
@ -1047,6 +1047,7 @@ export default {
|
|
|
|
|
const element2 = this.$refs['viewport-1'][0].$el
|
|
|
|
|
const element3 = this.$refs['viewport-2'][0].$el
|
|
|
|
|
const element4 = this.$refs['viewport-3'][0].$el
|
|
|
|
|
console.log(Enums.OrientationAxis)
|
|
|
|
|
let viewportInputArray = [
|
|
|
|
|
{
|
|
|
|
|
viewportId: 'viewport-0',
|
|
|
|
|
@ -1088,7 +1089,7 @@ export default {
|
|
|
|
|
type: ViewportType.ORTHOGRAPHIC,
|
|
|
|
|
element: volumeElement2,
|
|
|
|
|
defaultOptions: {
|
|
|
|
|
orientation: Enums.OrientationAxis.SAGITTAL
|
|
|
|
|
orientation: Enums.OrientationAxis.CORONAL
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
@ -1096,7 +1097,7 @@ export default {
|
|
|
|
|
type: ViewportType.ORTHOGRAPHIC,
|
|
|
|
|
element: volumeElement3,
|
|
|
|
|
defaultOptions: {
|
|
|
|
|
orientation: Enums.OrientationAxis.CORONAL
|
|
|
|
|
orientation: Enums.OrientationAxis.SAGITTAL
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
@ -1505,6 +1506,7 @@ export default {
|
|
|
|
|
const referencedImageId = annotation.metadata.referencedImageId
|
|
|
|
|
console.log(annotation, 'annotation')
|
|
|
|
|
const params = this.getInstanceInfo(referencedImageId)
|
|
|
|
|
console.log(params, 'params')
|
|
|
|
|
annotation.visitTaskId = series.TaskInfo.VisitTaskId
|
|
|
|
|
annotation.studyId = series.StudyId
|
|
|
|
|
annotation.seriesId = series.Id
|
|
|
|
|
@ -2723,31 +2725,20 @@ export default {
|
|
|
|
|
const i = this.visitTaskList.findIndex(i => i.VisitTaskId === obj.visitTaskId)
|
|
|
|
|
if (i === -1) return
|
|
|
|
|
const studyList = this.visitTaskList[i].StudyList
|
|
|
|
|
let series = this.getMarkedSeries(studyList, obj.annotation, true)
|
|
|
|
|
const series = this.getMarkedSeries(studyList, obj.annotation, true)
|
|
|
|
|
if (series) {
|
|
|
|
|
this.activeViewportIndex = this.cells.length - 1
|
|
|
|
|
if (obj.annotation.from === 'MPR') {
|
|
|
|
|
let res = await this.openMPRViewport(series)
|
|
|
|
|
let viewPlaneNormal = obj.annotation?.metadata?.viewPlaneNormal.map(i => i == 0 ? 0 : i).join(',')
|
|
|
|
|
if (viewPlaneNormal === '0,0,-1') {
|
|
|
|
|
this.activeViewportIndex = 0
|
|
|
|
|
series = Object.assign({ orientation: 'AXIAL' }, series)
|
|
|
|
|
} else if (viewPlaneNormal === '0,-1,0') {
|
|
|
|
|
this.activeViewportIndex = 2
|
|
|
|
|
series = Object.assign({ orientation: 'CORONAL' }, series)
|
|
|
|
|
} else if (viewPlaneNormal === '1,0,0') {
|
|
|
|
|
this.activeViewportIndex = 1
|
|
|
|
|
series = Object.assign({ orientation: 'SAGITTAL' }, series)
|
|
|
|
|
} else if (viewPlaneNormal === '1,0,0') {
|
|
|
|
|
this.activeViewportIndex = 2
|
|
|
|
|
}
|
|
|
|
|
let res = await this.openMPRViewport(series)
|
|
|
|
|
if (!res) return false
|
|
|
|
|
} else {
|
|
|
|
|
if (this.isMPR) {
|
|
|
|
|
this.isMPR = false
|
|
|
|
|
this.rows = 1
|
|
|
|
|
this.cols = 1
|
|
|
|
|
this.activeViewportIndex = 0
|
|
|
|
|
// return this.activeSeries(series)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].setSeriesInfo(series, true)
|
|
|
|
|
this.$refs[series.TaskInfo.VisitTaskId][0].setSeriesActive(series.StudyIndex, series.SeriesIndex)
|
|
|
|
|
@ -2757,41 +2748,17 @@ export default {
|
|
|
|
|
const i = this.visitTaskList.findIndex(i => i.VisitTaskId === obj.visitTaskId)
|
|
|
|
|
if (i === -1) return
|
|
|
|
|
const studyList = this.visitTaskList[i].StudyList
|
|
|
|
|
let series = this.getMarkedSeries(studyList, obj.annotation, true)
|
|
|
|
|
const series = this.getMarkedSeries(studyList, obj.annotation, true)
|
|
|
|
|
if (series) {
|
|
|
|
|
this.activeViewportIndex = this.cells.length - 1
|
|
|
|
|
if (obj.annotation.from === 'MPR') {
|
|
|
|
|
let viewPlaneNormal = obj.annotation?.metadata?.viewPlaneNormal.map(i => i == 0 ? 0 : i).join(',')
|
|
|
|
|
if (viewPlaneNormal === '0,0,-1') {
|
|
|
|
|
this.activeViewportIndex = 0
|
|
|
|
|
series = Object.assign({ orientation: 'AXIAL' }, series)
|
|
|
|
|
} else if (viewPlaneNormal === '0,-1,0') {
|
|
|
|
|
this.activeViewportIndex = 2
|
|
|
|
|
series = Object.assign({ orientation: 'CORONAL' }, series)
|
|
|
|
|
} else if (viewPlaneNormal === '1,0,0') {
|
|
|
|
|
this.activeViewportIndex = 1
|
|
|
|
|
series = Object.assign({ orientation: 'SAGITTAL' }, series)
|
|
|
|
|
}
|
|
|
|
|
let res = await this.openMPRViewport(series)
|
|
|
|
|
if (!res) {
|
|
|
|
|
this.$refs[series.TaskInfo.VisitTaskId][0].setSeriesActive(series.StudyIndex, series.SeriesIndex)
|
|
|
|
|
setTimeout(async () => {
|
|
|
|
|
const divForDownloadViewport = document.querySelector(
|
|
|
|
|
`div[data-viewport-uid="${this.viewportKey}-${this.activeViewportIndex}"]`
|
|
|
|
|
)
|
|
|
|
|
const canvas = await html2canvas(divForDownloadViewport)
|
|
|
|
|
const base64Str = canvas.toDataURL('image/png', 1)
|
|
|
|
|
callback(base64Str)
|
|
|
|
|
}, 200)
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
if (this.isMPR) {
|
|
|
|
|
this.isMPR = false
|
|
|
|
|
this.rows = 1
|
|
|
|
|
this.cols = 1
|
|
|
|
|
this.activeViewportIndex = 0
|
|
|
|
|
// return this.activeSeries(series)
|
|
|
|
|
} else if (viewPlaneNormal === '1,0,0') {
|
|
|
|
|
this.activeViewportIndex = 2
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].setSeriesInfo(series, true)
|
|
|
|
|
@ -2803,7 +2770,7 @@ export default {
|
|
|
|
|
const canvas = await html2canvas(divForDownloadViewport)
|
|
|
|
|
const base64Str = canvas.toDataURL('image/png', 1)
|
|
|
|
|
callback(base64Str)
|
|
|
|
|
}, 200)
|
|
|
|
|
}, 500)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
async getScreenshots(measureData, callback) {
|
|
|
|
|
@ -3157,27 +3124,24 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
async openMPRViewport(data = null) {
|
|
|
|
|
return new Promise(async (resolve, reject) => {
|
|
|
|
|
if (this.isMPR) {
|
|
|
|
|
if (!data) return resolve(false)
|
|
|
|
|
let viewportSeries = this.$refs[`viewport-volume-0`][0].series
|
|
|
|
|
if (data && viewportSeries.SeriesInstanceUid === data.SeriesInstanceUid) return resolve(true)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (this.isMPR) return resolve(true)
|
|
|
|
|
this.isMPR = true
|
|
|
|
|
this.rows = 3
|
|
|
|
|
this.cols = 1
|
|
|
|
|
this.loading = true
|
|
|
|
|
this.loadingText = this.$t('trials:lugano:message:loadVolumes')
|
|
|
|
|
const series = data ? data : this.$refs[`viewport-${this.activeViewportIndex}`][0].series
|
|
|
|
|
if (!data) this.activeViewportIndex = 0
|
|
|
|
|
const visitTaskId = this.visitTaskList[this.activeTaskIndex].VisitTaskId
|
|
|
|
|
this.$refs[visitTaskId][0].setSeriesActive(series.StudyIndex, series.SeriesIndex)
|
|
|
|
|
this.activeViewportIndex = 0
|
|
|
|
|
// this.$refs[`viewport-0`][0].setSeriesInfo(series)
|
|
|
|
|
// this.$refs[`viewport-1`][0].setSeriesInfo(series)
|
|
|
|
|
// this.$refs[`viewport-2`][0].setSeriesInfo(series)
|
|
|
|
|
// this.$refs[`viewport-3`][0].setSeriesInfo(series)
|
|
|
|
|
await this.getVolume(series)
|
|
|
|
|
this.loading = false
|
|
|
|
|
this.loadingText = null
|
|
|
|
|
this.$refs[`viewport-volume-0`][0].setSeriesInfo(Object.assign({ orientation: 'AXIAL', isLocation: data && this.activeViewportIndex === 0 }, series))
|
|
|
|
|
this.$refs[`viewport-volume-1`][0].setSeriesInfo(Object.assign({ orientation: 'SAGITTAL', isLocation: data && this.activeViewportIndex === 1 }, series))
|
|
|
|
|
this.$refs[`viewport-volume-2`][0].setSeriesInfo(Object.assign({ orientation: 'CORONAL', isLocation: data && this.activeViewportIndex === 2 }, series))
|
|
|
|
|
this.$refs[`viewport-volume-0`][0].setSeriesInfo(Object.assign({ orientation: 'AXIAL' }, series))
|
|
|
|
|
this.$refs[`viewport-volume-1`][0].setSeriesInfo(Object.assign({ orientation: 'CORONAL' }, series))
|
|
|
|
|
this.$refs[`viewport-volume-2`][0].setSeriesInfo(Object.assign({ orientation: 'SAGITTAL' }, series))
|
|
|
|
|
resolve(false)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|