MPR视图的:十字线和窗宽窗位
continuous-integration/drone/push Build is passing Details

uat_us
wangxiaoshuang 2026-03-30 16:10:56 +08:00
parent c63811d55c
commit bc2d5463ff
3 changed files with 59 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">
@ -276,6 +276,7 @@ export default {
let imageIds = viewport.getImageIds(this.volumeId)
let imageId = imageIds[0]
let volume = cache.getVolume(this.volumeId)
console.log(volume, 'volume')
let spacing = volume ? volume.spacing : []
// if (this.series.orientation === 'AXIAL') imageId = viewport.getCurrentImageId()
if (imageId && volume) {
@ -467,8 +468,8 @@ export default {
this.loading = true
try {
return await createImageIdsAndCacheMetaData({
modality: obj.Modality,
imageIds: obj.ImageIds
modality: obj.Modality,
imageIds: obj.ImageIds
})
} finally {
this.loading = false
@ -501,7 +502,8 @@ export default {
DicomEvent.$emit("isloaded", {})
}
}]).then(r => {
if (data.isLocation) {
console.log(this.imageInfo.zoom, 'this.imageInfo.zoom')
if (data.isLocation || !this.imageInfo.zoom) {
setTimeout(() => { csUtils.jumpToSlice(viewport.element, { imageIndex: data.SliceIndex }); })
}
})

View File

@ -1401,7 +1401,9 @@ export default {
toolGroup.addTool(WindowLevelTool.toolName, {
targetViewportIds: volumeViewportIds
})
toolGroup.addTool(CrosshairsTool.toolName);
toolGroup.addTool(CrosshairsTool.toolName, {
getReferenceLineColor: this.setCrosshairsToolLineColor
});
} else {
toolGroup.addTool(WindowLevelTool.toolName)
}
@ -2037,6 +2039,21 @@ export default {
const viewport = renderingEngine.getViewport(viewportId)
viewport.render()
},
setCrosshairsToolLineColor(viewportId) {
let colors = [
'#0ca8df',
'#ffd10a',
'#b6d634',
'#3fbe95',
'#785db0',
'#5070dd',
'#505372',
'#ff994d',
'#fb628b',
]
let index = viewportId.split("-").pop()
return colors[colors.length - 1 - Number(index)] || colors[0]
},
getLengthToolTextLines(data, targetId) {
const cachedVolumeStats = data.cachedStats[targetId]
const { length, unit } = cachedVolumeStats
@ -2519,6 +2536,9 @@ export default {
viewport.resetProperties()
viewport.render()
renderingEngine.render()
if (this.readingTool === 3) {
DicomEvent.$emit('isloaded', {})
}
},
//
async changeLayout(v) {
@ -2797,6 +2817,18 @@ export default {
toggleFullScreen(e, index) {
this.fullScreenIndex = this.fullScreenIndex === index ? null : index
this.activeViewportIndex = index
if (this.readingTool === 3 || this.isMPR) {
// this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].setSeriesInfo(this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].series)
this.$nextTick(() => {
const renderingEngine = getRenderingEngine(renderingEngineId)
renderingEngine.resize(true, false)
renderingEngine.render()
if (this.readingTool === 3) {
DicomEvent.$emit('isloaded', {})
}
})
}
if (this.isFusion) {
const viewportIds = [`${this.viewportKey}-0`, `${this.viewportKey}-1`, `${this.viewportKey}-2`]
viewportIds.forEach(id => {
@ -2899,7 +2931,16 @@ export default {
this.activeViewportIndex = 0
this.fullScreenIndex = null
this.isMPR = false
return this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].setSeriesInfo(obj)
this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].setSeriesInfo(obj)
return this.$nextTick(() => {
const renderingEngine = getRenderingEngine(renderingEngineId)
renderingEngine.resize(true, false)
renderingEngine.render()
if (this.readingTool === 3) {
DicomEvent.$emit('isloaded', {})
}
})
}
if (!obj.IsDicom) {
return this.previewNoneDicoms(obj)
@ -3523,9 +3564,9 @@ export default {
syncColormap: false
})
let viewportIds = [
`viewport-volume-0`,
`viewport-volume-1`,
`viewport-volume-2`
`viewport-MPR-0`,
`viewport-MPR-1`,
`viewport-MPR-2`
]
viewportIds.forEach((viewportId) => {
MPRVoiSynchronizer.add({

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">
@ -234,7 +234,7 @@ export default {
// X-Y (rowZ ) Axial
// X-Z (rowY ) Sagittal
// 线线
// 线 = ×
// 线 = ×
const [colX, colY, colZ] = imageOrientationPatient.slice(3);
const normalX = rowY * colZ - rowZ * colY;
const normalY = rowZ * colX - rowX * colZ;
@ -488,8 +488,8 @@ export default {
this.loading = true
try {
return await createImageIdsAndCacheMetaData({
modality: obj.Modality,
imageIds: obj.ImageIds
modality: obj.Modality,
imageIds: obj.ImageIds
})
} finally {
this.loading = false