阅片检查列表结构更改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
6d01361917
commit
f767451a4e
|
@ -20,8 +20,8 @@ const hangingAgreement = [
|
|||
]
|
||||
const getDefaultState = () => {
|
||||
return {
|
||||
// visitTaskList: [],
|
||||
visitTaskList: sessionStorage.getItem('visitTaskList') ? JSON.parse(sessionStorage.getItem('visitTaskList')) : [],
|
||||
visitTaskList: [],
|
||||
// visitTaskList: sessionStorage.getItem('visitTaskList') ? JSON.parse(sessionStorage.getItem('visitTaskList')) : [],
|
||||
organList: [],
|
||||
seriesStack: [],
|
||||
activeHangingAgreement: hangingAgreement[0],
|
||||
|
@ -166,7 +166,7 @@ const actions = {
|
|||
item.IsInit = false
|
||||
})
|
||||
state.visitTaskList = res.Result
|
||||
sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
// sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
const currentTaskIdx = res.Result.findIndex(item => item.IsCurrentTask)
|
||||
if (currentTaskIdx > -1) {
|
||||
state.currentTaskId = res.Result[currentTaskIdx].VisitTaskId
|
||||
|
@ -178,7 +178,7 @@ const actions = {
|
|||
},
|
||||
resetVisitTasks({ state }) {
|
||||
return new Promise(resolve => {
|
||||
sessionStorage.setItem('visitTaskList', '')
|
||||
// sessionStorage.setItem('visitTaskList', '')
|
||||
state.visitTaskList = []
|
||||
state.currentTaskId = ''
|
||||
state.activeSeries = {}
|
||||
|
@ -209,14 +209,25 @@ const actions = {
|
|||
var seriesList = []
|
||||
study.SeriesList.forEach((series, index) => {
|
||||
const imageIds = []
|
||||
|
||||
series.InstancePathList.forEach((path) => {
|
||||
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? Vue.prototype.OSSclientConfig.basePath : Vue.prototype.OSSclientConfig.basePath}${path}`)
|
||||
const instanceList = []
|
||||
// series.InstancePathList.forEach((path) => {
|
||||
// imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? Vue.prototype.OSSclientConfig.basePath : Vue.prototype.OSSclientConfig.basePath}${path}`)
|
||||
// })
|
||||
series.InstanceInfoList.forEach(instance => {
|
||||
if (instance.NumberOfFrames && instance.NumberOfFrames > 1) {
|
||||
for (let i = 0; i < instance.NumberOfFrames; i++) {
|
||||
const path = `${instance.Path}?frame=${i}&instanceId=${instance.Id}`
|
||||
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? Vue.prototype.OSSclientConfig.basePath : Vue.prototype.OSSclientConfig.basePath}${path}`)
|
||||
}
|
||||
} else {
|
||||
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? Vue.prototype.OSSclientConfig.basePath : Vue.prototype.OSSclientConfig.basePath}${instance.Path}?instanceId=${instance.Id}`)
|
||||
}
|
||||
instanceList.push(instance.Id)
|
||||
})
|
||||
seriesList.push({
|
||||
isDicom: study.IsDicom,
|
||||
imageIds: imageIds,
|
||||
instanceList: series.InstanceList,
|
||||
instanceList: instanceList,
|
||||
seriesId: series.Id,
|
||||
imageIdIndex: 0,
|
||||
seriesUid: series.SeriesInstanceUid,
|
||||
|
@ -287,7 +298,7 @@ const actions = {
|
|||
}
|
||||
}
|
||||
|
||||
sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
// sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
resolve()
|
||||
}).catch(() => { resolve() })
|
||||
})
|
||||
|
@ -303,7 +314,7 @@ const actions = {
|
|||
})
|
||||
})
|
||||
}
|
||||
sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
// sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
resolve()
|
||||
})
|
||||
},
|
||||
|
@ -322,7 +333,7 @@ const actions = {
|
|||
state.visitTaskList[index].Questions = res.Result
|
||||
state.visitTaskList[index].questionsInit = true
|
||||
state.visitTaskList[index].QuestionMarkInfoList = res.OtherInfo.QuestionMarkInfoList
|
||||
sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
// sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
resolve()
|
||||
}).catch(() => { resolve() })
|
||||
}
|
||||
|
@ -340,7 +351,7 @@ const actions = {
|
|||
state.visitTaskList[index].Questions = res.Result
|
||||
state.visitTaskList[index].questionsInit = true
|
||||
state.visitTaskList[index].QuestionMarkInfoList = res.OtherInfo.QuestionMarkInfoList
|
||||
sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
// sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
resolve()
|
||||
}).catch(() => { resolve() })
|
||||
})
|
||||
|
@ -359,7 +370,7 @@ const actions = {
|
|||
var list = getQuestions(res.Result.SinglePage)
|
||||
state.visitTaskList[index].ReadingQuestions = list
|
||||
state.visitTaskList[index].readingQuestionsInit = true
|
||||
sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
// sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
resolve()
|
||||
}).catch(() => { resolve() })
|
||||
}
|
||||
|
@ -376,7 +387,7 @@ const actions = {
|
|||
var list = getQuestions(res.Result.SinglePage)
|
||||
state.visitTaskList[index].ReadingQuestions = list
|
||||
state.visitTaskList[index].readingQuestionsInit = true
|
||||
sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
// sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
resolve()
|
||||
}).catch(() => { resolve() })
|
||||
})
|
||||
|
@ -387,7 +398,7 @@ const actions = {
|
|||
if (index > -1) {
|
||||
state.visitTaskList[index].ReadingQuestions = obj.questions
|
||||
}
|
||||
sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
// sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
resolve()
|
||||
})
|
||||
},
|
||||
|
@ -399,7 +410,7 @@ const actions = {
|
|||
questions = findQuestionAndAddLesion(questions, obj)
|
||||
state.visitTaskList[index].ReadingQuestions = questions
|
||||
}
|
||||
sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
// sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
resolve()
|
||||
})
|
||||
},
|
||||
|
@ -411,7 +422,7 @@ const actions = {
|
|||
questions = findQuestionAndUpdateLesion(questions, obj)
|
||||
state.visitTaskList[index].ReadingQuestions = questions
|
||||
}
|
||||
sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
// sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
resolve()
|
||||
})
|
||||
},
|
||||
|
@ -423,7 +434,7 @@ const actions = {
|
|||
questions = findQuestionAndRemoveLesion(questions, obj)
|
||||
state.visitTaskList[index].ReadingQuestions = questions
|
||||
}
|
||||
sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
// sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
resolve()
|
||||
})
|
||||
},
|
||||
|
@ -444,7 +455,7 @@ const actions = {
|
|||
})
|
||||
state.visitTaskList[index].MeasureData = arr
|
||||
state.visitTaskList[index].measureDataInit = true
|
||||
sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
// sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
resolve()
|
||||
}).catch(() => { resolve() })
|
||||
}
|
||||
|
@ -471,7 +482,7 @@ const actions = {
|
|||
})
|
||||
state.visitTaskList[index].MeasureData = arr
|
||||
state.visitTaskList[index].measureDataInit = true
|
||||
sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
// sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
resolve()
|
||||
}).catch(() => { resolve() })
|
||||
}
|
||||
|
@ -511,7 +522,7 @@ const actions = {
|
|||
await deleteCustomTag(obj.questionInfo.Id)
|
||||
state.visitTaskList[index].MeasureData = measureData
|
||||
}
|
||||
sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
// sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
resolve()
|
||||
})
|
||||
},
|
||||
|
@ -529,7 +540,7 @@ const actions = {
|
|||
})
|
||||
state.visitTaskList[index].MeasureData = arr
|
||||
state.visitTaskList[index].measureDataInit = true
|
||||
sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
// sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
resolve()
|
||||
}).catch(() => { resolve() })
|
||||
})
|
||||
|
@ -548,7 +559,7 @@ const actions = {
|
|||
})
|
||||
state.visitTaskList[index].MeasureData = arr
|
||||
state.visitTaskList[index].measureDataInit = true
|
||||
sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
// sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
resolve()
|
||||
}).catch(() => { resolve() })
|
||||
})
|
||||
|
@ -580,7 +591,7 @@ const actions = {
|
|||
state.visitTaskList[index].MeasureData.push(obj.data)
|
||||
console.log('新增标记成功')
|
||||
}
|
||||
sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
// sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
console.log(state.visitTaskList)
|
||||
resolve()
|
||||
})
|
||||
|
@ -602,7 +613,7 @@ const actions = {
|
|||
state.visitTaskList[index].MeasureData.push(obj.data)
|
||||
console.log('新增标记成功')
|
||||
}
|
||||
sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
// sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
resolve()
|
||||
})
|
||||
},
|
||||
|
@ -622,7 +633,7 @@ const actions = {
|
|||
}
|
||||
state.visitTaskList[index].MeasureData = measureData
|
||||
}
|
||||
sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
// sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
resolve()
|
||||
})
|
||||
},
|
||||
|
@ -641,7 +652,7 @@ const actions = {
|
|||
Id: obj.Id
|
||||
})
|
||||
console.log('新增标记成功')
|
||||
sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
// sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
resolve()
|
||||
}
|
||||
var idx = measureData.findIndex(item => item.Id === obj.questionInfo.Id)
|
||||
|
@ -657,7 +668,7 @@ const actions = {
|
|||
state.visitTaskList[index].MeasureData.push(obj.MeasureData.data)
|
||||
console.log('新增标记成功')
|
||||
}
|
||||
sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
// sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
resolve()
|
||||
})
|
||||
},
|
||||
|
@ -702,7 +713,7 @@ const actions = {
|
|||
|
||||
// state.visitTaskList[index].MeasureData = measureData
|
||||
// }
|
||||
sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
// sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
resolve()
|
||||
})
|
||||
},
|
||||
|
@ -715,7 +726,7 @@ const actions = {
|
|||
measureData[idx].MeasureData.data.status = obj.status
|
||||
state.visitTaskList[index].MeasureData = measureData
|
||||
}
|
||||
sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
// sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
resolve()
|
||||
})
|
||||
},
|
||||
|
@ -726,8 +737,6 @@ const actions = {
|
|||
resolve()
|
||||
} else {
|
||||
var studyList = []
|
||||
// getVisitStudyList
|
||||
// getReadingVisitStudyList
|
||||
getReadingVisitStudyList(obj.trialId, obj.subjectVisitId, obj.visitTaskId).then(res => {
|
||||
res.Result.forEach((study, studyIndex) => {
|
||||
const data = {}
|
||||
|
@ -743,19 +752,30 @@ const actions = {
|
|||
var seriesList = []
|
||||
study.SeriesList.forEach((series, seriesIndex) => {
|
||||
const imageIds = []
|
||||
try {
|
||||
// if (~window.location.href.indexOf('3c210000-3e2c-0016-4247-08dabf28e96b')) {
|
||||
series.InstancePathList.forEach((path) => {
|
||||
// var path = id.split('/')[id.split('/').length - 1]
|
||||
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? Vue.prototype.OSSclientConfig.basePath : Vue.prototype.OSSclientConfig.basePath}${path}`)
|
||||
})
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
const instanceList = []
|
||||
// try {
|
||||
// series.InstancePathList.forEach((path) => {
|
||||
// imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? Vue.prototype.OSSclientConfig.basePath : Vue.prototype.OSSclientConfig.basePath}${path}`)
|
||||
// })
|
||||
// } catch (e) {
|
||||
// console.log(e)
|
||||
// }
|
||||
series.InstanceInfoList.forEach(instance => {
|
||||
if (instance.NumberOfFrames && instance.NumberOfFrames > 1) {
|
||||
for (let i = 0; i < instance.NumberOfFrames; i++) {
|
||||
const path = `${instance.Path}?frame=${i}&instanceId=${instance.Id}`
|
||||
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? Vue.prototype.OSSclientConfig.basePath : Vue.prototype.OSSclientConfig.basePath}${path}`)
|
||||
}
|
||||
} else {
|
||||
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? Vue.prototype.OSSclientConfig.basePath : Vue.prototype.OSSclientConfig.basePath}${instance.Path}?instanceId=${instance.Id}`)
|
||||
}
|
||||
instanceList.push(instance.Id)
|
||||
})
|
||||
seriesList.push({
|
||||
isDicom: study.IsDicom,
|
||||
imageIds: imageIds,
|
||||
instanceList: series.InstanceList,
|
||||
instanceInfoList: series.InstanceInfoList,
|
||||
instanceList: instanceList,
|
||||
seriesId: series.Id,
|
||||
imageIdIndex: 0,
|
||||
seriesUid: series.SeriesInstanceUid,
|
||||
|
@ -782,7 +802,8 @@ const actions = {
|
|||
isLoading: false,
|
||||
isBeMark: series.IsBeMark,
|
||||
ww: series.WindowWidth,
|
||||
wc: series.WindowCenter
|
||||
wc: series.WindowCenter,
|
||||
isExistMutiFrames: series.IsExistMutiFrames
|
||||
})
|
||||
})
|
||||
data.SeriesList = seriesList
|
||||
|
@ -790,7 +811,7 @@ const actions = {
|
|||
})
|
||||
state.visitTaskList[index].StudyList = studyList
|
||||
state.visitTaskList[index].studyListInit = true
|
||||
sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
// sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
resolve()
|
||||
}).catch(() => { resolve() })
|
||||
}
|
||||
|
@ -823,7 +844,7 @@ const actions = {
|
|||
}
|
||||
}
|
||||
state.visitTaskList[index].StudyList = studyList
|
||||
sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
// sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
} else {
|
||||
// console.log(obj)
|
||||
}
|
||||
|
@ -843,7 +864,7 @@ const actions = {
|
|||
studyList[obj.studyIndex].SeriesList[obj.seriesIndex].loadStatus = true
|
||||
}
|
||||
state.visitTaskList[obj.visitTaskindex].StudyList = studyList
|
||||
sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
// sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
}
|
||||
resolve()
|
||||
})
|
||||
|
@ -851,7 +872,7 @@ const actions = {
|
|||
setStatus({ state }, obj) {
|
||||
var index = state.visitTaskList.findIndex(i => i.VisitTaskId === obj.visitTaskId)
|
||||
state.visitTaskList[index].IsInit = true
|
||||
sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
// sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
},
|
||||
setActiveSeries({ state }, series) {
|
||||
return new Promise(resolve => {
|
||||
|
@ -896,7 +917,7 @@ const actions = {
|
|||
state.visitTaskList[index].QuestionMarkInfoList.push(obj.data)
|
||||
console.log('新增标记成功')
|
||||
}
|
||||
sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
// sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
resolve()
|
||||
})
|
||||
},
|
||||
|
@ -912,7 +933,7 @@ const actions = {
|
|||
}
|
||||
state.visitTaskList[index].QuestionMarkInfoList = measureData
|
||||
}
|
||||
sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
// sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
resolve()
|
||||
})
|
||||
}
|
||||
|
|
|
@ -754,14 +754,10 @@ export default {
|
|||
getToolStateInfo(e) {
|
||||
const { element, currentPoints, image, viewport } = e.detail
|
||||
var imageId = image.imageId
|
||||
var instanceId = imageId.split('/')[imageId.split('/').length - 1]
|
||||
var frame = null
|
||||
if (instanceId.includes('?frame=')) {
|
||||
frame = instanceId.split('?frame=')[1]
|
||||
instanceId = instanceId.split('?frame=')[0]
|
||||
}
|
||||
const imageInfo = this.getInstanceInfo(imageId)
|
||||
var instanceId = imageInfo.instanceId
|
||||
var frame = imageInfo.frame
|
||||
this.stack.frame = !isNaN(parseInt(frame)) ? parseInt(frame) : 0
|
||||
instanceId = instanceId.split('.')[0]
|
||||
const ToolStateManager = cornerstoneTools.globalImageIdSpecificToolStateManager
|
||||
for (var m = 0; m < this.measuredTools.length; m++) {
|
||||
var toolType = this.measuredTools[m]
|
||||
|
@ -924,11 +920,8 @@ export default {
|
|||
if (this.readingTaskState >= 2) return
|
||||
var element = cornerstone.getEnabledElement(this.canvas)
|
||||
var { imageId } = element.image
|
||||
var instanceId = imageId.split('/')[imageId.split('/').length - 1]
|
||||
if (instanceId.includes('?frame=')) {
|
||||
instanceId = instanceId.split('?frame=')[0]
|
||||
}
|
||||
instanceId = instanceId.split('.')[0]
|
||||
const imageInfo = this.getInstanceInfo(imageId)
|
||||
var instanceId = imageInfo.instanceId
|
||||
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.stack.visitTaskId && i.IsCurrentTask && i.ReadingTaskState < 2)
|
||||
if (idx === -1) return
|
||||
this.measureData = this.visitTaskList[idx].MeasureData
|
||||
|
@ -991,15 +984,10 @@ export default {
|
|||
mouseClick(e) {
|
||||
const { element, currentPoints, image, viewport } = e.detail
|
||||
var imageId = image.imageId
|
||||
var instanceId = imageId.split('/')[imageId.split('/').length - 1]
|
||||
var frame = null
|
||||
if (instanceId.includes('?frame=')) {
|
||||
frame = instanceId.split('?frame=')[1]
|
||||
instanceId = instanceId.split('?frame=')[0]
|
||||
}
|
||||
const imageInfo = this.getInstanceInfo(imageId)
|
||||
var instanceId = imageInfo.instanceId
|
||||
var frame = imageInfo.frame
|
||||
this.stack.frame = !isNaN(parseInt(frame)) ? parseInt(frame) : 0
|
||||
instanceId = instanceId.split('.')[0]
|
||||
|
||||
const ToolStateManager = cornerstoneTools.globalImageIdSpecificToolStateManager
|
||||
for (let t = 0; t < this.measuredTools.length; t++) {
|
||||
var toolType = this.measuredTools[t]
|
||||
|
@ -1095,14 +1083,10 @@ export default {
|
|||
this.minVistNum = this.visitTaskList[0].VisitTaskNum
|
||||
this.measureData = this.visitTaskList[idx].MeasureData
|
||||
const imageId = this.stack.imageIds[this.stack.currentImageIdIndex]
|
||||
var instanceId = imageId.split('/')[imageId.split('/').length - 1]
|
||||
var frame = null
|
||||
if (instanceId.includes('?frame=')) {
|
||||
frame = instanceId.split('?frame=')[1]
|
||||
instanceId = instanceId.split('?frame=')[0]
|
||||
}
|
||||
const imageInfo = this.getInstanceInfo(imageId)
|
||||
var instanceId = imageInfo.instanceId
|
||||
var frame = imageInfo.frame
|
||||
this.stack.frame = !isNaN(parseInt(frame)) ? parseInt(frame) : 0
|
||||
instanceId = instanceId.split('.')[0]
|
||||
this.stack.instanceId = instanceId
|
||||
const ToolStateManager = cornerstoneTools.globalImageIdSpecificToolStateManager
|
||||
ToolStateManager.clearImageIdToolState(dicomSeries.imageIds)
|
||||
|
@ -1126,15 +1110,18 @@ export default {
|
|||
// }
|
||||
// resolve()
|
||||
// })
|
||||
this.loading = true
|
||||
cornerstone.loadAndCacheImage(this.stack.imageIds[this.stack.currentImageIdIndex])
|
||||
.then(async image => {
|
||||
await scope.onFirstImageLoaded(image)
|
||||
scope.loading = false
|
||||
resolve()
|
||||
})
|
||||
.catch((error) => {
|
||||
if (error.error && error.error.message) {
|
||||
this.$alert(error.error.message)
|
||||
}
|
||||
scope.loading = false
|
||||
resolve()
|
||||
})
|
||||
})
|
||||
|
@ -1208,14 +1195,10 @@ export default {
|
|||
|
||||
this.stack.firstImageLoading = false
|
||||
this.toolState.dicomInfoVisible = true
|
||||
var instanceId = image.imageId.split('/')[image.imageId.split('/').length - 1]
|
||||
var frame = null
|
||||
if (instanceId.includes('?frame=')) {
|
||||
frame = instanceId.split('?frame=')[1]
|
||||
instanceId = instanceId.split('?frame=')[0]
|
||||
}
|
||||
const imageInfo = this.getInstanceInfo(image.imageId)
|
||||
var instanceId = imageInfo.instanceId
|
||||
var frame = imageInfo.frame
|
||||
this.stack.frame = !isNaN(parseInt(frame)) ? parseInt(frame) : 0
|
||||
instanceId = instanceId.split('.')[0]
|
||||
this.stack.instanceId = instanceId
|
||||
this.height = (this.stack.currentImageIdIndex) * 100 / (this.stack.imageIds.length - 1)
|
||||
this.resetWwwc()
|
||||
|
@ -1281,14 +1264,10 @@ export default {
|
|||
this.stack.imageRendered = true
|
||||
// const { element } = e.detail
|
||||
var imageId = e.detail.image.imageId
|
||||
var instanceId = imageId.split('/')[imageId.split('/').length - 1]
|
||||
var frame = null
|
||||
if (instanceId.includes('?frame=')) {
|
||||
frame = instanceId.split('?frame=')[1]
|
||||
instanceId = instanceId.split('?frame=')[0]
|
||||
}
|
||||
const imageInfo = this.getInstanceInfo(imageId)
|
||||
var instanceId = imageInfo.instanceId
|
||||
var frame = imageInfo.frame
|
||||
this.stack.frame = !isNaN(parseInt(frame)) ? parseInt(frame) : 0
|
||||
instanceId = instanceId.split('.')[0]
|
||||
if (this.imageId !== instanceId) {
|
||||
this.getOrientationMarker(e.detail.element)
|
||||
// 初次加载时,如果该影像存在标记,则以标记的窗宽窗位为初始化默认值,否则以序列的窗宽窗位为初始化默认值
|
||||
|
@ -1344,14 +1323,10 @@ export default {
|
|||
this.activeTool = 1
|
||||
this.activeToolName = ''
|
||||
var { imageId } = element.image
|
||||
var instanceId = imageId.split('/')[imageId.split('/').length - 1]
|
||||
var frame = null
|
||||
if (instanceId.includes('?frame=')) {
|
||||
frame = instanceId.split('?frame=')[1]
|
||||
instanceId = instanceId.split('?frame=')[0]
|
||||
}
|
||||
const imageInfo = this.getInstanceInfo(imageId)
|
||||
var instanceId = imageInfo.instanceId
|
||||
var frame = imageInfo.frame
|
||||
this.stack.frame = !isNaN(parseInt(frame)) ? parseInt(frame) : 0
|
||||
instanceId = instanceId.split('.')[0]
|
||||
if (e.detail.toolName === 'Length' || e.detail.toolName === 'ArrowAnnotate' || e.detail.toolName === 'RectangleRoi') {
|
||||
const measureData = {}
|
||||
measureData.studyId = this.stack.studyId
|
||||
|
@ -1468,14 +1443,10 @@ export default {
|
|||
var element = cornerstone.getEnabledElement(this.canvas)
|
||||
var viewport = element.viewport
|
||||
var { imageId } = element.image
|
||||
var instanceId = imageId.split('/')[imageId.split('/').length - 1]
|
||||
var frame = null
|
||||
if (instanceId.includes('?frame=')) {
|
||||
frame = instanceId.split('?frame=')[1]
|
||||
instanceId = instanceId.split('?frame=')[0]
|
||||
}
|
||||
const imageInfo = this.getInstanceInfo(imageId)
|
||||
var instanceId = imageInfo.instanceId
|
||||
var frame = imageInfo.frame
|
||||
this.stack.frame = !isNaN(parseInt(frame)) ? parseInt(frame) : 0
|
||||
instanceId = instanceId.split('.')[0]
|
||||
|
||||
var uuid = measurementData.uuid
|
||||
var idx = this.measureData.findIndex(item => item.MeasureData && item.MeasureData.data && item.MeasureData.data.uuid === uuid)
|
||||
|
@ -1533,11 +1504,8 @@ export default {
|
|||
// 判断有没有标记 获取第一个标记
|
||||
var element = cornerstone.getEnabledElement(this.canvas)
|
||||
var { imageId } = element.image
|
||||
var instanceId = imageId.split('/')[imageId.split('/').length - 1]
|
||||
if (instanceId.includes('?frame=')) {
|
||||
instanceId = instanceId.split('?frame=')[0]
|
||||
}
|
||||
instanceId = instanceId.split('.')[0]
|
||||
const imageInfo = this.getInstanceInfo(imageId)
|
||||
var instanceId = imageInfo.instanceId
|
||||
var idx = this.measureData.findIndex(item => item.InstanceId === instanceId)
|
||||
var measureData = null
|
||||
if (idx > -1) {
|
||||
|
@ -1952,6 +1920,14 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
getInstanceInfo(imageId) {
|
||||
const params = {}
|
||||
const searchParams = new URLSearchParams(imageId.split('?')[1])
|
||||
for (const [key, value] of searchParams.entries()) {
|
||||
params[key] = value
|
||||
}
|
||||
return params
|
||||
},
|
||||
preventDefault(e) {
|
||||
e.stopImmediatePropagation()
|
||||
e.stopPropagation()
|
||||
|
|
|
@ -292,6 +292,51 @@
|
|||
<div class="text">{{ $t('trials:lugano:button:fusion') }}</div>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<div class="tool-frame">
|
||||
<!-- 第一帧 -->
|
||||
<el-tooltip class="item" effect="dark" :content="$t('trials:dicom-show:firstframe')" placement="bottom">
|
||||
<div class="icon" @click.prevent="scrollPage(-99999)">
|
||||
<svg-icon icon-class="firstframe" class="svg-icon" />
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<!-- 上一帧 -->
|
||||
<el-tooltip class="item" effect="dark" :content="$t('trials:dicom-show:previousframe')" placement="bottom">
|
||||
<div class="icon" @click.prevent="scrollPage(-1)">
|
||||
<svg-icon icon-class="previousframe" class="svg-icon" />
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<!-- 播放/暂停 -->
|
||||
<el-tooltip class="item" effect="dark" :content="clipPlaying?$t('trials:dicom-show:play'):$t('trials:dicom-show:stop')" placement="bottom">
|
||||
<div class="icon" @click.prevent="toggleClipPlay">
|
||||
<svg-icon :icon-class="clipPlaying?'stop':'play'" class="svg-icon" />
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<!-- 下一帧 -->
|
||||
<el-tooltip class="item" effect="dark" :content="$t('trials:dicom-show:nextframe')" placement="bottom">
|
||||
<div class="icon" @click.prevent="scrollPage(1)">
|
||||
<svg-icon icon-class="nextframe" class="svg-icon" />
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<!-- 最后一帧 -->
|
||||
<el-tooltip class="item" effect="dark" :content="$t('trials:dicom-show:lastframe')" placement="bottom">
|
||||
<div class="icon" @click.prevent="scrollPage(99999)">
|
||||
<svg-icon icon-class="lastframe" class="svg-icon" />
|
||||
</div>
|
||||
</el-tooltip>
|
||||
|
||||
<el-tooltip class="item" effect="dark" :content="$t('trials:dicom-show:speed')" placement="bottom">
|
||||
<select class="select-wrapper" :disabled="clipPlaying" @change="setDicomCanvasfps($event)">
|
||||
<!-- 默认值 -->
|
||||
<option :value="5">{{ $t('trials:dicom-show:default') }}</option>
|
||||
<option :value="5">5</option>
|
||||
<option :value="10">10</option>
|
||||
<option :value="15">15</option>
|
||||
<option :value="20">20</option>
|
||||
<option :value="25">25</option>
|
||||
<option :value="30">30</option>
|
||||
</select>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
|
||||
<el-tooltip class="item" effect="dark" :content="$t('trials:reading:button:reset')" placement="bottom">
|
||||
<div class="tool-wrapper">
|
||||
|
@ -789,7 +834,8 @@ export default {
|
|||
digitPlaces: 2,
|
||||
activeCanvasWW: null,
|
||||
activeCanvasWC: null,
|
||||
activeTaskInfo: {}
|
||||
activeTaskInfo: {},
|
||||
clipPlaying: false
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -844,6 +890,16 @@ export default {
|
|||
imageQualityIssues: {
|
||||
immediate: true,
|
||||
handler(v) {}
|
||||
},
|
||||
currentDicomCanvasIndex: {
|
||||
immediate: true,
|
||||
handler(v) {
|
||||
if (this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`] && this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0]) {
|
||||
this.clipPlaying = this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].toolState.clipPlaying
|
||||
} else {
|
||||
this.clipPlaying = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
|
@ -1870,6 +1926,18 @@ export default {
|
|||
}
|
||||
this.activeTool = toolName
|
||||
},
|
||||
// 切换帧
|
||||
scrollPage(i) {
|
||||
this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].scrollPage(i)
|
||||
},
|
||||
// 播放/暂停
|
||||
toggleClipPlay() {
|
||||
this.clipPlaying = !this.clipPlaying
|
||||
this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].toggleClipPlay()
|
||||
},
|
||||
setDicomCanvasfps(event) {
|
||||
this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].setFps(event.target.value)
|
||||
},
|
||||
// 添加标记
|
||||
setMeasureData(data) {
|
||||
this.$refs['measurementList'].setMeasuredData(data)
|
||||
|
@ -2129,7 +2197,7 @@ export default {
|
|||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-right: 30px;
|
||||
margin-right: 20px;
|
||||
.icon{
|
||||
padding: 5px;
|
||||
border: 1px solid #404040;
|
||||
|
@ -2148,6 +2216,39 @@ export default {
|
|||
display: none;
|
||||
}
|
||||
}
|
||||
.tool-frame{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
margin-right: 20px;
|
||||
border: 1px solid #404040;
|
||||
.icon{
|
||||
padding: 5px;
|
||||
border-right: 1px solid #404040;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
.svg-icon{
|
||||
font-size:20px;
|
||||
color:#ddd;
|
||||
}
|
||||
}
|
||||
.select-wrapper{
|
||||
width: 60px;
|
||||
background-color: black;
|
||||
color: #ddd;
|
||||
border: none;
|
||||
font-size: 13px;
|
||||
outline: none;
|
||||
}
|
||||
.text{
|
||||
position: relative;
|
||||
font-size: 12px;
|
||||
margin-top: 5px;
|
||||
color: #d0d0d0;
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.tool_active{
|
||||
background-color: #607d8b;
|
||||
}
|
||||
|
|
|
@ -49,7 +49,42 @@
|
|||
/>
|
||||
<div class="image-desc">
|
||||
<div class="flex-div">
|
||||
<div v-if="!study.IsCriticalSequence">#{{ series.seriesNumber }} </div>
|
||||
<div style="display: flex;justify-content: space-between;width:100%;">
|
||||
<div v-if="!study.IsCriticalSequence">#{{ series.seriesNumber }} </div>
|
||||
<div v-if="series.isExistMutiFrames && series.instanceCount > 1">
|
||||
<el-popover
|
||||
placement="right"
|
||||
trigger="hover"
|
||||
popper-class="instance_frame_wrapper"
|
||||
>
|
||||
<div
|
||||
v-for="(instance, idx) in series.instanceInfoList"
|
||||
:key="instance.Id"
|
||||
class="frame_content"
|
||||
:style="{'margin-bottom':idx<series.instanceInfoList.length-1? '5px':'0px'}"
|
||||
@click.stop="showMultiFrames(index,series, i, instance)"
|
||||
>
|
||||
<!-- <div>
|
||||
<img
|
||||
class="image-preview"
|
||||
:src="series.previewImageUrl"
|
||||
crossorigin="anonymous"
|
||||
alt=""
|
||||
style="width: 40px;height:40px;"
|
||||
fit="fill"
|
||||
>
|
||||
</div> -->
|
||||
<div>
|
||||
<div>{{ instance.InstanceNumber }}</div>
|
||||
<div>{{ `${instance.NumberOfFrames > 0 ? instance.NumberOfFrames : 1} frame` }}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<i slot="reference" class="el-icon-connection" style="font-size: 15px;cursor: pointer;" />
|
||||
</el-popover>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="series.isDicom && series.prefetchInstanceCount<series.instanceCount && series.modality!== 'SR'">
|
||||
<!-- 下载 -->
|
||||
<el-tooltip v-if="!series.isLoading" class="item" effect="dark" :content="$t('trials:reading:button:download')" placement="bottom">
|
||||
|
@ -367,6 +402,7 @@ export default {
|
|||
},
|
||||
|
||||
async getInitSeries() {
|
||||
console.log('getInitSeries')
|
||||
var seriesList = []
|
||||
var isReadingTaskViewInOrder = parseInt(this.$router.currentRoute.query.isReadingTaskViewInOrder)
|
||||
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId)
|
||||
|
@ -647,6 +683,48 @@ export default {
|
|||
|
||||
store.dispatch('reading/setActiveSeries', series)
|
||||
},
|
||||
showMultiFrames(studyIndex, series, seriesIndex, instanceInfo) {
|
||||
this.currentSeriesIndex = seriesIndex
|
||||
const imageIds = []
|
||||
if (instanceInfo.NumberOfFrames && instanceInfo.NumberOfFrames > 1) {
|
||||
for (let j = 0; j < instanceInfo.NumberOfFrames; j++) {
|
||||
const path = `${instanceInfo.Path}?frame=${j}&instanceId=${instanceInfo.Id}`
|
||||
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${path}`)
|
||||
}
|
||||
} else {
|
||||
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${instanceInfo.Path}?instanceId=${instanceInfo.Id}`)
|
||||
}
|
||||
this.studyIndex = studyIndex
|
||||
this.seriesIndex = seriesIndex
|
||||
this.studyList[studyIndex].SeriesList[seriesIndex].measureData = this.measureData
|
||||
var dicomStatck = this.studyList[studyIndex].SeriesList[seriesIndex]
|
||||
dicomStatck.imageIds = imageIds
|
||||
dicomStatck.imageIdIndex = 0
|
||||
console.log(dicomStatck)
|
||||
this.$emit('loadImageStack', dicomStatck)
|
||||
this.loopLoadStatus = -1
|
||||
series.isLoading = true
|
||||
var isAddToTakPool = false
|
||||
if (this.showSeriesList.includes(`${studyIndex}_${seriesIndex}`)) {
|
||||
isAddToTakPool = true
|
||||
} else {
|
||||
this.showSeriesList.push(`${studyIndex}_${seriesIndex}`)
|
||||
}
|
||||
if (!isAddToTakPool) {
|
||||
var priority = parseInt(new Date().getTime())
|
||||
series.imageIds.map((imageId) => {
|
||||
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
|
||||
})
|
||||
if (this.imageList.length > 0) {
|
||||
this.loopLoadStatus = 0
|
||||
this.loopLoad()
|
||||
}
|
||||
} else {
|
||||
requestPoolManager.changePriority(series.seriesId)
|
||||
}
|
||||
|
||||
DicomEvent.$emit('loadMeasurementList', { visitTaskId: this.visitTaskId, taskBlindName: this.taskBlindName })
|
||||
},
|
||||
setSeriesActive(obj) {
|
||||
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId)
|
||||
if (idx === -1) return
|
||||
|
@ -936,6 +1014,7 @@ export default {
|
|||
padding: 1px;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
/deep/.el-collapse{
|
||||
|
@ -986,5 +1065,29 @@ export default {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
<style>
|
||||
.instance_frame_wrapper{
|
||||
min-width: 120px;
|
||||
background-color: #2c2c2c;
|
||||
border: 1px solid #2c2c2c;
|
||||
padding: 5px;
|
||||
}
|
||||
.frame_content{
|
||||
height: 50px;
|
||||
padding: 5px;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
color: #ddd;
|
||||
font-size: 12px;
|
||||
border: 1px solid #404040;
|
||||
}
|
||||
.frame_content:hover {
|
||||
/* font-weight: bold; */
|
||||
/* box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); */
|
||||
cursor: pointer;
|
||||
/* color: #428bca; */
|
||||
border-color: #213a54 !important;
|
||||
background-color: #213a54;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
<i class="el-icon-caret-right" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="info-series">
|
||||
<div class="info-series">
|
||||
<h2 v-if="isReadingShowSubjectInfo" style="color:#f44336;padding: 5px 0px;margin: 0;">{{ subjectCode }} {{ stack.taskBlindName }}</h2>
|
||||
<div v-show="dicomInfo.series">Series: #{{ dicomInfo.series }}</div>
|
||||
<div>Image: #{{ dicomInfo.frame }}</div>
|
||||
|
@ -99,8 +99,8 @@
|
|||
</div>
|
||||
|
||||
<div class="info-instance">
|
||||
<div v-show="dicomInfo.location">Location: {{ dicomInfo.location }}</div>
|
||||
<div v-show="dicomInfo.thick">Slice Thickness: {{ dicomInfo.thick }}mm</div>
|
||||
<div v-if="dicomInfo.location">Location: {{ `${Number(dicomInfo.location).toFixed(digitPlaces)} mm` }}</div>
|
||||
<div v-show="dicomInfo.thick">Slice Thickness: {{ `${dicomInfo.thick} mm` }}</div>
|
||||
<div v-show="dicomInfo.wwwc">WW/WL: {{ dicomInfo.wwwc }}</div>
|
||||
</div>
|
||||
|
||||
|
@ -220,7 +220,8 @@ export default {
|
|||
visitTaskId: '',
|
||||
taskBlindName: '',
|
||||
frame: null,
|
||||
imageRendered: false
|
||||
imageRendered: false,
|
||||
isExistsClinicalData: false
|
||||
// preventCache: true
|
||||
},
|
||||
dicomInfo: {
|
||||
|
@ -330,6 +331,7 @@ export default {
|
|||
},
|
||||
|
||||
mounted() {
|
||||
console.log(cornerstoneTools)
|
||||
this.subjectCode = this.$router.currentRoute.query.subjectCode
|
||||
document.addEventListener('mouseup', () => {
|
||||
this.sliderMouseup()
|
||||
|
@ -373,10 +375,10 @@ export default {
|
|||
}
|
||||
)
|
||||
|
||||
// this.canvas.addEventListener(
|
||||
// 'cornerstonetoolsmeasurementremoved',
|
||||
// this.onMeasurementremoved
|
||||
// )
|
||||
this.canvas.addEventListener(
|
||||
'cornerstonetoolsmeasurementremoved',
|
||||
this.onMeasurementremoved
|
||||
)
|
||||
// EVENTS.MOUSE_UP
|
||||
this.canvas.addEventListener('cornerstonetoolsmouseup', this.mouseUp)
|
||||
this.canvas.addEventListener('cornerstonetoolsmousedown', this.mouseDown)
|
||||
|
@ -477,7 +479,6 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
goViewer(e) {
|
||||
console.log('goViewer')
|
||||
console.log(this.$refs['sliderBox'].clientHeight)
|
||||
var height = e.offsetY * 100 / this.$refs['sliderBox'].clientHeight
|
||||
this.height = height
|
||||
|
@ -566,6 +567,7 @@ export default {
|
|||
showCancelButton: false,
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
|
||||
}).catch(() => {})
|
||||
e.stopImmediatePropagation()
|
||||
e.stopPropagation()
|
||||
|
@ -651,7 +653,7 @@ export default {
|
|||
if (PX < 0) return
|
||||
if (PX > boxHeight) return
|
||||
var height = PX * 100 / boxHeight
|
||||
var index = Math.trunc(this.stack.imageIds.length * this.height / 100)
|
||||
var index = Math.trunc(this.stack.imageIds.length * height / 100)
|
||||
index = index > this.stack.imageIds.length ? this.stack.imageIds.length : index < 0 ? 0 : index
|
||||
// if (!cornerstone.imageCache.getImageLoadObject(this.stack.imageIds[index])) return
|
||||
this.height = height
|
||||
|
@ -663,6 +665,7 @@ export default {
|
|||
this.sliderInfo.isMove = false
|
||||
},
|
||||
getMeasureData() {
|
||||
console.log('getMeasureData')
|
||||
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.stack.visitTaskId)
|
||||
this.measureData = this.visitTaskList[idx].MeasureData
|
||||
const ToolStateManager = cornerstoneTools.globalImageIdSpecificToolStateManager
|
||||
|
@ -736,14 +739,10 @@ export default {
|
|||
getToolStateInfo(e) {
|
||||
const { element, currentPoints, image, viewport } = e.detail
|
||||
var imageId = image.imageId
|
||||
var instanceId = imageId.split('/')[imageId.split('/').length - 1]
|
||||
var frame = null
|
||||
if (instanceId.includes('?frame=')) {
|
||||
frame = instanceId.split('?frame=')[1]
|
||||
instanceId = instanceId.split('?frame=')[0]
|
||||
}
|
||||
const imageInfo = this.getInstanceInfo(imageId)
|
||||
var instanceId = imageInfo.instanceId
|
||||
var frame = imageInfo.frame
|
||||
this.stack.frame = !isNaN(parseInt(frame)) ? parseInt(frame) : 0
|
||||
instanceId = instanceId.split('.')[0]
|
||||
const ToolStateManager = cornerstoneTools.globalImageIdSpecificToolStateManager
|
||||
for (var m = 0; m < this.measuredTools.length; m++) {
|
||||
var toolType = this.measuredTools[m]
|
||||
|
@ -771,6 +770,7 @@ export default {
|
|||
measureData.data = toolState.data[i]
|
||||
measureData.type = toolType
|
||||
measureData.thick = this.dicomInfo.thick
|
||||
measureData.location = this.dicomInfo.location
|
||||
var uuid = toolState.data[i].uuid
|
||||
var idx = this.measureData.findIndex(item => item.MeasureData && item.MeasureData.data && item.MeasureData.data.uuid === uuid)
|
||||
if (idx > -1) {
|
||||
|
@ -866,6 +866,7 @@ export default {
|
|||
renderMeasuredData(e) {
|
||||
this.stack.frame = !isNaN(parseInt(this.stack.frame)) ? parseInt(this.stack.frame) : 0
|
||||
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.stack.visitTaskId)
|
||||
if (idx === -1) return
|
||||
this.measureData = this.visitTaskList[idx].MeasureData
|
||||
const { element } = e.detail
|
||||
const ToolStateManager = cornerstoneTools.globalImageIdSpecificToolStateManager
|
||||
|
@ -904,11 +905,8 @@ export default {
|
|||
if (this.readingTaskState >= 2) return
|
||||
var element = cornerstone.getEnabledElement(this.canvas)
|
||||
var { imageId } = element.image
|
||||
var instanceId = imageId.split('/')[imageId.split('/').length - 1]
|
||||
if (instanceId.includes('?frame=')) {
|
||||
instanceId = instanceId.split('?frame=')[0]
|
||||
}
|
||||
instanceId = instanceId.split('.')[0]
|
||||
const imageInfo = this.getInstanceInfo(imageId)
|
||||
var instanceId = imageInfo.instanceId
|
||||
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.stack.visitTaskId && i.IsCurrentTask && i.ReadingTaskState < 2)
|
||||
if (idx === -1) return
|
||||
this.measureData = this.visitTaskList[idx].MeasureData
|
||||
|
@ -968,18 +966,13 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
async mouseClick(e) {
|
||||
mouseClick(e) {
|
||||
const { element, currentPoints, image, viewport } = e.detail
|
||||
var imageId = image.imageId
|
||||
var instanceId = imageId.split('/')[imageId.split('/').length - 1]
|
||||
var frame = null
|
||||
if (instanceId.includes('?frame=')) {
|
||||
frame = instanceId.split('?frame=')[1]
|
||||
instanceId = instanceId.split('?frame=')[0]
|
||||
}
|
||||
const imageInfo = this.getInstanceInfo(imageId)
|
||||
var instanceId = imageInfo.instanceId
|
||||
var frame = imageInfo.frame
|
||||
this.stack.frame = !isNaN(parseInt(frame)) ? parseInt(frame) : 0
|
||||
instanceId = instanceId.split('.')[0]
|
||||
|
||||
const ToolStateManager = cornerstoneTools.globalImageIdSpecificToolStateManager
|
||||
for (let t = 0; t < this.measuredTools.length; t++) {
|
||||
var toolType = this.measuredTools[t]
|
||||
|
@ -1010,6 +1003,7 @@ export default {
|
|||
measureData.data = toolState.data[i]
|
||||
measureData.type = toolType
|
||||
measureData.thick = this.dicomInfo.thick
|
||||
measureData.location = this.dicomInfo.location
|
||||
measureData.ww = Math.round(viewport.voi.windowWidth)
|
||||
measureData.wc = Math.round(viewport.voi.windowCenter)
|
||||
measureData.data.active = false
|
||||
|
@ -1049,6 +1043,7 @@ export default {
|
|||
this.stack.seriesIndex = dicomSeries.seriesIndex
|
||||
this.stack.sliceThickness = dicomSeries.sliceThickness
|
||||
this.stack.instanceCount = dicomSeries.instanceCount
|
||||
this.stack.isExistsClinicalData = dicomSeries.isExistsClinicalData
|
||||
// this.measuredData = dicomSeries.measuredData
|
||||
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === dicomSeries.visitTaskId)
|
||||
this.stack.visitTaskNum = this.visitTaskList[idx].VisitTaskNum
|
||||
|
@ -1058,18 +1053,15 @@ export default {
|
|||
} else {
|
||||
this.disabledMarks = []
|
||||
}
|
||||
|
||||
this.maxVistNum = this.visitTaskList[this.visitTaskList.length - 1].VisitTaskNum
|
||||
this.minVistNum = this.visitTaskList[0].VisitTaskNum
|
||||
this.measureData = this.visitTaskList[idx].MeasureData
|
||||
const imageId = this.stack.imageIds[this.stack.currentImageIdIndex]
|
||||
var instanceId = imageId.split('/')[imageId.split('/').length - 1]
|
||||
var frame = null
|
||||
if (instanceId.includes('?frame=')) {
|
||||
frame = instanceId.split('?frame=')[1]
|
||||
instanceId = instanceId.split('?frame=')[0]
|
||||
}
|
||||
const imageInfo = this.getInstanceInfo(imageId)
|
||||
var instanceId = imageInfo.instanceId
|
||||
var frame = imageInfo.frame
|
||||
this.stack.frame = !isNaN(parseInt(frame)) ? parseInt(frame) : 0
|
||||
instanceId = instanceId.split('.')[0]
|
||||
this.stack.instanceId = instanceId
|
||||
const ToolStateManager = cornerstoneTools.globalImageIdSpecificToolStateManager
|
||||
ToolStateManager.clearImageIdToolState(dicomSeries.imageIds)
|
||||
|
@ -1093,99 +1085,100 @@ export default {
|
|||
// }
|
||||
// resolve()
|
||||
// })
|
||||
this.loading = true
|
||||
cornerstone.loadAndCacheImage(this.stack.imageIds[this.stack.currentImageIdIndex])
|
||||
.then(image => {
|
||||
scope.onFirstImageLoaded(image)
|
||||
.then(async image => {
|
||||
await scope.onFirstImageLoaded(image)
|
||||
scope.loading = false
|
||||
resolve()
|
||||
})
|
||||
.catch((error) => {
|
||||
if (error.error && error.error.message) {
|
||||
this.$alert(error.error.message)
|
||||
}
|
||||
scope.loading = false
|
||||
resolve()
|
||||
})
|
||||
})
|
||||
},
|
||||
onFirstImageLoaded(image) {
|
||||
console.log('onFirstImageLoaded')
|
||||
return new Promise(async resolve => {
|
||||
const element = this.$refs.canvas
|
||||
var viewport = cornerstone.getDefaultViewportForImage(this.canvas, image)
|
||||
cornerstone.displayImage(this.canvas, image, viewport)
|
||||
|
||||
const element = this.$refs.canvas
|
||||
var viewport = cornerstone.getDefaultViewportForImage(this.canvas, image)
|
||||
cornerstone.displayImage(this.canvas, image, viewport)
|
||||
if (!this.toolState.initialized) {
|
||||
this.toolState.initialized = true
|
||||
const toolButtons = document.querySelectorAll('[data-tool]')
|
||||
|
||||
if (!this.toolState.initialized) {
|
||||
this.toolState.initialized = true
|
||||
const toolButtons = document.querySelectorAll('[data-tool]')
|
||||
|
||||
// const scope = this
|
||||
Array.from(toolButtons).forEach((toolBtn) => {
|
||||
// const scope = this
|
||||
Array.from(toolButtons).forEach((toolBtn) => {
|
||||
// Add the tool
|
||||
const toolName = toolBtn.getAttribute('data-tool')
|
||||
const apiTool = cornerstoneTools[`${toolName}Tool`]
|
||||
if (apiTool) {
|
||||
const toolAlreadyAddedToElement = cornerstoneTools.getToolForElement(element, apiTool)
|
||||
const toolName = toolBtn.getAttribute('data-tool')
|
||||
const apiTool = cornerstoneTools[`${toolName}Tool`]
|
||||
if (apiTool) {
|
||||
const toolAlreadyAddedToElement = cornerstoneTools.getToolForElement(element, apiTool)
|
||||
|
||||
if (!toolAlreadyAddedToElement) {
|
||||
if (toolName === 'Length') {
|
||||
cornerstoneTools.addToolForElement(element, LengthTool, { configuration: { handleRadius: false, drawHandlesOnHover: true, hideHandlesIfMoving: true, digits: this.digitPlaces, drawHandles: true }})
|
||||
} else if (toolName === 'Bidirectional') {
|
||||
if (!toolAlreadyAddedToElement) {
|
||||
if (toolName === 'Length') {
|
||||
cornerstoneTools.addToolForElement(element, LengthTool, { configuration: { handleRadius: false, drawHandlesOnHover: true, hideHandlesIfMoving: true, digits: this.digitPlaces, drawHandles: true }})
|
||||
} else if (toolName === 'Bidirectional') {
|
||||
// cornerstoneTools.addToolForElement(element, BidirectionalTool, { digits: this.digitPlaces })
|
||||
// , handleRadius: false, drawHandlesOnHover: true, hideHandlesIfMoving: true
|
||||
cornerstoneTools.addToolForElement(element, BidirectionalTool, { configuration: { digits: this.digitPlaces, hideHandlesIfMoving: true }})
|
||||
} else if (toolName === 'ArrowAnnotate') {
|
||||
cornerstoneTools.addToolForElement(element, ArrowAnnotateTool, { configuration: { allowEmptyLabel: true, handleRadius: false, drawHandlesOnHover: true, hideHandlesIfMoving: true }})
|
||||
} else if (toolName === 'RectangleRoi') {
|
||||
cornerstoneTools.addToolForElement(element, RectangleRoiTool, { configuration: { allowEmptyLabel: true, handleRadius: false, drawHandlesOnHover: true, hideHandlesIfMoving: true }})
|
||||
} else {
|
||||
cornerstoneTools.addToolForElement(element, apiTool)
|
||||
cornerstoneTools.addToolForElement(element, BidirectionalTool, { configuration: { digits: this.digitPlaces, hideHandlesIfMoving: true }})
|
||||
} else if (toolName === 'ArrowAnnotate') {
|
||||
cornerstoneTools.addToolForElement(element, ArrowAnnotateTool, { configuration: { allowEmptyLabel: true, handleRadius: false, drawHandlesOnHover: true, hideHandlesIfMoving: true }})
|
||||
} else if (toolName === 'RectangleRoi') {
|
||||
cornerstoneTools.addToolForElement(element, RectangleRoiTool, { configuration: { allowEmptyLabel: true, handleRadius: false, drawHandlesOnHover: true, hideHandlesIfMoving: true }})
|
||||
} else {
|
||||
cornerstoneTools.addToolForElement(element, apiTool)
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
if (!cornerstoneTools.getToolForElement(element, cornerstoneTools.WwwcRegionTool)) {
|
||||
cornerstoneTools.addToolForElement(element, cornerstoneTools.WwwcRegionTool)
|
||||
}
|
||||
})
|
||||
if (!cornerstoneTools.getToolForElement(element, cornerstoneTools.WwwcRegionTool)) {
|
||||
cornerstoneTools.addToolForElement(element, cornerstoneTools.WwwcRegionTool)
|
||||
}
|
||||
if (!cornerstoneTools.getToolForElement(element, cornerstoneTools.StackScrollMouseWheelTool)) {
|
||||
cornerstoneTools.addToolForElement(element, cornerstoneTools.StackScrollMouseWheelTool)
|
||||
}
|
||||
cornerstoneTools.setToolActiveForElement(element, 'StackScrollMouseWheel', {})
|
||||
if (!cornerstoneTools.getToolForElement(element, cornerstoneTools.StackScrollMouseWheelTool)) {
|
||||
cornerstoneTools.addToolForElement(element, cornerstoneTools.StackScrollMouseWheelTool)
|
||||
}
|
||||
cornerstoneTools.setToolActiveForElement(element, 'StackScrollMouseWheel', {})
|
||||
|
||||
if (!cornerstoneTools.getToolForElement(element, ScaleOverlayTool)) {
|
||||
cornerstoneTools.addToolForElement(element, ScaleOverlayTool)
|
||||
}
|
||||
cornerstoneTools.setToolActiveForElement(element, 'ScaleOverlay', {})
|
||||
cornerstoneTools.setToolActiveForElement(this.canvas, 'Zoom', {
|
||||
mouseButtonMask: 2
|
||||
})
|
||||
cornerstoneTools.setToolActiveForElement(this.canvas, 'Pan', {
|
||||
mouseButtonMask: 4
|
||||
})
|
||||
if (!cornerstoneTools.getToolForElement(element, ScaleOverlayTool)) {
|
||||
cornerstoneTools.addToolForElement(element, ScaleOverlayTool)
|
||||
}
|
||||
cornerstoneTools.setToolActiveForElement(element, 'ScaleOverlay', {})
|
||||
cornerstoneTools.setToolActiveForElement(this.canvas, 'Zoom', {
|
||||
mouseButtonMask: 2
|
||||
})
|
||||
cornerstoneTools.setToolActiveForElement(this.canvas, 'Pan', {
|
||||
mouseButtonMask: 4
|
||||
})
|
||||
|
||||
// if (!cornerstoneTools.getToolForElement(element, OrientationMarkersTool)) {
|
||||
// cornerstoneTools.addToolForElement(element, OrientationMarkersTool)
|
||||
// }
|
||||
// cornerstoneTools.setToolActiveForElement(element, 'OrientationMarkers', { })
|
||||
}
|
||||
}
|
||||
|
||||
// cornerstoneTools.addStackStateManager(this.canvas, ['stack', 'stackPrefetch', 'playClip'])
|
||||
cornerstoneTools.addStackStateManager(this.canvas, ['stack', 'playClip'])
|
||||
cornerstoneTools.addToolState(this.canvas, 'stack', this.stack)
|
||||
// cornerstoneTools.stackPrefetch.enable(this.canvas)
|
||||
cornerstone.updateImage(element, true)
|
||||
// cornerstoneTools.addStackStateManager(this.canvas, ['stack', 'stackPrefetch', 'playClip'])
|
||||
cornerstoneTools.addStackStateManager(this.canvas, ['stack', 'playClip'])
|
||||
cornerstoneTools.addToolState(this.canvas, 'stack', this.stack)
|
||||
// cornerstoneTools.stackPrefetch.enable(this.canvas)
|
||||
cornerstone.updateImage(element, true)
|
||||
|
||||
this.stack.firstImageLoading = false
|
||||
this.toolState.dicomInfoVisible = true
|
||||
var instanceId = image.imageId.split('/')[image.imageId.split('/').length - 1]
|
||||
var frame = null
|
||||
if (instanceId.includes('?frame=')) {
|
||||
frame = instanceId.split('?frame=')[1]
|
||||
instanceId = instanceId.split('?frame=')[0]
|
||||
}
|
||||
this.stack.frame = !isNaN(parseInt(frame)) ? parseInt(frame) : 0
|
||||
instanceId = instanceId.split('.')[0]
|
||||
this.stack.instanceId = instanceId
|
||||
this.height = (this.stack.currentImageIdIndex) * 100 / (this.stack.imageIds.length - 1)
|
||||
this.resetWwwc()
|
||||
this.stack.firstImageLoading = false
|
||||
this.toolState.dicomInfoVisible = true
|
||||
const imageInfo = this.getInstanceInfo(image.imageId)
|
||||
var instanceId = imageInfo.instanceId
|
||||
var frame = imageInfo.frame
|
||||
this.stack.frame = !isNaN(parseInt(frame)) ? parseInt(frame) : 0
|
||||
this.stack.instanceId = instanceId
|
||||
this.height = (this.stack.currentImageIdIndex) * 100 / (this.stack.imageIds.length - 1)
|
||||
this.resetWwwc()
|
||||
resolve()
|
||||
})
|
||||
},
|
||||
onNewImage(e) {
|
||||
console.log('cornerstonenewimage')
|
||||
|
@ -1246,14 +1239,10 @@ export default {
|
|||
this.stack.imageRendered = true
|
||||
// const { element } = e.detail
|
||||
var imageId = e.detail.image.imageId
|
||||
var instanceId = imageId.split('/')[imageId.split('/').length - 1]
|
||||
var frame = null
|
||||
if (instanceId.includes('?frame=')) {
|
||||
frame = instanceId.split('?frame=')[1]
|
||||
instanceId = instanceId.split('?frame=')[0]
|
||||
}
|
||||
const imageInfo = this.getInstanceInfo(imageId)
|
||||
var instanceId = imageInfo.instanceId
|
||||
var frame = imageInfo.frame
|
||||
this.stack.frame = !isNaN(parseInt(frame)) ? parseInt(frame) : 0
|
||||
instanceId = instanceId.split('.')[0]
|
||||
if (this.imageId !== instanceId) {
|
||||
this.getOrientationMarker(e.detail.element)
|
||||
// 初次加载时,如果该影像存在标记,则以标记的窗宽窗位为初始化默认值,否则以序列的窗宽窗位为初始化默认值
|
||||
|
@ -1290,20 +1279,11 @@ export default {
|
|||
if (!imagePlane || !imagePlane.rowCosines || !imagePlane.columnCosines) {
|
||||
return
|
||||
}
|
||||
|
||||
const row = getOrientationString(imagePlane.rowCosines)
|
||||
const column = getOrientationString(imagePlane.columnCosines)
|
||||
const oppositeRow = invertOrientationString(row)
|
||||
const oppositeColumn = invertOrientationString(column)
|
||||
const markers = {
|
||||
top: oppositeColumn,
|
||||
bottom: column,
|
||||
left: oppositeRow,
|
||||
right: row
|
||||
}
|
||||
if (!markers) {
|
||||
return
|
||||
}
|
||||
|
||||
this.orientationMarkers = [oppositeColumn, row, column, oppositeRow]
|
||||
this.originalMarkers = [oppositeColumn, row, column, oppositeRow]
|
||||
this.setMarkers()
|
||||
|
@ -1318,14 +1298,10 @@ export default {
|
|||
this.activeTool = 1
|
||||
this.activeToolName = ''
|
||||
var { imageId } = element.image
|
||||
var instanceId = imageId.split('/')[imageId.split('/').length - 1]
|
||||
var frame = null
|
||||
if (instanceId.includes('?frame=')) {
|
||||
frame = instanceId.split('?frame=')[1]
|
||||
instanceId = instanceId.split('?frame=')[0]
|
||||
}
|
||||
const imageInfo = this.getInstanceInfo(imageId)
|
||||
var instanceId = imageInfo.instanceId
|
||||
var frame = imageInfo.frame
|
||||
this.stack.frame = !isNaN(parseInt(frame)) ? parseInt(frame) : 0
|
||||
instanceId = instanceId.split('.')[0]
|
||||
if (e.detail.toolName === 'Length' || e.detail.toolName === 'ArrowAnnotate' || e.detail.toolName === 'RectangleRoi') {
|
||||
const measureData = {}
|
||||
measureData.studyId = this.stack.studyId
|
||||
|
@ -1335,6 +1311,7 @@ export default {
|
|||
measureData.data = e.detail.measurementData
|
||||
measureData.type = e.detail.toolName
|
||||
measureData.thick = this.dicomInfo.thick
|
||||
measureData.location = this.dicomInfo.location
|
||||
measureData.ww = Math.round(viewport.voi.windowWidth)
|
||||
measureData.wc = Math.round(viewport.voi.windowCenter)
|
||||
|
||||
|
@ -1351,6 +1328,7 @@ export default {
|
|||
measureData.data = e.detail.measurementData
|
||||
measureData.type = e.detail.toolName
|
||||
measureData.thick = this.dicomInfo.thick
|
||||
measureData.location = this.dicomInfo.location
|
||||
measureData.ww = Math.round(viewport.voi.windowWidth)
|
||||
measureData.wc = Math.round(viewport.voi.windowCenter)
|
||||
const canvas = this.canvas.querySelector('canvas')
|
||||
|
@ -1402,9 +1380,9 @@ export default {
|
|||
var element = cornerstone.getEnabledElement(this.canvas)
|
||||
const { rowPixelSpacing, colPixelSpacing } = this.getPixelSpacing(element.image)
|
||||
const dx =
|
||||
(data.handles.end.x - data.handles.start.x) * (colPixelSpacing || 1)
|
||||
(data.handles.end.x - data.handles.start.x) * (colPixelSpacing || 1)
|
||||
const dy =
|
||||
(data.handles.end.y - data.handles.start.y) * (rowPixelSpacing || 1)
|
||||
(data.handles.end.y - data.handles.start.y) * (rowPixelSpacing || 1)
|
||||
const length = Math.sqrt(dx * dx + dy * dy)
|
||||
|
||||
return length.toFixed(this.digitPlaces)
|
||||
|
@ -1418,9 +1396,9 @@ export default {
|
|||
if (imagePlane) {
|
||||
return {
|
||||
rowPixelSpacing:
|
||||
imagePlane.rowPixelSpacing || imagePlane.rowImagePixelSpacing,
|
||||
imagePlane.rowPixelSpacing || imagePlane.rowImagePixelSpacing,
|
||||
colPixelSpacing:
|
||||
imagePlane.columnPixelSpacing || imagePlane.colImagePixelSpacing
|
||||
imagePlane.columnPixelSpacing || imagePlane.colImagePixelSpacing
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1430,7 +1408,7 @@ export default {
|
|||
}
|
||||
},
|
||||
onMeasurementremoved(e) {
|
||||
|
||||
console.log('================移除病灶=================', e)
|
||||
},
|
||||
onMeasurementmodified(e) {
|
||||
// 移动
|
||||
|
@ -1440,14 +1418,10 @@ export default {
|
|||
var element = cornerstone.getEnabledElement(this.canvas)
|
||||
var viewport = element.viewport
|
||||
var { imageId } = element.image
|
||||
var instanceId = imageId.split('/')[imageId.split('/').length - 1]
|
||||
var frame = null
|
||||
if (instanceId.includes('?frame=')) {
|
||||
frame = instanceId.split('?frame=')[1]
|
||||
instanceId = instanceId.split('?frame=')[0]
|
||||
}
|
||||
const imageInfo = this.getInstanceInfo(imageId)
|
||||
var instanceId = imageInfo.instanceId
|
||||
var frame = imageInfo.frame
|
||||
this.stack.frame = !isNaN(parseInt(frame)) ? parseInt(frame) : 0
|
||||
instanceId = instanceId.split('.')[0]
|
||||
|
||||
var uuid = measurementData.uuid
|
||||
var idx = this.measureData.findIndex(item => item.MeasureData && item.MeasureData.data && item.MeasureData.data.uuid === uuid)
|
||||
|
@ -1465,6 +1439,7 @@ export default {
|
|||
measureData.data = measurementData
|
||||
measureData.type = toolType
|
||||
measureData.thick = this.dicomInfo.thick
|
||||
measureData.location = this.dicomInfo.location
|
||||
measureData.ww = Math.round(viewport.voi.windowWidth)
|
||||
measureData.wc = Math.round(viewport.voi.windowCenter)
|
||||
measureData.data.active = false
|
||||
|
@ -1504,11 +1479,8 @@ export default {
|
|||
// 判断有没有标记 获取第一个标记
|
||||
var element = cornerstone.getEnabledElement(this.canvas)
|
||||
var { imageId } = element.image
|
||||
var instanceId = imageId.split('/')[imageId.split('/').length - 1]
|
||||
if (instanceId.includes('?frame=')) {
|
||||
instanceId = instanceId.split('?frame=')[0]
|
||||
}
|
||||
instanceId = instanceId.split('.')[0]
|
||||
const imageInfo = this.getInstanceInfo(imageId)
|
||||
var instanceId = imageInfo.instanceId
|
||||
var idx = this.measureData.findIndex(item => item.InstanceId === instanceId)
|
||||
var measureData = null
|
||||
if (idx > -1) {
|
||||
|
@ -1923,6 +1895,14 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
getInstanceInfo(imageId) {
|
||||
const params = {}
|
||||
const searchParams = new URLSearchParams(imageId.split('?')[1])
|
||||
for (const [key, value] of searchParams.entries()) {
|
||||
params[key] = value
|
||||
}
|
||||
return params
|
||||
},
|
||||
preventDefault(e) {
|
||||
e.stopImmediatePropagation()
|
||||
e.stopPropagation()
|
||||
|
@ -1940,87 +1920,87 @@ export default {
|
|||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.context-menu-wrapper{
|
||||
position: absolute;
|
||||
ul{
|
||||
list-style: none;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
background: #343333;
|
||||
color: #fff;
|
||||
margin: 0;
|
||||
border: 1px solid #2a2a2a;
|
||||
border-radius: 3px;
|
||||
height: auto;
|
||||
min-height: 50px;
|
||||
line-height: 1.5em;
|
||||
width:80px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.menu{
|
||||
li {
|
||||
padding: 2px 5px;
|
||||
position: relative;
|
||||
border-bottom: 1px solid #666;
|
||||
div{
|
||||
padding: 5px;
|
||||
}
|
||||
}
|
||||
.submenu{
|
||||
position: absolute;
|
||||
left: 77px;
|
||||
top: -1px;
|
||||
.context-menu-wrapper{
|
||||
position: absolute;
|
||||
ul{
|
||||
list-style: none;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
background: #343333;
|
||||
color: #fff;
|
||||
display: none;
|
||||
margin: 0;
|
||||
border: 1px solid #2a2a2a;
|
||||
border-radius: 3px;
|
||||
height: auto;
|
||||
min-height: 50px;
|
||||
line-height: 1.5em;
|
||||
width:80px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.menu{
|
||||
li {
|
||||
padding: 2px 5px;
|
||||
position: relative;
|
||||
border-bottom: 1px solid #666;
|
||||
div{
|
||||
padding: 5px;
|
||||
}
|
||||
}
|
||||
.submenu{
|
||||
position: absolute;
|
||||
left: 77px;
|
||||
top: -1px;
|
||||
background: #343333;
|
||||
color: #fff;
|
||||
display: none;
|
||||
li {
|
||||
padding: 2px 5px;
|
||||
border-bottom: 1px solid #666;
|
||||
div{
|
||||
padding: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.menu li:hover{
|
||||
background-color: #ff5722;
|
||||
.submenu{
|
||||
display:block;
|
||||
}
|
||||
}
|
||||
.menu_active{
|
||||
cursor: pointer;
|
||||
}
|
||||
.menu_disabled{
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
}
|
||||
.menu li:hover{
|
||||
background-color: #ff5722;
|
||||
.submenu{
|
||||
display:block;
|
||||
.info-visit{
|
||||
position: absolute;
|
||||
left:50%;
|
||||
top: 5px;
|
||||
transform: translateX(-50%);
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
.arrw_div_wrapper{
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background-color: #3f3f3f;
|
||||
text-align: center;
|
||||
line-height: 20px;
|
||||
border-radius: 10%;
|
||||
}
|
||||
.blind_name_wrapper{
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
background-color: #00000057;
|
||||
color: #fff;
|
||||
padding:0 10px;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
.menu_active{
|
||||
cursor: pointer;
|
||||
}
|
||||
.menu_disabled{
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
}
|
||||
.info-visit{
|
||||
position: absolute;
|
||||
left:50%;
|
||||
top: 5px;
|
||||
transform: translateX(-50%);
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
.arrw_div_wrapper{
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background-color: #3f3f3f;
|
||||
text-align: center;
|
||||
line-height: 20px;
|
||||
border-radius: 10%;
|
||||
}
|
||||
.blind_name_wrapper{
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
background-color: #00000057;
|
||||
color: #fff;
|
||||
padding:0 10px;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
.info-cd{
|
||||
position: absolute;
|
||||
left: 10px;
|
||||
|
@ -2110,10 +2090,10 @@ li:hover {
|
|||
color: white;
|
||||
}
|
||||
.msg-div {
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
background-color: rgba(255, 255, 255, 0.5);
|
||||
color: #000;
|
||||
padding: 5px 20px;
|
||||
}
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
background-color: rgba(255, 255, 255, 0.5);
|
||||
color: #000;
|
||||
padding: 5px 20px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -280,6 +280,51 @@
|
|||
<div class="text">{{ tool.text }}</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="tool-frame">
|
||||
<!-- 第一帧 -->
|
||||
<el-tooltip class="item" effect="dark" :content="$t('trials:dicom-show:firstframe')" placement="bottom">
|
||||
<div class="icon" @click.prevent="scrollPage(-99999)">
|
||||
<svg-icon icon-class="firstframe" class="svg-icon" />
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<!-- 上一帧 -->
|
||||
<el-tooltip class="item" effect="dark" :content="$t('trials:dicom-show:previousframe')" placement="bottom">
|
||||
<div class="icon" @click.prevent="scrollPage(-1)">
|
||||
<svg-icon icon-class="previousframe" class="svg-icon" />
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<!-- 播放/暂停 -->
|
||||
<el-tooltip class="item" effect="dark" :content="clipPlaying?$t('trials:dicom-show:play'):$t('trials:dicom-show:stop')" placement="bottom">
|
||||
<div class="icon" @click.prevent="toggleClipPlay">
|
||||
<svg-icon :icon-class="clipPlaying?'stop':'play'" class="svg-icon" />
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<!-- 下一帧 -->
|
||||
<el-tooltip class="item" effect="dark" :content="$t('trials:dicom-show:nextframe')" placement="bottom">
|
||||
<div class="icon" @click.prevent="scrollPage(1)">
|
||||
<svg-icon icon-class="nextframe" class="svg-icon" />
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<!-- 最后一帧 -->
|
||||
<el-tooltip class="item" effect="dark" :content="$t('trials:dicom-show:lastframe')" placement="bottom">
|
||||
<div class="icon" @click.prevent="scrollPage(99999)">
|
||||
<svg-icon icon-class="lastframe" class="svg-icon" />
|
||||
</div>
|
||||
</el-tooltip>
|
||||
|
||||
<el-tooltip class="item" effect="dark" :content="$t('trials:dicom-show:speed')" placement="bottom">
|
||||
<select class="select-wrapper" @change="setDicomCanvasfps($event)" :disabled="clipPlaying">
|
||||
<!-- 默认值 -->
|
||||
<option :value="5">{{ $t('trials:dicom-show:default') }}</option>
|
||||
<option :value="5">5</option>
|
||||
<option :value="10">10</option>
|
||||
<option :value="15">15</option>
|
||||
<option :value="20">20</option>
|
||||
<option :value="25">25</option>
|
||||
<option :value="30">30</option>
|
||||
</select>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<el-tooltip class="item" effect="dark" :content="`${$t('trials:dicom-show:Eraser')}`" placement="bottom">
|
||||
<div class="tool-wrapper">
|
||||
<div
|
||||
|
@ -552,7 +597,8 @@ export default {
|
|||
activeName: '1',
|
||||
customWwcTpl: [],
|
||||
isFullscreen: false,
|
||||
manualsDialog: { visible: false }
|
||||
manualsDialog: { visible: false },
|
||||
clipPlaying: false
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -571,6 +617,16 @@ export default {
|
|||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
currentDicomCanvasIndex: {
|
||||
immediate: true,
|
||||
handler(v) {
|
||||
if (this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`] && this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0]) {
|
||||
this.clipPlaying = this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].toolState.clipPlaying
|
||||
} else {
|
||||
this.clipPlaying = false
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -1423,6 +1479,18 @@ export default {
|
|||
}
|
||||
this.activeTool = toolName
|
||||
},
|
||||
// 切换帧
|
||||
scrollPage(i) {
|
||||
this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].scrollPage(i)
|
||||
},
|
||||
// 播放/暂停
|
||||
toggleClipPlay() {
|
||||
this.clipPlaying = !this.clipPlaying
|
||||
this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].toggleClipPlay()
|
||||
},
|
||||
setDicomCanvasfps(event) {
|
||||
this.$refs[`dicomCanvas${this.currentDicomCanvasIndex}`][0].setFps(event.target.value)
|
||||
},
|
||||
// 添加标记
|
||||
setMeasureData(data) {
|
||||
this.$refs['measurementList'].setMeasuredData(data)
|
||||
|
@ -1555,7 +1623,7 @@ export default {
|
|||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-right: 30px;
|
||||
margin-right: 20px;
|
||||
.icon{
|
||||
padding: 5px;
|
||||
border: 1px solid #404040;
|
||||
|
@ -1574,6 +1642,39 @@ export default {
|
|||
display: none;
|
||||
}
|
||||
}
|
||||
.tool-frame{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
margin-right: 20px;
|
||||
border: 1px solid #404040;
|
||||
.icon{
|
||||
padding: 5px;
|
||||
border-right: 1px solid #404040;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
.svg-icon{
|
||||
font-size:20px;
|
||||
color:#ddd;
|
||||
}
|
||||
}
|
||||
.select-wrapper{
|
||||
width: 60px;
|
||||
background-color: black;
|
||||
color: #ddd;
|
||||
border: none;
|
||||
font-size: 13px;
|
||||
outline: none;
|
||||
}
|
||||
.text{
|
||||
position: relative;
|
||||
font-size: 12px;
|
||||
margin-top: 5px;
|
||||
color: #d0d0d0;
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.tool_active{
|
||||
background-color: #607d8b;
|
||||
}
|
||||
|
|
|
@ -49,7 +49,42 @@
|
|||
/>
|
||||
<div class="image-desc">
|
||||
<div class="flex-div">
|
||||
<div v-if="!study.IsCriticalSequence">#{{ series.seriesNumber }} </div>
|
||||
<div style="display: flex;justify-content: space-between;width:100%;">
|
||||
<div v-if="!study.IsCriticalSequence">#{{ series.seriesNumber }} </div>
|
||||
<div v-if="series.isExistMutiFrames && series.instanceCount > 1">
|
||||
<el-popover
|
||||
placement="right"
|
||||
trigger="hover"
|
||||
popper-class="instance_frame_wrapper"
|
||||
>
|
||||
<div
|
||||
v-for="(instance, idx) in series.instanceInfoList"
|
||||
:key="instance.Id"
|
||||
class="frame_content"
|
||||
:style="{'margin-bottom':idx<series.instanceInfoList.length-1? '5px':'0px'}"
|
||||
@click.stop="showMultiFrames(index,series, i, instance)"
|
||||
>
|
||||
<!-- <div>
|
||||
<img
|
||||
class="image-preview"
|
||||
:src="series.previewImageUrl"
|
||||
crossorigin="anonymous"
|
||||
alt=""
|
||||
style="width: 40px;height:40px;"
|
||||
fit="fill"
|
||||
>
|
||||
</div> -->
|
||||
<div>
|
||||
<div>{{ instance.InstanceNumber }}</div>
|
||||
<div>{{ `${instance.NumberOfFrames > 0 ? instance.NumberOfFrames : 1} frame` }}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<i slot="reference" class="el-icon-connection" style="font-size: 15px;cursor: pointer;" />
|
||||
</el-popover>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="series.isDicom && series.prefetchInstanceCount<series.instanceCount && series.modality!== 'SR'">
|
||||
<!-- 下载 -->
|
||||
<el-tooltip v-if="!series.isLoading" class="item" effect="dark" :content="$t('trials:reading:button:download')" placement="bottom">
|
||||
|
@ -638,6 +673,48 @@ export default {
|
|||
|
||||
store.dispatch('reading/setActiveSeries', series)
|
||||
},
|
||||
showMultiFrames(studyIndex, series, seriesIndex, instanceInfo) {
|
||||
this.currentSeriesIndex = seriesIndex
|
||||
const imageIds = []
|
||||
if (instanceInfo.NumberOfFrames && instanceInfo.NumberOfFrames > 1) {
|
||||
for (let j = 0; j < instanceInfo.NumberOfFrames; j++) {
|
||||
const path = `${instanceInfo.Path}?frame=${j}&instanceId=${instanceInfo.Id}`
|
||||
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${path}`)
|
||||
}
|
||||
} else {
|
||||
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${instanceInfo.Path}?instanceId=${instanceInfo.Id}`)
|
||||
}
|
||||
this.studyIndex = studyIndex
|
||||
this.seriesIndex = seriesIndex
|
||||
this.studyList[studyIndex].SeriesList[seriesIndex].measureData = this.measureData
|
||||
var dicomStatck = this.studyList[studyIndex].SeriesList[seriesIndex]
|
||||
dicomStatck.imageIds = imageIds
|
||||
dicomStatck.imageIdIndex = 0
|
||||
console.log(dicomStatck)
|
||||
this.$emit('loadImageStack', dicomStatck)
|
||||
this.loopLoadStatus = -1
|
||||
series.isLoading = true
|
||||
var isAddToTakPool = false
|
||||
if (this.showSeriesList.includes(`${studyIndex}_${seriesIndex}`)) {
|
||||
isAddToTakPool = true
|
||||
} else {
|
||||
this.showSeriesList.push(`${studyIndex}_${seriesIndex}`)
|
||||
}
|
||||
if (!isAddToTakPool) {
|
||||
var priority = parseInt(new Date().getTime())
|
||||
series.imageIds.map((imageId) => {
|
||||
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, visitTaskId: series.visitTaskId, priority })
|
||||
})
|
||||
if (this.imageList.length > 0) {
|
||||
this.loopLoadStatus = 0
|
||||
this.loopLoad()
|
||||
}
|
||||
} else {
|
||||
requestPoolManager.changePriority(series.seriesId)
|
||||
}
|
||||
|
||||
DicomEvent.$emit('loadMeasurementList', { visitTaskId: this.visitTaskId, taskBlindName: this.taskBlindName })
|
||||
},
|
||||
setSeriesActive(obj) {
|
||||
var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId)
|
||||
if (idx === -1) return
|
||||
|
@ -977,3 +1054,28 @@ export default {
|
|||
}
|
||||
|
||||
</style>
|
||||
<style>
|
||||
.instance_frame_wrapper{
|
||||
min-width: 120px;
|
||||
background-color: #2c2c2c;
|
||||
border: 1px solid #2c2c2c;
|
||||
padding: 5px;
|
||||
}
|
||||
.frame_content{
|
||||
height: 50px;
|
||||
padding: 5px;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
color: #ddd;
|
||||
font-size: 12px;
|
||||
border: 1px solid #404040;
|
||||
}
|
||||
.frame_content:hover {
|
||||
/* font-weight: bold; */
|
||||
/* box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); */
|
||||
cursor: pointer;
|
||||
/* color: #428bca; */
|
||||
border-color: #213a54 !important;
|
||||
background-color: #213a54;
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue