分割部分问题修复

uat_us
wangxiaoshuang 2026-04-16 15:21:53 +08:00
parent 11000ef9f8
commit 88f274ab89
5 changed files with 26 additions and 16 deletions

View File

@ -40,10 +40,10 @@
<div v-if="series" class="right-bottom-text">
<div v-show="imageInfo.location">Location: {{
`${Number(imageInfo.location).toFixed(digitPlaces)} mm`
}}</div>
}}</div>
<div v-show="imageInfo.sliceThickness">Slice Thickness: {{
`${Number(imageInfo.sliceThickness).toFixed(digitPlaces)} mm`
}}</div>
}}</div>
<div v-show="imageInfo.wwwc">WW/WL: {{ imageInfo.wwwc }}</div>
</div>
<div class="orientation-top">
@ -614,6 +614,11 @@ export default {
}
await renderSegmentation(this.series, this.series.TaskInfo, this.viewportId, this.SegmentConfig, this.renderingEngineId, null, this.actionConfiguration)
DicomEvent.$emit('SegmentationLoading', this.viewportId)
let volume = cache.getVolume(this.volumeId)
// console.log(volume, 'volume')
if (this.series.orientation === 'AXIAL' && this.series.curIndex) return this.setFullScreen(this.series.curIndex)
let index = this.series.orientation === 'AXIAL' ? Math.ceil((volume._imageIds.length - 1) / 2) - 1 : Math.ceil((volume.dimensions[0]) / 2) - 1
this.setFullScreen(index)
} catch (e) {
console.log(e)
}

View File

