From eac6b25b9e22c459f3c9377478bde651b84feeba Mon Sep 17 00:00:00 2001
From: wangxiaoshuang <825034831@qq.com>
Date: Tue, 14 Apr 2026 18:01:21 +0800
Subject: [PATCH] =?UTF-8?q?=E5=88=86=E5=89=B2=E9=83=A8=E5=88=86=E9=97=AE?=
=?UTF-8?q?=E9=A2=98=E4=BF=AE=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../dicoms3D/components/MPRViewport.vue | 5 ++--
.../reading/dicoms3D/components/ReadPage.vue | 10 ++++++++
.../dicoms3D/components/Segmentations.vue | 25 +++++++++----------
.../dicoms3D/components/VolumeViewport.vue | 2 ++
.../components/helpers/segmentations.js | 18 +++++++------
5 files changed, 38 insertions(+), 22 deletions(-)
diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/MPRViewport.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/MPRViewport.vue
index 44cb1d08..c80ad06b 100644
--- a/src/views/trials/trials-panel/reading/dicoms3D/components/MPRViewport.vue
+++ b/src/views/trials/trials-panel/reading/dicoms3D/components/MPRViewport.vue
@@ -40,10 +40,10 @@
Location: {{
`${Number(imageInfo.location).toFixed(digitPlaces)} mm`
- }}
+ }}
Slice Thickness: {{
`${Number(imageInfo.sliceThickness).toFixed(digitPlaces)} mm`
- }}
+ }}
WW/WL: {{ imageInfo.wwwc }}
@@ -613,6 +613,7 @@ export default {
}, 100)
}
await renderSegmentation(this.series, this.series.TaskInfo, this.viewportId, this.SegmentConfig, this.segmentationId, this.segmentIndex, this.renderingEngineId, null, this.actionConfiguration)
+ DicomEvent.$emit('loading', this.viewportId)
} catch (e) {
console.log(e)
}
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 b58b06af..1bc59f41 100644
--- a/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue
+++ b/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue
@@ -2032,6 +2032,11 @@ export default {
}
const i = this.tools.findIndex(i => i.toolName === annotation.metadata.toolName)
if (i === -1) {
+ if (annotation.metadata.toolName === SegmentBidirectionalTool.toolName) {
+ this.setToolsPassive()
+ const errorMsg = { message: 'SegmentBidirectionalTool Not remove' }
+ throw errorMsg
+ }
// 临时标记
return
}
@@ -2700,6 +2705,8 @@ export default {
const viewportId = `${this.viewportKey}-${this.activeViewportIndex}`
const viewport = renderingEngine.getViewport(viewportId)
this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].resetOrientationMarkers()
+ let index = this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].series.SliceIndex
+ console.log(index, 'index')
viewport.resetCamera({ resetPan: true, resetZoom: true, resetToCenter: true })
viewport.resetProperties()
if (this.isMPR) {
@@ -2718,6 +2725,9 @@ export default {
if (this.readingTool === 3) {
DicomEvent.$emit('isloaded', { isChange: false, viewportId })
}
+ if (this.readingTool === 3 || this.isMPR) {
+ this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].setFullScreen(index)
+ }
},
// 更改视图布局
async changeLayout(v) {
diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/Segmentations.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/Segmentations.vue
index 5f67806e..97a9cf3a 100644
--- a/src/views/trials/trials-panel/reading/dicoms3D/components/Segmentations.vue
+++ b/src/views/trials/trials-panel/reading/dicoms3D/components/Segmentations.vue
@@ -408,14 +408,10 @@ export default {
DicomEvent.$on('isloaded', (data) => {
let { segment, isChange = true, viewportId, series } = data
DicomEvent.$emit('renderSegmentation', viewportId)
- // if (!series.TaskInfo || series.TaskInfo.VisitTaskId !== this.visitInfo.VisitTaskId) return false
- // if (this.isloaded) return false
- // this.isloaded = true
- // this.series = series
- // this.viewportIds = []
- // this.viewportIds.push(viewportId)
- // // this.delAllSegment(isChange)
- // this.readingSegmentToViewport(segment)
+ })
+ DicomEvent.$on('loading', (viewportId) => {
+ if (viewportId !== `${this.viewportKey}-${this.activeViewportIndex}`) return false
+ this.loading = false
})
const digitPlaces = Number(localStorage.getItem('digitPlaces'))
this.digitPlaces = digitPlaces === -1 ? this.digitPlaces : digitPlaces
@@ -1422,6 +1418,8 @@ export default {
}/${this.series.Id}/${segmentGroup.name}.dcm`
const result = await this.OSSclient.put(path, blob)
segmentGroup.segUrl = this.$getObjectName(result.url)
+ } else {
+ segmentGroup.segUrl = null
}
this.addOrUpdateSegmentation({ name: segmentGroup.name, id: segmentGroup.segmentationId, url: segmentGroup.segUrl })
@@ -1582,7 +1580,7 @@ export default {
}
this.loading = true;
let res = await getSegmentationList(data);
- this.loading = false;
+ // this.loading = false;
if (res.IsSuccess) {
this.segmentList = []
this.segmentationId = null;
@@ -1659,10 +1657,11 @@ export default {
// }
// }
this.isloaded = false
+ // this.loading = true
// this.readingSegmentByConfig()
}
} catch (err) {
- this.loading = false
+ // this.loading = false
console.log(err)
}
},
@@ -1711,14 +1710,14 @@ export default {
PageSize: 9999,
PageIndex: 1,
}
- this.loading = true;
+ // this.loading = true;
let res = await getSegmentList(data)
- this.loading = false;
+ // this.loading = false;
if (res.IsSuccess) {
return res.Result.CurrentPageData
}
} catch (err) {
- this.loading = false
+ // this.loading = false
console.log(err)
}
},
diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/VolumeViewport.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/VolumeViewport.vue
index 59b3d097..14b79e27 100644
--- a/src/views/trials/trials-panel/reading/dicoms3D/components/VolumeViewport.vue
+++ b/src/views/trials/trials-panel/reading/dicoms3D/components/VolumeViewport.vue
@@ -436,6 +436,7 @@ export default {
const viewport = renderingEngine.getViewport(
this.viewportId
)
+ console.log(index, 'setFullScreen')
csUtils.jumpToSlice(viewport.element, { imageIndex: index })
viewport.render()
})
@@ -674,6 +675,7 @@ export default {
}, 100)
}
await renderSegmentation(this.series, this.series.TaskInfo, this.viewportId, this.SegmentConfig, this.segmentationId, this.segmentIndex, this.renderingEngineId, data.segment, this.actionConfiguration)
+ DicomEvent.$emit('loading', this.viewportId)
} catch (e) {
console.log(e)
}
diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/helpers/segmentations.js b/src/views/trials/trials-panel/reading/dicoms3D/components/helpers/segmentations.js
index 055c0c59..79e7540e 100644
--- a/src/views/trials/trials-panel/reading/dicoms3D/components/helpers/segmentations.js
+++ b/src/views/trials/trials-panel/reading/dicoms3D/components/helpers/segmentations.js
@@ -155,11 +155,12 @@ function removeSegmentFromViewport(viewportId) {
viewportInfo[viewportId].forEach(async segmentationId => {
segmentation.removeSegmentation(segmentationId)
segmentation.state.removeSegmentation(segmentationId)
- let annotations = annotation.state.getAllAnnotations().filter(item => item.metadata.segmentationId && segmentationId === item.metadata.segmentationId && item.metadata.segmentIndex && item.metadata.toolName === "SegmentBidirectional");
+ let annotations = annotation.state.getAllAnnotations().filter(item => item.metadata.segmentationId && segmentationId === item.metadata.segmentationId && item.metadata.toolName === "SegmentBidirectional");
annotations.forEach(item => {
annotation.state.removeAnnotation(item.annotationUID)
})
})
+ resetViewport(viewportId)
}
viewportInfo[viewportId] = []
resolve(true)
@@ -378,13 +379,16 @@ async function renderSegmentation(series, visitInfo, viewportId, SegmentConfig,
segmentation.config.color.setSegmentIndexColor(viewportId, s.SegmentationId, s.SegmentNumber, hex2Rgb(s.ColorRgb))
segmentation.segmentLocking.setSegmentIndexLocked(s.SegmentationId, s.SegmentNumber, true)
if (SegmentJson.bidirectional) {
- let { majorAxis, minorAxis } = SegmentJson.bidirectional
- // createSegmentConfiguration(s.SegmentNumber, s.SegmentationId, viewportId, actionConfiguration)
- SegmentBidirectionalTool.hydrate(viewportId, [majorAxis, minorAxis], {
- segmentIndex: s.SegmentNumber,
- segmentationId: s.SegmentationId,
- })
let an = annotation.state.getAllAnnotations().find(i => i.metadata.segmentationId === s.SegmentationId && i.metadata.segmentIndex === SegmentJson.bidirectional.segmentIndex && i.metadata.toolName === "SegmentBidirectional");
+ if (!an) {
+ let { majorAxis, minorAxis } = SegmentJson.bidirectional
+ // createSegmentConfiguration(s.SegmentNumber, s.SegmentationId, viewportId, actionConfiguration)
+ SegmentBidirectionalTool.hydrate(viewportId, [majorAxis, minorAxis], {
+ segmentIndex: s.SegmentNumber,
+ segmentationId: s.SegmentationId,
+ })
+ }
+ an = annotation.state.getAllAnnotations().find(i => i.metadata.segmentationId === s.SegmentationId && i.metadata.segmentIndex === SegmentJson.bidirectional.segmentIndex && i.metadata.toolName === "SegmentBidirectional");
if (an) {
annotation.locking.setAnnotationLocked(an.annotationUID, true)
annotation.visibility.setAnnotationVisibility(an.annotationUID, item.bidirectionalView)