From 2784958ccb3be72b5758cf18f1d9fda21fbfb32a Mon Sep 17 00:00:00 2001
From: caiyiling <1321909229@qq.com>
Date: Tue, 22 Apr 2025 15:00:35 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A4=9A=E5=B8=A7=E5=AF=B9=E9=BD=90=E6=9B=B4?=
=?UTF-8?q?=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../reading/dicoms3D/components/ReadPage.vue | 33 ++++++++++---------
.../reading/dicoms3D/components/StudyList.vue | 2 +-
.../reading/dicoms3D/components/Viewport.vue | 13 ++++++--
3 files changed, 30 insertions(+), 18 deletions(-)
diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue
index d86aba45..5db6be0f 100644
--- a/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue
+++ b/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue
@@ -190,14 +190,14 @@
-
+
Object.keys(i.MeasureData).length > 0 && i.OrderMarkName === baselineSeries.MeasureData.OrderMarkName)
if (i > -1) {
- obj = this.getMarkedSeries(studyList, annotations[i])
+ obj = this.getMarkedSeries(studyList, annotations[i].MeasureData)
}
}
if (Object.keys(obj).length === 0) {
@@ -1906,7 +1909,7 @@ export default {
const i = annotations.findIndex(a => Object.keys(a.MeasureData).length > 0)
if (i > -1) {
// 有标记时,显示带标记影像所在序列
- obj = this.getMarkedSeries(studyList, annotations[i])
+ obj = this.getMarkedSeries(studyList, annotations[i].MeasureData)
} else {
for (let k = 0; k < studyList.length; k++) {
const seriesIdx = studyList[k].SeriesList.findIndex(s => s.SliceThickness && parseInt(s.SliceThickness) === 5)
@@ -1935,21 +1938,21 @@ export default {
},
getMarkedSeries(studyList, annotation) {
let obj = {}
- const sIdx = studyList.findIndex(s => s.StudyId === annotation.StudyId)
+ const sIdx = studyList.findIndex(s => s.StudyId === annotation.studyId)
if (sIdx > -1) {
const seriesList = studyList[sIdx].SeriesList
- const seriesIdx = seriesList.findIndex(s => s.Id === annotation.SeriesId)
+ const seriesIdx = seriesList.findIndex(s => s.Id === annotation.seriesId)
if (seriesIdx > -1) {
- const instanceIdx = seriesList[seriesIdx].InstanceInfoList.findIndex(i => i.Id === annotation.InstanceId)
+ const instanceIdx = seriesList[seriesIdx].InstanceInfoList.findIndex(i => i.Id === annotation.instanceId)
let filterStr = ''
if (instanceIdx > -1 && seriesList[seriesIdx].IsExistMutiFrames) {
if (seriesList[seriesIdx].InstanceInfoList[instanceIdx].NumberOfFrames > 0) {
- filterStr = `frame=${annotation.MeasureData.frame}&instanceId=${annotation.InstanceId}`
+ filterStr = `instanceId=${annotation.instanceId}&frame=${annotation.numberOfFrames}`
} else {
- filterStr = `instanceId=${annotation.InstanceId}`
+ filterStr = `instanceId=${annotation.instanceId}`
}
} else {
- filterStr = `instanceId=${annotation.InstanceId}`
+ filterStr = `instanceId=${annotation.instanceId}`
}
const stack = seriesList[seriesIdx].Stack
const imageIdIdx = stack.findIndex(is => is.includes(filterStr))
@@ -2027,7 +2030,7 @@ export default {
}
const annotationIdx = this.visitTaskList[taskIdx].Annotations.findIndex(i => i.OrderMarkName === obj.lesionName)
if (annotationIdx > -1) {
- firstAddSeries = this.getMarkedSeries(this.visitTaskList[taskIdx].StudyList, this.visitTaskList[taskIdx].Annotations[annotationIdx])
+ firstAddSeries = this.getMarkedSeries(this.visitTaskList[taskIdx].StudyList, this.visitTaskList[taskIdx].Annotations[annotationIdx].MeasureData)
}
}
if (obj.isMarked) {
diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/StudyList.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/StudyList.vue
index 4419cdce..d4af2175 100644
--- a/src/views/trials/trials-panel/reading/dicoms3D/components/StudyList.vue
+++ b/src/views/trials/trials-panel/reading/dicoms3D/components/StudyList.vue
@@ -111,7 +111,7 @@
-
+
diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/Viewport.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/Viewport.vue
index 35ea856b..29ce4bf5 100644
--- a/src/views/trials/trials-panel/reading/dicoms3D/components/Viewport.vue
+++ b/src/views/trials/trials-panel/reading/dicoms3D/components/Viewport.vue
@@ -329,7 +329,15 @@ export default {
resize(forceFitToWindow) {
console.log('resize: ', forceFitToWindow)
const renderingEngine = getRenderingEngine(this.renderingEngineId)
- renderingEngine.resize(true, forceFitToWindow)
+ const viewport = renderingEngine.getViewport(this.viewportId)
+ if (!forceFitToWindow) {
+ viewport.setZoom(0.5)
+ viewport.render()
+ } else {
+ viewport.setZoom(1)
+ viewport.render()
+ }
+
},
async prefetchMetadataInformation(imageIdsToPrefetch) {
let taskPromises = []
@@ -346,10 +354,11 @@ export default {
if (this.series && obj.Id === this.series.Id && obj.Description === this.series.Description && !isLocate) {
obj.SliceIndex = this.series.SliceIndex
}
+ if (isLocate && obj.SliceIndex === this.series.SliceIndex) return
this.series = { ...obj }
const renderingEngine = getRenderingEngine(this.renderingEngineId)
const viewport = renderingEngine.getViewport(this.viewportId)
- await this.prefetchMetadataInformation(obj.ImageIds)
+ this.prefetchMetadataInformation(obj.ImageIds)
await viewport.setStack(this.series.Stack, obj.SliceIndex)
// cornerstoneTools.utilities.stackContextPrefetch.enable(viewport.element)
viewport.render()