分割分组重命名时传入文件大小
continuous-integration/drone/push Build is passing Details

main
wangxiaoshuang 2026-05-12 10:55:07 +08:00
parent a55278e323
commit fed2677689
1 changed files with 6 additions and 14 deletions

View File

@ -127,7 +127,7 @@
</el-switch> </el-switch>
<span style="margin-left: 5px;">{{ <span style="margin-left: 5px;">{{
$t('trials:reading:Segmentations:title:InactiveSegmentationsShow') $t('trials:reading:Segmentations:title:InactiveSegmentationsShow')
}}</span> }}</span>
</div> </div>
</div> </div>
<template v-if="segmentList.length > 0"> <template v-if="segmentList.length > 0">
@ -302,7 +302,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click.stop="restoreSegmentationVersion(scope.row)">{{ <el-button type="text" @click.stop="restoreSegmentationVersion(scope.row)">{{
$t('trials:reading:Segmentations:button:recovery') $t('trials:reading:Segmentations:button:recovery')
}}</el-button> }}</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -937,11 +937,7 @@ export default {
this.segmentList.push(obj); this.segmentList.push(obj);
this.segmentationId = obj.segmentationId; this.segmentationId = obj.segmentationId;
this.segmentIndex = 1 this.segmentIndex = 1
// segmentation.segmentIndex.setActiveSegmentIndex(this.segmentationId, 1);
// viewportIds.forEach(id => {
// segmentation.config.color.setSegmentIndexColor(id, obj.segmentationId, 1, this.hex2Rgb(this.colors[0]))
// })
// this.selectSegmentGroup()
}, },
async addSegment() { async addSegment() {
if (this.saveLoading) return false if (this.saveLoading) return false
@ -1026,9 +1022,6 @@ export default {
}, },
changeColor(e, item) { changeColor(e, item) {
DicomEvent.$emit('changeColor', item) DicomEvent.$emit('changeColor', item)
// this.viewportIds.forEach(id => {
// segmentation.config.color.setSegmentIndexColor(id, item.segmentationId, item.segmentIndex, this.hex2Rgb(e))
// })
}, },
// //
delAllSegment(isChange) { delAllSegment(isChange) {
@ -1073,7 +1066,6 @@ export default {
} else { } else {
this.segmentationId = null this.segmentationId = null
} }
// this.readingSegmentByConfig()
this.resetViewport() this.resetViewport()
this.$emit('resetQuestion') this.$emit('resetQuestion')
}, },
@ -1090,7 +1082,6 @@ export default {
if (!res) return false if (!res) return false
segmentation.removeSegment(this.segmentationId, Number(segmentIndex), { setNextSegmentAsActive: false, recordHistory: false }) segmentation.removeSegment(this.segmentationId, Number(segmentIndex), { setNextSegmentAsActive: false, recordHistory: false })
segmentation.helpers.clearSegmentValue(this.segmentationId, Number(segmentIndex), { recordHistory: false }) segmentation.helpers.clearSegmentValue(this.segmentationId, Number(segmentIndex), { recordHistory: false })
// segmentation.updateSegmentations({ segmentationId: this.segmentationId })
let index = this.segmentList[groupIndex].segments.findIndex(item => item.segmentIndex === segmentIndex) let index = this.segmentList[groupIndex].segments.findIndex(item => item.segmentIndex === segmentIndex)
this.segmentList[groupIndex].segments.splice(index, 1) this.segmentList[groupIndex].segments.splice(index, 1)
let annotations = annotation.state.getAllAnnotations().filter(item => item.metadata.segmentationId === this.segmentationId && item.metadata.segmentIndex === segmentIndex); let annotations = annotation.state.getAllAnnotations().filter(item => item.metadata.segmentationId === this.segmentationId && item.metadata.segmentIndex === segmentIndex);
@ -1122,7 +1113,7 @@ export default {
if (key === 'segmentGroup') { if (key === 'segmentGroup') {
let group = this.segmentList.find(i => i.segmentationId === this.segmentationId) let group = this.segmentList.find(i => i.segmentationId === this.segmentationId)
group.name = name group.name = name
this.addOrUpdateSegmentation({ name, id: group.segmentationId, url: group.segUrl }) this.addOrUpdateSegmentation({ name, id: group.segmentationId, url: group.segUrl, size: group.size })
} else { } else {
item.SegmentLabel = name item.SegmentLabel = name
this.addOrUpdateSegment({ name: item.SegmentLabel, color: item.color, segmentIndex: item.segmentIndex, segmentationId: item.segmentationId, segmentJson: JSON.stringify({ stats: item.stats, bidirectional: item.bidirectional }), id: item.id }) this.addOrUpdateSegment({ name: item.SegmentLabel, color: item.color, segmentIndex: item.segmentIndex, segmentationId: item.segmentationId, segmentJson: JSON.stringify({ stats: item.stats, bidirectional: item.bidirectional }), id: item.id })
@ -1456,7 +1447,6 @@ export default {
let { spacing, numFrames } = volume let { spacing, numFrames } = volume
let constant = numFrames * spacing[2] / 100 let constant = numFrames * spacing[2] / 100
this.brushThreshold.dynamicRadius = Math.ceil(this.brushSize * constant) this.brushThreshold.dynamicRadius = Math.ceil(this.brushSize * constant)
// console.log(this.brushThreshold.dynamicRadius)
}, },
setBrushThreshold() { setBrushThreshold() {
const toolGroupId = this.isMPR ? this.volumeToolGroupId : `${this.viewportKey}-${this.activeViewportIndex}` const toolGroupId = this.isMPR ? this.volumeToolGroupId : `${this.viewportKey}-${this.activeViewportIndex}`
@ -1845,6 +1835,7 @@ export default {
if (!obj) continue; if (!obj) continue;
obj.name = item.SegmentationName; obj.name = item.SegmentationName;
obj.segUrl = item.SEGUrl; obj.segUrl = item.SEGUrl;
obj.size = item.FileSize;
obj.isSaved = item.IsSaved; obj.isSaved = item.IsSaved;
obj.segmentationId = item.Id; obj.segmentationId = item.Id;
obj.segments = [] obj.segments = []
@ -1910,6 +1901,7 @@ export default {
name: item.SegmentationName, name: item.SegmentationName,
view: true, view: true,
segUrl: item.SEGUrl, segUrl: item.SEGUrl,
size: item.FileSize,
isSaved: item.IsSaved, isSaved: item.IsSaved,
segments: [] segments: []
} }