MPR视图的:十字线和窗宽窗位
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
c63811d55c
commit
bc2d5463ff
|
|
@ -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 }); })
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -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({
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue