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') - }} + }}
{{ 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); }