分割清除内存问题
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
43aa371c36
commit
74c5d032fb
|
|
@ -402,6 +402,7 @@ export default {
|
||||||
this.statsKey = getCustomizeStandardsSegmentDicomTools('Labelmap')[0].props.filter(item => item !== 'width' && item !== 'length')
|
this.statsKey = getCustomizeStandardsSegmentDicomTools('Labelmap')[0].props.filter(item => item !== 'width' && item !== 'length')
|
||||||
// console.log(segmentation, 'segmentation')
|
// console.log(segmentation, 'segmentation')
|
||||||
// console.log(annotation, 'annotation')
|
// console.log(annotation, 'annotation')
|
||||||
|
console.log(cache, 'cache')
|
||||||
eventTarget.addEventListener(
|
eventTarget.addEventListener(
|
||||||
'CORNERSTONE_TOOLS_SEGMENTATION_DATA_MODIFIED',
|
'CORNERSTONE_TOOLS_SEGMENTATION_DATA_MODIFIED',
|
||||||
this.segmentationModifiedCallback
|
this.segmentationModifiedCallback
|
||||||
|
|
@ -885,6 +886,11 @@ export default {
|
||||||
if (!res) return false
|
if (!res) return false
|
||||||
segmentation.removeSegmentation(this.segmentationId)
|
segmentation.removeSegmentation(this.segmentationId)
|
||||||
segmentation.state.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)
|
let groupIndex = this.segmentList.findIndex(item => item.segmentationId === this.segmentationId)
|
||||||
this.segmentList.splice(groupIndex, 1)
|
this.segmentList.splice(groupIndex, 1)
|
||||||
let annotations = annotation.state.getAllAnnotations().filter(item => item.metadata.segmentationId === this.segmentationId);
|
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.segmentationId = this.segmentList[0].segmentationId;
|
||||||
this.selectSegmentGroup()
|
this.selectSegmentGroup()
|
||||||
} else {
|
} else {
|
||||||
this.segmentationId = ''
|
this.segmentationId = null
|
||||||
}
|
}
|
||||||
// this.readingSegmentByConfig()
|
// this.readingSegmentByConfig()
|
||||||
this.resetViewport()
|
this.resetViewport()
|
||||||
|
|
|
||||||
|
|
@ -229,6 +229,7 @@ function selectSegmentation(viewportId, segmentationId) {
|
||||||
segmentation.activeSegmentation.setActiveSegmentation(viewportId, segmentationId)
|
segmentation.activeSegmentation.setActiveSegmentation(viewportId, segmentationId)
|
||||||
}
|
}
|
||||||
function selectSegment(viewportId, segmentationId, segmentIndex) {
|
function selectSegment(viewportId, segmentationId, segmentIndex) {
|
||||||
|
if (!segmentIndex) return false
|
||||||
selectSegmentation(viewportId, segmentationId)
|
selectSegmentation(viewportId, segmentationId)
|
||||||
segmentation.segmentIndex.setActiveSegmentIndex(segmentationId, segmentIndex);
|
segmentation.segmentIndex.setActiveSegmentIndex(segmentationId, segmentIndex);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue