分割清除内存问题
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
43aa371c36
commit
74c5d032fb
|
|
@ -123,7 +123,7 @@
|
|||
</el-switch>
|
||||
<span style="margin-left: 5px;">{{
|
||||
$t('trials:reading:Segmentations:title:InactiveSegmentationsShow')
|
||||
}}</span>
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<template v-if="segmentList.length > 0">
|
||||
|
|
@ -203,7 +203,7 @@
|
|||
<div v-for="k in statsKey" :key="k" class="statsBox">
|
||||
<span>{{ k }}</span>
|
||||
<span v-if="item.stats[k]">{{ Number(item.stats[k].value).toFixed(2)
|
||||
}}<i>{{ item.stats[k].unit }}</i></span>
|
||||
}}<i>{{ item.stats[k].unit }}</i></span>
|
||||
</div>
|
||||
</template>
|
||||
<div class="serialNum" slot="reference">{{ index + 1 }}</div>
|
||||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue