普通标记在多个序列渲染问题
continuous-integration/drone/push Build is passing Details

uat_us
wangxiaoshuang 2026-03-27 18:01:41 +08:00
parent dbdec93efc
commit 2efb7fd36a
3 changed files with 19 additions and 16 deletions

View File

@ -1601,18 +1601,12 @@ export default {
// })
},
renderAnnotations(series) {
if (series.SeriesInstanceUid) {
let volume = cache.getVolume(series.SeriesInstanceUid)
console.log(volume.metadata.FrameOfReferenceUID);
}
const taskId = series.TaskInfo ? series.TaskInfo.VisitTaskId : null
if (!taskId || this.renderedTaskIds.includes(taskId)) return
this.renderedTaskIds.push(taskId)
const taskIdx = this.visitTaskList.findIndex(i => i.VisitTaskId === taskId)
if (taskIdx === -1) return
const annotations = this.visitTaskList[taskIdx].Annotations
console.log(annotations, 'annotations')
annotations.map(i => {
if (i.MeasureData && !Object.hasOwn(i.MeasureData, 'isDicomReading')) {
const annotation = i.MeasureData
@ -3113,6 +3107,7 @@ export default {
}
}
}
console.log(series, 'series')
this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].setSeriesInfo(series, obj.segment ? false : true)
this.$refs[series.TaskInfo.VisitTaskId][0].setSeriesActive(series.StudyIndex, series.SeriesIndex)
}

View File

@ -26,7 +26,7 @@
</div>
<div :class="['tool-item', activeTool === 'CircularEraser' && segmentList.length > 0 ? 'tool-item-active' : '']"
:style="{ cursor: segmentList.length <= 0 || (curSegment && curSegment.lock) ? 'not-allowed' : 'pointer' }"
:title="$t('trials:dicom-show:Eraser')" @click.prevent="setToolActive('CircularEraser')">
:title="$t('trials:dicom-show:segmentEraser')" @click.prevent="setToolActive('CircularEraser')">
<svg-icon icon-class="clear" class="svg-icon" />
</div>
<!-- <div :class="['tool-item']">
@ -120,7 +120,7 @@
</el-switch>
<span style="margin-left: 5px;">{{
$t('trials:reading:Segmentations:title:InactiveSegmentationsShow')
}}</span>
}}</span>
</div>
<!-- <div class="SegmentConfig" v-if="SegmentConfig.InactiveSegmentations.show">
<span>{{ $t('trials:reading:Segmentations:title:Opacity') }}</span>
@ -176,7 +176,7 @@
<template v-else>
<div class="num">
<span>L:{{ Number(item.bidirectional.maxMajor).toFixed(2) }} mm</span>
<span>s:{{ Number(item.bidirectional.maxMinor).toFixed(2) }} mm</span>
<span>W:{{ Number(item.bidirectional.maxMinor).toFixed(2) }} mm</span>
</div>
<div class="btnBox">
<svg-icon :icon-class="!item.bidirectionalView ? 'eye' : 'eye-open'"
@ -191,7 +191,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>
@ -232,7 +232,7 @@
</el-collapse>
<div class="saveBtnBox">
<el-button type="success" size="small" @click="saveSegmentGroup()">{{ $t("common:button:save")
}}</el-button>
}}</el-button>
</div>
</div>
</template>
@ -368,6 +368,8 @@ export default {
})
DicomEvent.$on('isloaded', (data) => {
let { segment } = data
this.drawing = false
this.isDel = false
this.delAllSegment()
this.getSegmentationList(segment)
})
@ -459,7 +461,6 @@ export default {
list.forEach(item => {
this.createSegmentConfiguration(item.segmentIndex, item.segmentationId);
})
const renderingEngine = getRenderingEngine(this.renderingEngineId)
const viewportId = `${this.viewportKey}-${this.activeViewportIndex}`
const viewport = renderingEngine.getViewport(viewportId);
@ -564,7 +565,7 @@ export default {
async jumpBidirectional(item) {
if (item.bidirectional) {
let an = annotation.state.getAllAnnotations().find(i => i.metadata.segmentationId === item.segmentationId && i.metadata.segmentIndex === item.segmentIndex && i.metadata.toolName === "SegmentBidirectional");
console.log(an, 'an')
// console.log(an, 'an')
if (!an) return false
const renderingEngine = getRenderingEngine(this.renderingEngineId)
@ -827,7 +828,6 @@ export default {
},
async customPrompt() {
try {
console.log(annotation.state.getAllAnnotations(), 'annotation.state.getAllAnnotations()')
const that = this
//
let message = this.$t('trials:reading:Segmentations:message:rename')
@ -1139,7 +1139,6 @@ export default {
if (toolName === 'ThresholdSphere') {
this.setDynamicRadius()
}
console.log(this.brushThreshold.dynamicRadius, 'this.brushThreshold.dynamicRadius')
},
setDynamicRadius() {
let volume = cache.getVolume(this.series.SeriesInstanceUid);
@ -1192,6 +1191,7 @@ export default {
segmentationModifiedCallback(evt) {
const { detail } = evt;
// console.log(detail)
if (!detail.modifiedSlicesToUse) return
if (detail.segmentIndex === 0) {
this.drawing = true
this.isDel = true
@ -1201,6 +1201,7 @@ export default {
return;
}
this.drawing = true
if (this.activeTool === LabelMapEditWithContourTool.toolName) this.contentMouseup()
},
async calculateStatistics(indices, segmentationId, mode) {
if (!segmentation.state.getSegmentation(segmentationId)) return false
@ -1209,7 +1210,6 @@ export default {
segmentIndices: indices,
mode,
});
console.log(stats)
if (mode === 'individual') {
const segmentStats = stats;
@ -1431,6 +1431,7 @@ export default {
let res = await getSegmentationList(data);
this.loading = false;
if (res.IsSuccess) {
this.segmentationId = null;
this.segmentList = []
let list = res.Result.CurrentPageData;
for (let i = 0; i < list.length; i++) {

View File

@ -282,6 +282,13 @@ export default {
this.imageInfo.location = imagePlaneModule.sliceLocation
this.imageInfo.total = detail.numberOfSlices
this.getOrientationMarker()
let annotations = cornerstoneTools.annotation.state.getAllAnnotations().filter(item => item.metadata.toolName !== 'ScaleOverlay' && item.metadata.volumeId !== this.volumeId && !item.metadata.segmentationId)
// console.log(annotations, 'annotations')
annotations.forEach(item => {
cornerstoneTools.annotation.state.removeAnnotation(item.annotationUID)
})
this.$emit('renderAnnotations', this.series)
let properties = viewport.getProperties()
if (this.isFusion) {