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-if="series" class="right-bottom-text">
|
||||||
<div v-show="imageInfo.location">Location: {{
|
<div v-show="imageInfo.location">Location: {{
|
||||||
`${Number(imageInfo.location).toFixed(digitPlaces)} mm`
|
`${Number(imageInfo.location).toFixed(digitPlaces)} mm`
|
||||||
}}</div>
|
}}</div>
|
||||||
<div v-show="imageInfo.sliceThickness">Slice Thickness: {{
|
<div v-show="imageInfo.sliceThickness">Slice Thickness: {{
|
||||||
`${Number(imageInfo.sliceThickness).toFixed(digitPlaces)} mm`
|
`${Number(imageInfo.sliceThickness).toFixed(digitPlaces)} mm`
|
||||||
}}</div>
|
}}</div>
|
||||||
<div v-show="imageInfo.wwwc">WW/WL: {{ imageInfo.wwwc }}</div>
|
<div v-show="imageInfo.wwwc">WW/WL: {{ imageInfo.wwwc }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="orientation-top">
|
<div class="orientation-top">
|
||||||
|
|
@ -276,6 +276,7 @@ export default {
|
||||||
let imageIds = viewport.getImageIds(this.volumeId)
|
let imageIds = viewport.getImageIds(this.volumeId)
|
||||||
let imageId = imageIds[0]
|
let imageId = imageIds[0]
|
||||||
let volume = cache.getVolume(this.volumeId)
|
let volume = cache.getVolume(this.volumeId)
|
||||||
|
console.log(volume, 'volume')
|
||||||
let spacing = volume ? volume.spacing : []
|
let spacing = volume ? volume.spacing : []
|
||||||
// if (this.series.orientation === 'AXIAL') imageId = viewport.getCurrentImageId()
|
// if (this.series.orientation === 'AXIAL') imageId = viewport.getCurrentImageId()
|
||||||
if (imageId && volume) {
|
if (imageId && volume) {
|
||||||
|
|
@ -467,13 +468,13 @@ export default {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
try {
|
try {
|
||||||
return await createImageIdsAndCacheMetaData({
|
return await createImageIdsAndCacheMetaData({
|
||||||
modality: obj.Modality,
|
modality: obj.Modality,
|
||||||
imageIds: obj.ImageIds
|
imageIds: obj.ImageIds
|
||||||
})
|
})
|
||||||
} finally {
|
} finally {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async setSeriesInfo(obj, isLocate = false) {
|
async setSeriesInfo(obj, isLocate = false) {
|
||||||
try {
|
try {
|
||||||
let data = obj
|
let data = obj
|
||||||
|
|
@ -501,7 +502,8 @@ export default {
|
||||||
DicomEvent.$emit("isloaded", {})
|
DicomEvent.$emit("isloaded", {})
|
||||||
}
|
}
|
||||||
}]).then(r => {
|
}]).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 }); })
|
setTimeout(() => { csUtils.jumpToSlice(viewport.element, { imageIndex: data.SliceIndex }); })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -1401,7 +1401,9 @@ export default {
|
||||||
toolGroup.addTool(WindowLevelTool.toolName, {
|
toolGroup.addTool(WindowLevelTool.toolName, {
|
||||||
targetViewportIds: volumeViewportIds
|
targetViewportIds: volumeViewportIds
|
||||||
})
|
})
|
||||||
toolGroup.addTool(CrosshairsTool.toolName);
|
toolGroup.addTool(CrosshairsTool.toolName, {
|
||||||
|
getReferenceLineColor: this.setCrosshairsToolLineColor
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
toolGroup.addTool(WindowLevelTool.toolName)
|
toolGroup.addTool(WindowLevelTool.toolName)
|
||||||
}
|
}
|
||||||
|
|
@ -2037,6 +2039,21 @@ export default {
|
||||||
const viewport = renderingEngine.getViewport(viewportId)
|
const viewport = renderingEngine.getViewport(viewportId)
|
||||||
viewport.render()
|
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) {
|
getLengthToolTextLines(data, targetId) {
|
||||||
const cachedVolumeStats = data.cachedStats[targetId]
|
const cachedVolumeStats = data.cachedStats[targetId]
|
||||||
const { length, unit } = cachedVolumeStats
|
const { length, unit } = cachedVolumeStats
|
||||||
|
|
@ -2519,6 +2536,9 @@ export default {
|
||||||
viewport.resetProperties()
|
viewport.resetProperties()
|
||||||
viewport.render()
|
viewport.render()
|
||||||
renderingEngine.render()
|
renderingEngine.render()
|
||||||
|
if (this.readingTool === 3) {
|
||||||
|
DicomEvent.$emit('isloaded', {})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 更改视图布局
|
// 更改视图布局
|
||||||
async changeLayout(v) {
|
async changeLayout(v) {
|
||||||
|
|
@ -2797,6 +2817,18 @@ export default {
|
||||||
toggleFullScreen(e, index) {
|
toggleFullScreen(e, index) {
|
||||||
this.fullScreenIndex = this.fullScreenIndex === index ? null : index
|
this.fullScreenIndex = this.fullScreenIndex === index ? null : index
|
||||||
this.activeViewportIndex = 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) {
|
if (this.isFusion) {
|
||||||
const viewportIds = [`${this.viewportKey}-0`, `${this.viewportKey}-1`, `${this.viewportKey}-2`]
|
const viewportIds = [`${this.viewportKey}-0`, `${this.viewportKey}-1`, `${this.viewportKey}-2`]
|
||||||
viewportIds.forEach(id => {
|
viewportIds.forEach(id => {
|
||||||
|
|
@ -2899,7 +2931,16 @@ export default {
|
||||||
this.activeViewportIndex = 0
|
this.activeViewportIndex = 0
|
||||||
this.fullScreenIndex = null
|
this.fullScreenIndex = null
|
||||||
this.isMPR = false
|
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) {
|
if (!obj.IsDicom) {
|
||||||
return this.previewNoneDicoms(obj)
|
return this.previewNoneDicoms(obj)
|
||||||
|
|
@ -3523,9 +3564,9 @@ export default {
|
||||||
syncColormap: false
|
syncColormap: false
|
||||||
})
|
})
|
||||||
let viewportIds = [
|
let viewportIds = [
|
||||||
`viewport-volume-0`,
|
`viewport-MPR-0`,
|
||||||
`viewport-volume-1`,
|
`viewport-MPR-1`,
|
||||||
`viewport-volume-2`
|
`viewport-MPR-2`
|
||||||
]
|
]
|
||||||
viewportIds.forEach((viewportId) => {
|
viewportIds.forEach((viewportId) => {
|
||||||
MPRVoiSynchronizer.add({
|
MPRVoiSynchronizer.add({
|
||||||
|
|
|
||||||
|
|
@ -40,10 +40,10 @@
|
||||||
<div v-if="series" class="right-bottom-text">
|
<div v-if="series" class="right-bottom-text">
|
||||||
<div v-show="imageInfo.location">Location: {{
|
<div v-show="imageInfo.location">Location: {{
|
||||||
`${Number(imageInfo.location).toFixed(digitPlaces)} mm`
|
`${Number(imageInfo.location).toFixed(digitPlaces)} mm`
|
||||||
}}</div>
|
}}</div>
|
||||||
<div v-show="imageInfo.sliceThickness">Slice Thickness: {{
|
<div v-show="imageInfo.sliceThickness">Slice Thickness: {{
|
||||||
`${Number(imageInfo.sliceThickness).toFixed(digitPlaces)} mm`
|
`${Number(imageInfo.sliceThickness).toFixed(digitPlaces)} mm`
|
||||||
}}</div>
|
}}</div>
|
||||||
<div v-show="imageInfo.wwwc">WW/WL: {{ imageInfo.wwwc }}</div>
|
<div v-show="imageInfo.wwwc">WW/WL: {{ imageInfo.wwwc }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="orientation-top">
|
<div class="orientation-top">
|
||||||
|
|
@ -234,7 +234,7 @@ export default {
|
||||||
// 如果行向量主要在 X-Y 平面 (rowZ 很小),则为 Axial。
|
// 如果行向量主要在 X-Y 平面 (rowZ 很小),则为 Axial。
|
||||||
// 如果行向量主要在 X-Z 平面 (rowY 很小),则为 Sagittal。
|
// 如果行向量主要在 X-Z 平面 (rowY 很小),则为 Sagittal。
|
||||||
// 为了简化,我们可以直接根据视线方向(法线)来判断。
|
// 为了简化,我们可以直接根据视线方向(法线)来判断。
|
||||||
// 法线方向 = 行向量 × 列向量
|
// 法线方向 = 行向量 × 列向量
|
||||||
const [colX, colY, colZ] = imageOrientationPatient.slice(3);
|
const [colX, colY, colZ] = imageOrientationPatient.slice(3);
|
||||||
const normalX = rowY * colZ - rowZ * colY;
|
const normalX = rowY * colZ - rowZ * colY;
|
||||||
const normalY = rowZ * colX - rowX * colZ;
|
const normalY = rowZ * colX - rowX * colZ;
|
||||||
|
|
@ -488,8 +488,8 @@ export default {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
try {
|
try {
|
||||||
return await createImageIdsAndCacheMetaData({
|
return await createImageIdsAndCacheMetaData({
|
||||||
modality: obj.Modality,
|
modality: obj.Modality,
|
||||||
imageIds: obj.ImageIds
|
imageIds: obj.ImageIds
|
||||||
})
|
})
|
||||||
} finally {
|
} finally {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue