分割恢复问题解决
continuous-integration/drone/push Build is passing Details

main
wangxiaoshuang 2026-05-11 13:58:51 +08:00
parent ec676d8d2b
commit 717c5a6529
1 changed files with 14 additions and 14 deletions

View File

@ -127,7 +127,7 @@
</el-switch>
<span style="margin-left: 5px;">{{
$t('trials:reading:Segmentations:title:InactiveSegmentationsShow')
}}</span>
}}</span>
</div>
</div>
<template v-if="segmentList.length > 0">
@ -300,7 +300,7 @@
<template slot-scope="scope">
<el-button type="text" @click.stop="restoreSegmentationVersion(scope.row)">{{
$t('trials:reading:Segmentations:button:recovery')
}}</el-button>
}}</el-button>
</template>
</el-table-column>
</el-table>
@ -339,6 +339,7 @@ const { segmentation: segmentationUtils } = CStUtils;
const { cache, getRenderingEngine, imageLoader, eventTarget, metaData, utilities: csUtils, volumeLoader } = cornerstone;
// const { downloadDICOMData } = cornerstoneAdapters.helpers;
const { Cornerstone3D } = cornerstoneAdapters.adaptersSEG;
const searchDataDefault = () => {
return {
SegmentationId: null,
@ -703,7 +704,6 @@ export default {
},
setToolActive(toolName) {
// if (!this.series.TaskInfo || this.series.TaskInfo.VisitTaskId !== this.visitInfo.VisitTaskId) return false
if (this.segmentList.length <= 0) return false
if (this.curSegment.lock) return false
if (this.isMPR) return false
@ -746,13 +746,8 @@ export default {
for (let j = 0; j < arr.length; j++) {
let item = arr[j]
item.bidirectionalView = view
// let bidirectional = annotation.state.getAllAnnotations().find(i => i.metadata.segmentationId === item.segmentationId && i.metadata.segmentIndex === item.segmentIndex && i.metadata.toolName === "SegmentBidirectional");
// item.bidirectionalView = view
// if (!bidirectional) continue
// annotation.visibility.setAnnotationVisibility(bidirectional.annotationUID, view)
}
DicomEvent.$emit('viewBidirectional', arr)
// this.resetViewport()
},
async jumpBidirectional(item) {
DicomEvent.$emit('jumpBidirectional', item)
@ -806,16 +801,25 @@ export default {
if (res.IsSuccess) {
segmentation.removeSegmentation(this.segmentationId)
segmentation.state.removeSegmentation(this.segmentationId)
let annotations = annotation.state.getAllAnnotations().filter(item => item.metadata.segmentationId && this.segmentationId === item.metadata.segmentationId && item.metadata.toolName === "SegmentBidirectional");
annotations.forEach(item => {
annotation.state.removeAnnotation(item.annotationUID)
})
let volume = cache.getVolume(this.segmentationId)
// 1. Volume
volume.destroy();
// 2.
volume.removeFromCache();
let imageId = null
if (this.curSegmentGroup.oldSegUrl) {
cache.removeImageLoadObject(`wadouri:${this.OSSclientConfig.basePath}${this.curSegmentGroup.oldSegUrl}`)
imageId = `wadouri:${this.OSSclientConfig.basePath}${this.curSegmentGroup.oldSegUrl}`
this.curSegmentGroup.oldSegUrl = null
} else {
cache.removeImageLoadObject(`wadouri:${this.OSSclientConfig.basePath}${this.curSegmentGroup.segUrl}`)
imageId = `wadouri:${this.OSSclientConfig.basePath}${this.curSegmentGroup.segUrl}`
}
if (imageId && cache.getImage(imageId)) {
cache.removeImageLoadObject(imageId)
}
this.getSegmentation(this.segmentationId)
DicomEvent.$emit('renderSegmentationBychangeSegmention')
@ -854,16 +858,12 @@ export default {
}
},
selectSegmentGroup(s) {
// segmentation.activeSegmentation.setActiveSegmentation(`${this.viewportKey}-${this.activeViewportIndex}`, this.segmentationId)
this.$emit('setToolsPassive')
this.segmentIndex = null;
let segment = s ? s : this.segmentList.find(item => item.segmentationId === this.segmentationId).segments[0]
this.$nextTick(() => {
this.selectSegment(segment)
})
// this.segmentIndex = segment.segmentIndex
// this.selectSegment(segment, s ? false : true)
// this.readingSegmentByConfig()
},
getSegmentationName(num = 1) {
let defaultSegmentationName = this.trialCriterion.DefaultSegmentName.SegmentationName