多帧图像保存病灶更改及关键帧渲染更改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
a6b5d0b196
commit
0a428bf954
|
@ -781,91 +781,98 @@ export default {
|
||||||
},
|
},
|
||||||
// 加载检查及标注信息
|
// 加载检查及标注信息
|
||||||
async loadTaskDetails(taskInfo, taskIndex) {
|
async loadTaskDetails(taskInfo, taskIndex) {
|
||||||
try {
|
return new Promise(async (resolve, reject)=>{
|
||||||
const sujectVisitId = taskInfo.VisitId
|
try {
|
||||||
const taskId = taskInfo.VisitTaskId
|
const sujectVisitId = taskInfo.VisitId
|
||||||
// 获取检查信息
|
const taskId = taskInfo.VisitTaskId
|
||||||
const keyImages = []
|
// 获取检查信息
|
||||||
const res1 = await getReadingVisitStudyList(this.trialId, sujectVisitId, taskId)
|
const keyImages = []
|
||||||
let keyStudyIndex = -1
|
const res1 = await getReadingVisitStudyList(this.trialId, sujectVisitId, taskId)
|
||||||
let keySeriesIndex = -1
|
let keyStudyIndex = -1
|
||||||
// const arr = [res1.Result[0]]
|
let keySeriesIndex = -1
|
||||||
const arr = res1.Result
|
const arr = res1.Result
|
||||||
arr.forEach((study, studyIndex) => {
|
arr.forEach((study, studyIndex) => {
|
||||||
study.SeriesList.forEach((series, seriesIndex) => {
|
study.SeriesList.forEach((series, seriesIndex) => {
|
||||||
const imageIds = []
|
const imageIds = []
|
||||||
const stack = []
|
const stack = []
|
||||||
series.InstanceInfoList.forEach((instance, instanceIndex) => {
|
series.InstanceInfoList.forEach((instance, instanceIndex) => {
|
||||||
if (study.IsCriticalSequence) {
|
if (study.IsCriticalSequence) {
|
||||||
keyStudyIndex = studyIndex
|
keyStudyIndex = studyIndex
|
||||||
keySeriesIndex = seriesIndex
|
keySeriesIndex = seriesIndex
|
||||||
keyImages.push({ Id: instance.Id, Path: instance.Path, KeyFramesList: instance.KeyFramesList, KeyStudyIndex: studyIndex, KeySeriesIndex: seriesIndex })
|
keyImages.push({ Id: instance.Id, Path: instance.Path, KeyFramesList: instance.KeyFramesList, KeyStudyIndex: studyIndex, KeySeriesIndex: seriesIndex })
|
||||||
} else {
|
|
||||||
const i = keyImages.findIndex(k => k.Id === instance.Id)
|
|
||||||
if (i > -1) {
|
|
||||||
keyImages[i].StudyIndex = studyIndex
|
|
||||||
keyImages[i].SeriesIndex = seriesIndex
|
|
||||||
}
|
|
||||||
const nFrames = instance.NumberOfFrames || 0
|
|
||||||
if (nFrames === 0) {
|
|
||||||
// 单帧
|
|
||||||
stack.push(`wadouri:${this.OSSclientConfig.basePath}${instance.Path}?instanceId=${instance.Id}&visitTaskId=${taskId}`)
|
|
||||||
} else {
|
} else {
|
||||||
// 多帧
|
const i = keyImages.findIndex(k => k.Id === instance.Id)
|
||||||
for (let i = 0; i < nFrames; i++) {
|
if (i > -1) {
|
||||||
const newImageId = `wadouri:${this.OSSclientConfig.basePath}${instance.Path}?visitTaskId=${taskId}&instanceId=${instance.Id}&frame=${i + 1}`
|
keyImages[i].StudyIndex = studyIndex
|
||||||
stack.push(newImageId)
|
keyImages[i].SeriesIndex = seriesIndex
|
||||||
}
|
}
|
||||||
|
const nFrames = instance.NumberOfFrames || 0
|
||||||
|
if (nFrames === 0) {
|
||||||
|
// 单帧
|
||||||
|
stack.push(`wadouri:${this.OSSclientConfig.basePath}${instance.Path}?visitTaskId=${taskId}&instanceId=${instance.Id}`)
|
||||||
|
} else {
|
||||||
|
// 多帧
|
||||||
|
for (let i = 0; i < nFrames; i++) {
|
||||||
|
const newImageId = `wadouri:${this.OSSclientConfig.basePath}${instance.Path}?visitTaskId=${taskId}&instanceId=${instance.Id}&frame=${i + 1}`
|
||||||
|
stack.push(newImageId)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
imageIds.push(`wadouri:${this.OSSclientConfig.basePath}${instance.Path}?visitTaskId=${taskId}&instanceId=${instance.Id}`)
|
||||||
|
this.instanceInfo[instance.Id] = { taskIndex, studyIndex, seriesIndex }
|
||||||
}
|
}
|
||||||
imageIds.push(`wadouri:${this.OSSclientConfig.basePath}${instance.Path}?visitTaskId=${taskId}&instanceId=${instance.Id}`)
|
|
||||||
this.instanceInfo[instance.Id] = { taskIndex, studyIndex, seriesIndex }
|
|
||||||
}
|
|
||||||
})
|
|
||||||
series.Stack = stack
|
|
||||||
series.ImageIds = imageIds
|
|
||||||
series.SliceIndex = 0
|
|
||||||
series.LoadedImageCount = 0
|
|
||||||
series.LoadedImageProgress = 0
|
|
||||||
series.TaskInfo = Object.assign({}, taskInfo)
|
|
||||||
series.StudyIndex = studyIndex
|
|
||||||
series.SeriesIndex = seriesIndex
|
|
||||||
})
|
|
||||||
})
|
|
||||||
if (keyStudyIndex > -1 && keySeriesIndex > -1 && keyImages.length > 0) {
|
|
||||||
const keyImageIds = []
|
|
||||||
keyImages.forEach(instance => {
|
|
||||||
if (instance.KeyFramesList.length > 0) {
|
|
||||||
instance.KeyFramesList.map(i => {
|
|
||||||
keyImageIds.push(`wadouri:${this.OSSclientConfig.basePath}${instance.Path}?instanceId=${instance.Id}&visitTaskId=${taskId}&frame=${i}`)
|
|
||||||
})
|
})
|
||||||
} else {
|
series.Stack = stack
|
||||||
keyImageIds.push(`wadouri:${this.OSSclientConfig.basePath}${instance.Path}?instanceId=${instance.Id}&visitTaskId=${taskId}`)
|
series.ImageIds = imageIds
|
||||||
}
|
series.SliceIndex = 0
|
||||||
|
series.LoadedImageCount = 0
|
||||||
|
series.LoadedImageProgress = 0
|
||||||
|
series.TaskInfo = Object.assign({}, taskInfo)
|
||||||
|
series.StudyIndex = studyIndex
|
||||||
|
series.SeriesIndex = seriesIndex
|
||||||
|
})
|
||||||
})
|
})
|
||||||
res1.Result[keyStudyIndex].SeriesList[keySeriesIndex].ImageIds = keyImageIds
|
if (keyStudyIndex > -1 && keySeriesIndex > -1 && keyImages.length > 0) {
|
||||||
}
|
const keyImageIds = []
|
||||||
// 获取标注信息
|
const keyStack = []
|
||||||
let res2 = null
|
keyImages.forEach(instance => {
|
||||||
if (this.criterionType === 0) {
|
if (instance.KeyFramesList.length > 0) {
|
||||||
res2 = await getCustomTag({ visitTaskId: taskId })
|
instance.KeyFramesList.map(i => {
|
||||||
} else {
|
keyStack.push(`wadouri:${this.OSSclientConfig.basePath}${instance.Path}?visitTaskId=${taskId}&instanceId=${instance.Id}&frame=${i}`)
|
||||||
res2 = await getTableAnswerRowInfoList(taskId)
|
})
|
||||||
}
|
} else {
|
||||||
const annotationUIDs = []
|
keyStack.push(`wadouri:${this.OSSclientConfig.basePath}${instance.Path}?visitTaskId=${taskId}&instanceId=${instance.Id}`)
|
||||||
const annotations = res2.Result.map(i => {
|
}
|
||||||
if (typeof i.MeasureData === 'string' && i.MeasureData) {
|
keyImageIds.push(`wadouri:${this.OSSclientConfig.basePath}${instance.Path}?visitTaskId=${taskId}&instanceId=${instance.Id}`)
|
||||||
i.MeasureData = JSON.parse(i.MeasureData)
|
})
|
||||||
if (this.criterionType === 0) {
|
res1.Result[keyStudyIndex].SeriesList[keySeriesIndex].ImageIds = keyImageIds
|
||||||
i.MeasureData.id = i.Id
|
res1.Result[keyStudyIndex].SeriesList[keySeriesIndex].Stack = keyStack
|
||||||
}
|
|
||||||
annotationUIDs.push(i.MeasureData.annotationUID)
|
|
||||||
}
|
}
|
||||||
return i
|
// 获取标注信息
|
||||||
})
|
let res2 = null
|
||||||
return { studyList: arr, annotations: annotations, annotationUIDs, keyImages }
|
if (this.criterionType === 0) {
|
||||||
} catch (e) {
|
res2 = await getCustomTag({ visitTaskId: taskId })
|
||||||
console.log(e)
|
} else {
|
||||||
}
|
res2 = await getTableAnswerRowInfoList(taskId)
|
||||||
|
}
|
||||||
|
const annotationUIDs = []
|
||||||
|
const annotations = res2.Result.map(i => {
|
||||||
|
if (typeof i.MeasureData === 'string' && i.MeasureData) {
|
||||||
|
i.MeasureData = JSON.parse(i.MeasureData)
|
||||||
|
if (this.criterionType === 0) {
|
||||||
|
i.MeasureData.id = i.Id
|
||||||
|
}
|
||||||
|
annotationUIDs.push(i.MeasureData.annotationUID)
|
||||||
|
}
|
||||||
|
return i
|
||||||
|
})
|
||||||
|
// return { studyList: arr, annotations: annotations, annotationUIDs, keyImages }
|
||||||
|
resolve({ studyList: arr, annotations: annotations, annotationUIDs, keyImages })
|
||||||
|
} catch (e) {
|
||||||
|
console.log(e)
|
||||||
|
reject(e)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
// 设置初始化序列信息
|
// 设置初始化序列信息
|
||||||
setInitSeries() {
|
setInitSeries() {
|
||||||
|
|
|
@ -1278,7 +1278,7 @@ export default {
|
||||||
studyId: measureData ? measureData.studyId : '',
|
studyId: measureData ? measureData.studyId : '',
|
||||||
seriesId: measureData ? measureData.seriesId : '',
|
seriesId: measureData ? measureData.seriesId : '',
|
||||||
instanceId: measureData ? measureData.instanceId : '',
|
instanceId: measureData ? measureData.instanceId : '',
|
||||||
numberOfFrames: measureData ? measureData.frame : null,
|
numberOfFrames: measureData ? measureData.numberOfFrames : null,
|
||||||
picturePath: picturePath,
|
picturePath: picturePath,
|
||||||
organInfoId: innerForm.OrganInfoId,
|
organInfoId: innerForm.OrganInfoId,
|
||||||
markTool: measureData ? measureData.markTool : '',
|
markTool: measureData ? measureData.markTool : '',
|
||||||
|
|
|
@ -190,15 +190,15 @@ export default {
|
||||||
const stack = []
|
const stack = []
|
||||||
if (nFrames === 0) {
|
if (nFrames === 0) {
|
||||||
// 单帧
|
// 单帧
|
||||||
stack.push(`wadouri:${this.OSSclientConfig.basePath}${instance.Path}?instanceId=${instance.Id}&visitTaskId=${taskId}`)
|
stack.push(`wadouri:${this.OSSclientConfig.basePath}${instance.Path}?visitTaskId=${taskId}&instanceId=${instance.Id}`)
|
||||||
} else {
|
} else {
|
||||||
// 多帧
|
// 多帧
|
||||||
for (let i = 0; i < nFrames; i++) {
|
for (let i = 0; i < nFrames; i++) {
|
||||||
const newImageId = `wadouri:${this.OSSclientConfig.basePath}${instance.Path}?instanceId=${instance.Id}&visitTaskId=${taskId}&frame=${i + 1}`
|
const newImageId = `wadouri:${this.OSSclientConfig.basePath}${instance.Path}?visitTaskId=${taskId}&instanceId=${instance.Id}&frame=${i + 1}`
|
||||||
stack.push(newImageId)
|
stack.push(newImageId)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
imageIds.push(`wadouri:${this.OSSclientConfig.basePath}${instance.Path}?instanceId=${instance.Id}&visitTaskId=${taskId}`)
|
imageIds.push(`wadouri:${this.OSSclientConfig.basePath}${instance.Path}?visitTaskId=${taskId}&instanceId=${instance.Id}`)
|
||||||
obj.Stack = stack
|
obj.Stack = stack
|
||||||
obj.ImageIds = imageIds
|
obj.ImageIds = imageIds
|
||||||
obj.SliceIndex = 0
|
obj.SliceIndex = 0
|
||||||
|
|
|
@ -354,7 +354,8 @@ export default {
|
||||||
if (this.series && obj.Id === this.series.Id && obj.Description === this.series.Description && !isLocate) {
|
if (this.series && obj.Id === this.series.Id && obj.Description === this.series.Description && !isLocate) {
|
||||||
obj.SliceIndex = this.series.SliceIndex
|
obj.SliceIndex = this.series.SliceIndex
|
||||||
}
|
}
|
||||||
if (isLocate && obj.SliceIndex === this.series.SliceIndex) return
|
// if (isLocate && obj.SliceIndex === this.series.SliceIndex) return
|
||||||
|
if (this.series?.Stack && obj.Stack[obj.SliceIndex] === this.series.Stack[this.series.SliceIndex]) return
|
||||||
this.series = { ...obj }
|
this.series = { ...obj }
|
||||||
const renderingEngine = getRenderingEngine(this.renderingEngineId)
|
const renderingEngine = getRenderingEngine(this.renderingEngineId)
|
||||||
const viewport = renderingEngine.getViewport(this.viewportId)
|
const viewport = renderingEngine.getViewport(this.viewportId)
|
||||||
|
|
|
@ -1364,7 +1364,7 @@ export default {
|
||||||
studyId: measureData ? measureData.studyId : '',
|
studyId: measureData ? measureData.studyId : '',
|
||||||
seriesId: measureData ? measureData.seriesId : '',
|
seriesId: measureData ? measureData.seriesId : '',
|
||||||
instanceId: measureData ? measureData.instanceId : '',
|
instanceId: measureData ? measureData.instanceId : '',
|
||||||
numberOfFrames: measureData ? measureData.frame : null,
|
numberOfFrames: measureData ? measureData.numberOfFrames : null,
|
||||||
picturePath: picturePath,
|
picturePath: picturePath,
|
||||||
organInfoId: innerForm.OrganInfoId,
|
organInfoId: innerForm.OrganInfoId,
|
||||||
markTool: measureData ? measureData.markTool : '',
|
markTool: measureData ? measureData.markTool : '',
|
||||||
|
|
Loading…
Reference in New Issue