PET-CT融合时间超长时,进行信息提示

uat_us
caiyiling 2024-01-16 10:43:57 +08:00
parent bc9edcaa89
commit e7409e2647
1 changed files with 44 additions and 19 deletions

View File

@ -449,7 +449,8 @@ var mipToolGroup
const axialCameraSynchronizerId = 'AXIAL_CAMERA_SYNCHRONIZER_ID'
const ctVoiSynchronizerId = 'CT_VOI_SYNCHRONIZER_ID'
const ptVoiSynchronizerId = 'PT_VOI_SYNCHRONIZER_ID'
const timeout = 5 * 60 * 1000
let timerId
export default {
name: 'Fusion',
components: {
@ -921,26 +922,36 @@ export default {
}
},
async getImages() {
// '...'
this.loadingText = this.$t('trials:lugano:message:loadImages')
try {
//
this.startTimer()
// '...'
this.loadingText = this.$t('trials:lugano:message:loadImages')
const ctImageIds = await createImageIdsAndCacheMetaData({
modality: 'CT',
imageIds: this.ctSeries.imageIds
})
const ptImageIds = await createImageIdsAndCacheMetaData({
modality: 'PT',
imageIds: this.petSeries.imageIds
})
// '...'
this.loadingText = this.$t('trials:lugano:message:loadVolumes')
const ctImageIds = await createImageIdsAndCacheMetaData({
modality: 'CT',
imageIds: this.ctSeries.imageIds
})
const ptImageIds = await createImageIdsAndCacheMetaData({
modality: 'PT',
imageIds: this.petSeries.imageIds
})
// '...'
this.loadingText = this.$t('trials:lugano:message:loadVolumes')
this.ctVolume = await volumeLoader.createAndCacheVolume(ctVolumeId, {
imageIds: ctImageIds
})
this.ptVolume = await volumeLoader.createAndCacheVolume(ptVolumeId, {
imageIds: ptImageIds
})
this.ctVolume = await volumeLoader.createAndCacheVolume(ctVolumeId, {
imageIds: ctImageIds
})
this.ptVolume = await volumeLoader.createAndCacheVolume(ptVolumeId, {
imageIds: ptImageIds
})
//
this.resetTimer()
} catch (error) {
//
this.resetTimer()
console.log(error)
}
},
setUpToolGroups() {
cornerstoneTools.addTool(WindowLevelTool)
@ -2043,6 +2054,20 @@ export default {
this.readingTaskState = event.data.data.readingTaskState
}
},
startTimer() {
timerId = setTimeout(() => {
this.$confirm('当前pet-ct图像融合耗时过长是否继续等待', '提示', {
type: 'warning'
}).then(() => {
}).catch(() => {
window.close()
})
}, timeout)
},
resetTimer() {
clearTimeout(timerId)
},
...mapMutations({ setLanguage: 'lang/setLanguage' })
}
}