From 74c5d032fb469bc6e3e5a05cfe0306c6d8961796 Mon Sep 17 00:00:00 2001
From: wangxiaoshuang <825034831@qq.com>
Date: Fri, 17 Apr 2026 11:49:00 +0800
Subject: [PATCH] =?UTF-8?q?=E5=88=86=E5=89=B2=E6=B8=85=E9=99=A4=E5=86=85?=
=?UTF-8?q?=E5=AD=98=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../reading/dicoms3D/components/Segmentations.vue | 12 +++++++++---
.../dicoms3D/components/helpers/segmentations.js | 1 +
2 files changed, 10 insertions(+), 3 deletions(-)
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 77345c99..65f9f40b 100644
--- a/src/views/trials/trials-panel/reading/dicoms3D/components/Segmentations.vue
+++ b/src/views/trials/trials-panel/reading/dicoms3D/components/Segmentations.vue
@@ -123,7 +123,7 @@
{{
$t('trials:reading:Segmentations:title:InactiveSegmentationsShow')
- }}
+ }}
@@ -203,7 +203,7 @@
{{ k }}
{{ Number(item.stats[k].value).toFixed(2)
- }}{{ item.stats[k].unit }}
+ }}{{ item.stats[k].unit }}
{{ index + 1 }}
@@ -402,6 +402,7 @@ export default {
this.statsKey = getCustomizeStandardsSegmentDicomTools('Labelmap')[0].props.filter(item => item !== 'width' && item !== 'length')
// console.log(segmentation, 'segmentation')
// console.log(annotation, 'annotation')
+ console.log(cache, 'cache')
eventTarget.addEventListener(
'CORNERSTONE_TOOLS_SEGMENTATION_DATA_MODIFIED',
this.segmentationModifiedCallback
@@ -885,6 +886,11 @@ export default {
if (!res) return false
segmentation.removeSegmentation(this.segmentationId)
segmentation.state.removeSegmentation(this.segmentationId)
+ let volume = cache.getVolume(this.segmentationId)
+ // 1. 销毁 Volume 实例
+ volume.destroy();
+ // 2. 从缓存中移除
+ volume.removeFromCache();
let groupIndex = this.segmentList.findIndex(item => item.segmentationId === this.segmentationId)
this.segmentList.splice(groupIndex, 1)
let annotations = annotation.state.getAllAnnotations().filter(item => item.metadata.segmentationId === this.segmentationId);
@@ -895,7 +901,7 @@ export default {
this.segmentationId = this.segmentList[0].segmentationId;
this.selectSegmentGroup()
} else {
- this.segmentationId = ''
+ this.segmentationId = null
}
// this.readingSegmentByConfig()
this.resetViewport()
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 9bea809e..594a53c8 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
@@ -229,6 +229,7 @@ function selectSegmentation(viewportId, segmentationId) {
segmentation.activeSegmentation.setActiveSegmentation(viewportId, segmentationId)
}
function selectSegment(viewportId, segmentationId, segmentIndex) {
+ if (!segmentIndex) return false
selectSegmentation(viewportId, segmentationId)
segmentation.segmentIndex.setActiveSegmentIndex(segmentationId, segmentIndex);
}