From b3ae801fe9ae266695c5ea130ba0b97b30b844ef Mon Sep 17 00:00:00 2001 From: wangxiaoshuang <825034831@qq.com> Date: Mon, 30 Mar 2026 14:36:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B2=A1=E6=9C=89=E5=88=86=E5=89=B2=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E7=9A=84Segmentation=EF=BC=8C=E4=BB=8E=E4=BA=8C?= =?UTF-8?q?=E7=BB=B4=E8=BF=9B=E5=85=A5MPR=E6=97=B6=EF=BC=8C=E4=BC=9A?= =?UTF-8?q?=E6=98=BE=E7=A4=BA3=E4=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../js/imagePixelSpacingMetaDataProvider.js | 2 +- .../dicoms3D/components/Segmentations.vue | 70 +++++++++++-------- 2 files changed, 41 insertions(+), 31 deletions(-) diff --git a/src/views/trials/trials-panel/reading/dicoms/components/Fusion/js/imagePixelSpacingMetaDataProvider.js b/src/views/trials/trials-panel/reading/dicoms/components/Fusion/js/imagePixelSpacingMetaDataProvider.js index 64a75482..d403fa9f 100644 --- a/src/views/trials/trials-panel/reading/dicoms/components/Fusion/js/imagePixelSpacingMetaDataProvider.js +++ b/src/views/trials/trials-panel/reading/dicoms/components/Fusion/js/imagePixelSpacingMetaDataProvider.js @@ -7,7 +7,7 @@ import { extractSliceThicknessFromDataset, } from "@/utils/extractPositioningFromDataset"; import getNumberValues from "@/utils/getNumberValues"; - +import isNMReconstructable from "@/utils/isNMReconstructable"; function getSpacingBetweenSlices(dataSet) { if (dataSet?.elements?.x00180088) { return dataSet.floatString("x00180088"); 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 b5ffb134..7cd876d5 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/Segmentations.vue +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/Segmentations.vue @@ -351,7 +351,8 @@ export default { statsKey: [], drawing: false, // 是否正在分割 isDel: false, - digitPlaces: 2 + digitPlaces: 2, + isloaded: false } }, mounted() { @@ -367,6 +368,8 @@ export default { this.series = series }) DicomEvent.$on('isloaded', (data) => { + if (this.isloaded) return false + this.isloaded = true let { segment } = data this.delAllSegment() this.getSegmentationList(segment) @@ -1429,43 +1432,49 @@ export default { let res = await getSegmentationList(data); this.loading = false; if (res.IsSuccess) { - this.segmentList = [] + // this.segmentList = [] let list = res.Result.CurrentPageData; for (let i = 0; i < list.length; i++) { let item = list[i] - let obj = { - segmentationId: item.Id, - name: item.SegmentationName, - view: true, - segUrl: item.SEGUrl, - segments: [] - } - this.segmentList.push(obj) - if (item.SEGUrl) { - await this.readSegmentation(obj) - } else { - await this.createSegmentation(obj.segmentationId) - this.createSegmentationRepresentation(obj.segmentationId) + let obj = this.segmentList.find(i => i.segmentationId === item.Id) + if (!obj) { + obj = { + segmentationId: item.Id, + name: item.SegmentationName, + view: true, + segUrl: item.SEGUrl, + segments: [] + } + this.segmentList.push(obj) + if (item.SEGUrl) { + await this.readSegmentation(obj) + } else { + await this.createSegmentation(obj.segmentationId) + this.createSegmentationRepresentation(obj.segmentationId) + } } let segments = await this.getSegmentList(item.Id) segments.forEach((s, index) => { let SegmentJson = s.SegmentJson ? JSON.parse(s.SegmentJson) : {}; - let o = { - segmentIndex: s.SegmentMumber, - segmentationId: s.SegmentationId, - SegmentLabel: s.SegmentName, - color: s.ColorRgb, - stats: SegmentJson.stats, - bidirectional: SegmentJson.bidirectional, - bidirectionalView: true, - view: true, - lock: item.locked, - id: s.Id + let o = obj.segments.find(i => i.id === s.Id) + if (!o) { + o = { + segmentIndex: s.SegmentMumber, + segmentationId: s.SegmentationId, + SegmentLabel: s.SegmentName, + color: s.ColorRgb, + stats: SegmentJson.stats, + bidirectional: SegmentJson.bidirectional, + bidirectionalView: true, + view: true, + lock: item.locked, + id: s.Id + } + obj.segments.push(o) + this.selectSegment(o) + this.changeColor(s.ColorRgb, o) + this.lockSegment(o, true) } - obj.segments.push(o) - this.selectSegment(o) - this.changeColor(s.ColorRgb, o) - this.lockSegment(o, true) }) this.$nextTick(() => { if (SEGMENT) { @@ -1475,6 +1484,7 @@ export default { this.getBidirectional(obj.segments) }) } + this.isloaded = false } } catch (err) { this.loading = false