@ -1678,7 +1678,6 @@ export default {
toolGroup.setToolPassive(WindowLevelTool.toolName)
toolGroup.setToolPassive(WindowLevelRegionTool.toolName)
toolGroup.setToolPassive(PlanarRotateTool.toolName)
if (this.readingTaskState < 2) {
toolGroup.setToolPassive(ArrowAnnotateTool.toolName)
toolGroup.setToolPassive(RectangleROITool.toolName)
@ -1705,7 +1704,10 @@ export default {
toolGroup.setToolEnabled(FixedRadiusCircleROITool.toolName)
toolGroup.setToolEnabled(AngleTool.toolName)
toolGroup.setToolEnabled(CobbAngleTool.toolName)
if (this.readingTool === 3) toolGroup.setToolEnabled(LabelMapEditWithContourTool.toolName)
if (this.readingTool === 3) {
toolGroup.setToolEnabled(LabelMapEditWithContourTool.toolName)
toolGroup.setToolEnabled(SegmentBidirectionalTool.toolName);
}
}
toolGroup.setToolPassive(EraserTool.toolName)
}
@ -2812,7 +2814,6 @@ export default {
const viewport = renderingEngine.getViewport(viewportId)
this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].resetOrientationMarkers()
let index = this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].series.SliceIndex
console.log(index, 'index')
viewport.resetCamera({ resetPan: true, resetZoom: true, resetToCenter: true })
viewport.resetProperties()
if (this.isMPR) {
@ -2820,7 +2821,6 @@ export default {
const voi = metaData.get('voiLutModule', volume._imageIds[Math.ceil((volume._imageIds.length - 1) / 2)])
const lower = voi.windowCenter[0] - voi.windowWidth[0] / 2
const upper = voi.windowCenter[0] + voi.windowWidth[0] / 2 - 1
console.log(lower, upper)
viewport.setProperties({ voiRange: { upper: upper, lower: lower } })
}
if (this.readingTool === 3 && this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].series.Modality === 'PT') {
@ -3970,6 +3970,7 @@ export default {
if (series.ImageIds.length <= 5) return this.$confirm(this.$t('trials:reading:confirm:smallNumberOfimage'), this.$t('system:menu:confirm:title:warning'), {
type: 'warning'
})
series.curIndex = series.SliceIndex
DicomEvent.$emit('changeMPR')
if (series.ImageIds.length > 500) {
let res = await this.getSystemInfo()

View File

@ -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">
@ -202,7 +202,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>
@ -424,8 +424,11 @@ export default {
DicomEvent.$on('changeMPR', () => {
if (this.loading) return false
// if (viewportId !== `${this.viewportKey}-${this.activeViewportIndex}`) return false
this.segmentationId = this.segmentList[0].segmentationId
this.segmentIndex = this.segmentList[0] ? this.segmentList[0].segments[0].segmentIndex : null
if (this.segmentList && this.segmentList.length > 0) {
this.segmentationId = this.segmentList[0].segmentationId
this.segmentIndex = this.segmentList[0] ? this.segmentList[0].segments[0].segmentIndex : null
}
})
const digitPlaces = Number(localStorage.getItem('digitPlaces'))
this.digitPlaces = digitPlaces === -1 ? this.digitPlaces : digitPlaces
@ -771,6 +774,7 @@ export default {
// this.selectSegmentGroup()
},
async addSegment() {
if (this.saveLoading) return false
if (this.segmentList.length <= 0) {
let obj = {
name: this.getSegmentationName(),

View File

@ -383,6 +383,7 @@ export default {
},
stackNewImage(e) {
const { detail } = e
console.log(detail.imageIndex, 'detail.imageIndex')
this.series.SliceIndex = detail.imageIndex
this.sliderInfo.height = detail.imageIndex * 100 / detail.numberOfSlices
const renderingEngine = getRenderingEngine(this.renderingEngineId)
@ -436,7 +437,6 @@ export default {
const viewport = renderingEngine.getViewport(
this.viewportId
)
console.log(index, 'setFullScreen')
csUtils.jumpToSlice(viewport.element, { imageIndex: index })
viewport.render()
})
@ -638,7 +638,7 @@ export default {
if (this.series && data.Id === this.series.Id && data.Description === this.series.Description && !isLocate && !data.isLocation) {
data.SliceIndex = this.series.SliceIndex
}
// console.log(data)
console.log(data.SliceIndex, 'data.SliceIndex')
const renderingEngine = getRenderingEngine(this.renderingEngineId)
const viewport = renderingEngine.getViewport(this.viewportId)
if (isLocate) return csUtils.jumpToSlice(viewport.element, { imageIndex: data.SliceIndex });
@ -676,7 +676,8 @@ export default {
}
await renderSegmentation(this.series, this.series.TaskInfo, this.viewportId, this.SegmentConfig, this.renderingEngineId, data.segment, this.actionConfiguration)
DicomEvent.$emit('SegmentationLoading', this.viewportId)
if (this.series.hasOwnProperty('curIndex')) this.setFullScreen(this.series.curIndex)
if (this.series.hasOwnProperty('curIndex')) return this.setFullScreen(this.series.curIndex)
this.setFullScreen(Math.ceil((res.volume._imageIds.length - 1) / 2) - 1)
} catch (e) {
console.log(e)
}

View File

@ -328,7 +328,6 @@ function viewBidirectional(arr, viewportId) {
let item = arr[j]
let bidirectional = annotation.state.getAllAnnotations().find(i => i.metadata.segmentationId === item.segmentationId && i.metadata.segmentIndex === item.segmentIndex && i.metadata.toolName === "SegmentBidirectional");
// item.bidirectionalView = view
console.log(bidirectional, viewportId, item.view, 'bidirectional')
if (!bidirectional) continue
let view = item.view
if (item.hasOwnProperty('bidirectionalView')) view = item.bidirectionalView
@ -337,7 +336,6 @@ function viewBidirectional(arr, viewportId) {
resetViewport(viewportId)
}
function resetViewport(viewportId) {
console.log('resetViewport')
let renderingEngine = getRenderingEngine(renderingEngineId)
const viewport = renderingEngine.getViewport(viewportId)
viewport.render()
@ -399,8 +397,9 @@ async function renderSegmentation(series, visitInfo, viewportId, SegmentConfig,
an = annotation.state.getAllAnnotations().find(i => i.metadata.segmentationId === s.SegmentationId && i.metadata.segmentIndex === SegmentJson.bidirectional.segmentIndex && i.metadata.toolName === "SegmentBidirectional");
if (an) {
annotation.locking.setAnnotationLocked(an.annotationUID, true)
annotation.visibility.setAnnotationVisibility(an.annotationUID, item.bidirectionalView)
annotation.visibility.setAnnotationVisibility(an.annotationUID, true)
}
console.log(an, 'an')
}
})