分割部分问题修复
continuous-integration/drone/push Build is passing Details

uat_us
wangxiaoshuang 2026-04-14 18:01:21 +08:00
parent 47d7fb00e2
commit eac6b25b9e
5 changed files with 38 additions and 22 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">
@ -613,6 +613,7 @@ export default {
}, 100)
}
await renderSegmentation(this.series, this.series.TaskInfo, this.viewportId, this.SegmentConfig, this.segmentationId, this.segmentIndex, this.renderingEngineId, null, this.actionConfiguration)
DicomEvent.$emit('loading', this.viewportId)
} catch (e) {
console.log(e)
}

View File

@ -2032,6 +2032,11 @@ export default {
}
const i = this.tools.findIndex(i => i.toolName === annotation.metadata.toolName)
if (i === -1) {
if (annotation.metadata.toolName === SegmentBidirectionalTool.toolName) {
this.setToolsPassive()
const errorMsg = { message: 'SegmentBidirectionalTool Not remove' }
throw errorMsg
}
//
return
}
@ -2700,6 +2705,8 @@ export default {
const viewportId = `${this.viewportKey}-${this.activeViewportIndex}`
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) {
@ -2718,6 +2725,9 @@ export default {
if (this.readingTool === 3) {
DicomEvent.$emit('isloaded', { isChange: false, viewportId })
}
if (this.readingTool === 3 || this.isMPR) {
this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].setFullScreen(index)
}
},
//
async changeLayout(v) {

View File

@ -408,14 +408,10 @@ export default {
DicomEvent.$on('isloaded', (data) => {
let { segment, isChange = true, viewportId, series } = data
DicomEvent.$emit('renderSegmentation', viewportId)
// if (!series.TaskInfo || series.TaskInfo.VisitTaskId !== this.visitInfo.VisitTaskId) return false
// if (this.isloaded) return false
// this.isloaded = true
// this.series = series
// this.viewportIds = []
// this.viewportIds.push(viewportId)
// // this.delAllSegment(isChange)
// this.readingSegmentToViewport(segment)
})
DicomEvent.$on('loading', (viewportId) => {
if (viewportId !== `${this.viewportKey}-${this.activeViewportIndex}`) return false
this.loading = false
})
const digitPlaces = Number(localStorage.getItem('digitPlaces'))
this.digitPlaces = digitPlaces === -1 ? this.digitPlaces : digitPlaces
@ -1422,6 +1418,8 @@ export default {
}/${this.series.Id}/${segmentGroup.name}.dcm`
const result = await this.OSSclient.put(path, blob)
segmentGroup.segUrl = this.$getObjectName(result.url)
} else {
segmentGroup.segUrl = null
}
this.addOrUpdateSegmentation({ name: segmentGroup.name, id: segmentGroup.segmentationId, url: segmentGroup.segUrl })
@ -1582,7 +1580,7 @@ export default {
}
this.loading = true;
let res = await getSegmentationList(data);
this.loading = false;
// this.loading = false;
if (res.IsSuccess) {
this.segmentList = []
this.segmentationId = null;
@ -1659,10 +1657,11 @@ export default {
// }
// }
this.isloaded = false
// this.loading = true
// this.readingSegmentByConfig()
}
} catch (err) {
this.loading = false
// this.loading = false
console.log(err)
}
},
@ -1711,14 +1710,14 @@ export default {
PageSize: 9999,
PageIndex: 1,
}
this.loading = true;
// this.loading = true;
let res = await getSegmentList(data)
this.loading = false;
// this.loading = false;
if (res.IsSuccess) {
return res.Result.CurrentPageData
}
} catch (err) {
this.loading = false
// this.loading = false
console.log(err)
}
},

View File

@ -436,6 +436,7 @@ export default {
const viewport = renderingEngine.getViewport(
this.viewportId
)
console.log(index, 'setFullScreen')
csUtils.jumpToSlice(viewport.element, { imageIndex: index })
viewport.render()
})
@ -674,6 +675,7 @@ export default {
}, 100)
}
await renderSegmentation(this.series, this.series.TaskInfo, this.viewportId, this.SegmentConfig, this.segmentationId, this.segmentIndex, this.renderingEngineId, data.segment, this.actionConfiguration)
DicomEvent.$emit('loading', this.viewportId)
} catch (e) {
console.log(e)
}

View File

@ -155,11 +155,12 @@ function removeSegmentFromViewport(viewportId) {
viewportInfo[viewportId].forEach(async segmentationId => {
segmentation.removeSegmentation(segmentationId)
segmentation.state.removeSegmentation(segmentationId)
let annotations = annotation.state.getAllAnnotations().filter(item => item.metadata.segmentationId && segmentationId === item.metadata.segmentationId && item.metadata.segmentIndex && item.metadata.toolName === "SegmentBidirectional");
let annotations = annotation.state.getAllAnnotations().filter(item => item.metadata.segmentationId && segmentationId === item.metadata.segmentationId && item.metadata.toolName === "SegmentBidirectional");
annotations.forEach(item => {
annotation.state.removeAnnotation(item.annotationUID)
})
})
resetViewport(viewportId)
}
viewportInfo[viewportId] = []
resolve(true)
@ -378,13 +379,16 @@ async function renderSegmentation(series, visitInfo, viewportId, SegmentConfig,
segmentation.config.color.setSegmentIndexColor(viewportId, s.SegmentationId, s.SegmentNumber, hex2Rgb(s.ColorRgb))
segmentation.segmentLocking.setSegmentIndexLocked(s.SegmentationId, s.SegmentNumber, true)
if (SegmentJson.bidirectional) {
let { majorAxis, minorAxis } = SegmentJson.bidirectional
// createSegmentConfiguration(s.SegmentNumber, s.SegmentationId, viewportId, actionConfiguration)
SegmentBidirectionalTool.hydrate(viewportId, [majorAxis, minorAxis], {
segmentIndex: s.SegmentNumber,
segmentationId: s.SegmentationId,
})
let an = annotation.state.getAllAnnotations().find(i => i.metadata.segmentationId === s.SegmentationId && i.metadata.segmentIndex === SegmentJson.bidirectional.segmentIndex && i.metadata.toolName === "SegmentBidirectional");
if (!an) {
let { majorAxis, minorAxis } = SegmentJson.bidirectional
// createSegmentConfiguration(s.SegmentNumber, s.SegmentationId, viewportId, actionConfiguration)
SegmentBidirectionalTool.hydrate(viewportId, [majorAxis, minorAxis], {
segmentIndex: s.SegmentNumber,
segmentationId: s.SegmentationId,
})
}
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)