融合页面工具优化
parent
72b1a3906d
commit
1b6e53819c
|
|
@ -179,17 +179,18 @@
|
|||
<Viewport ref="CT_AXIAL" :index="1" :active-index="activeIndex"
|
||||
:is-reading-show-subject-info="isReadingShowSubjectInfo" :series-info="ctSeries"
|
||||
:rendering-engine-id="renderingEngineId" viewport-id="CT_AXIAL" :volume="ctVolume"
|
||||
:measure-datas="measureDatas" :style="1 === activeIndex ? viewportStyle : {}" />
|
||||
:measure-datas="measureDatas" :style="1 === activeIndex ? viewportStyle : {}"
|
||||
@fusionSlicePointChange="handleFusionSlicePointChange" />
|
||||
<Viewport ref="PT_AXIAL" :index="2" :active-index="activeIndex"
|
||||
:is-reading-show-subject-info="isReadingShowSubjectInfo" :series-info="petSeries"
|
||||
:rendering-engine-id="renderingEngineId" viewport-id="PT_AXIAL" :volume="ptVolume"
|
||||
:measure-datas="measureDatas" :style="2 === activeIndex ? viewportStyle : {}"
|
||||
@upperRangeChange="upperRangeChange" />
|
||||
@upperRangeChange="upperRangeChange" @fusionSlicePointChange="handleFusionSlicePointChange" />
|
||||
<Viewport ref="FUSION_AXIAL" :index="3" :active-index="activeIndex"
|
||||
:is-reading-show-subject-info="isReadingShowSubjectInfo" :series-info="petSeries" :ct-series-info="ctSeries"
|
||||
:rendering-engine-id="renderingEngineId" viewport-id="FUSION_AXIAL" :volume="ptVolume"
|
||||
:measure-datas="measureDatas" :rgb-preset-name="rgbPresetName" :style="3 === activeIndex ? viewportStyle : {}"
|
||||
@upperRangeChange="upperRangeChange" />
|
||||
@upperRangeChange="upperRangeChange" @fusionSlicePointChange="handleFusionSlicePointChange" />
|
||||
<Viewport ref="PET_MIP_CORONAL" :index="4" :active-index="activeIndex"
|
||||
:is-reading-show-subject-info="isReadingShowSubjectInfo" :series-info="petSeries"
|
||||
:rendering-engine-id="renderingEngineId" viewport-id="PET_MIP_CORONAL" :measure-datas="measureDatas"
|
||||
|
|
@ -1186,6 +1187,36 @@ export default {
|
|||
}
|
||||
return colors[viewportId] || '#0000ff'
|
||||
},
|
||||
handleFusionSlicePointChange({ viewportId, worldPoint }) {
|
||||
if (!this.isFusion) return
|
||||
if (!viewportId || !Array.isArray(worldPoint) || worldPoint.length < 3) return
|
||||
if (viewportId === viewportIds.PETMIP.CORONAL) return
|
||||
|
||||
const activeViewportId = this.activeIndex === 1
|
||||
? viewportIds.CT.AXIAL
|
||||
: this.activeIndex === 2
|
||||
? viewportIds.PT.AXIAL
|
||||
: this.activeIndex === 3
|
||||
? viewportIds.FUSION.AXIAL
|
||||
: viewportIds.PETMIP.CORONAL
|
||||
if (viewportId !== activeViewportId) return
|
||||
|
||||
const renderEngine = getRenderingEngine(renderingEngineId)
|
||||
if (!renderEngine) return
|
||||
const toolGroupCandidates = [fusionToolGroupId, mipToolGroupUID, ptToolGroupId, ctToolGroupId]
|
||||
let instance = null
|
||||
for (const toolGroupId of toolGroupCandidates) {
|
||||
const toolGroup = ToolGroupManager.getToolGroup(toolGroupId)
|
||||
instance = toolGroup.getToolInstance(FusionJumpToPointTool.toolName)
|
||||
if (instance.setPoint) break
|
||||
}
|
||||
if (!instance.setPoint) return
|
||||
|
||||
instance.setPoint(worldPoint, viewportId, renderEngine.id, {
|
||||
jumpToTargetViewports: false,
|
||||
dispatchEvent: false,
|
||||
})
|
||||
},
|
||||
dispatchFusionCenterPoint(retryCount = 0) {
|
||||
const renderEngine = getRenderingEngine(renderingEngineId)
|
||||
if (!renderEngine) return
|
||||
|
|
|
|||
|
|
@ -272,6 +272,24 @@ export default {
|
|||
this.renderColorBar(this.presetName)
|
||||
}
|
||||
}
|
||||
|
||||
if (this.index !== 4 && viewport) {
|
||||
const width = viewport.element.clientWidth
|
||||
const height = viewport.element.clientHeight
|
||||
let worldPoint = null
|
||||
if (width && height && viewport.canvasToWorld) {
|
||||
worldPoint = viewport.canvasToWorld([width / 2, height / 2])
|
||||
}
|
||||
if ((!worldPoint || worldPoint.length < 3) && viewport.getCamera) {
|
||||
worldPoint = viewport.getCamera()?.focalPoint
|
||||
}
|
||||
if (Array.isArray(worldPoint) && worldPoint.length >= 3) {
|
||||
this.$emit('fusionSlicePointChange', {
|
||||
viewportId: this.viewportId,
|
||||
worldPoint: [...worldPoint]
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
getOrientationMarker() {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
|
|
|
|||
|
|
@ -270,6 +270,24 @@ export default {
|
|||
}
|
||||
}
|
||||
|
||||
if (!this.isMip && viewport) {
|
||||
const width = this.element?.clientWidth
|
||||
const height = this.element?.clientHeight
|
||||
let worldPoint = null
|
||||
if (width && height && viewport.canvasToWorld) {
|
||||
worldPoint = viewport.canvasToWorld([width / 2, height / 2])
|
||||
}
|
||||
if ((!worldPoint || worldPoint.length < 3) && viewport.getCamera) {
|
||||
worldPoint = viewport.getCamera()?.focalPoint
|
||||
}
|
||||
if (Array.isArray(worldPoint) && worldPoint.length >= 3) {
|
||||
this.$emit('fusionSlicePointChange', {
|
||||
viewportId: this.viewportId,
|
||||
worldPoint: [...worldPoint],
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
setFullScreen(index) {
|
||||
setTimeout(() => {
|
||||
|
|
|
|||
|
|
@ -362,7 +362,7 @@
|
|||
:viewport-index="index" :active-tool="activeTool" @activeViewport="activeViewport"
|
||||
@toggleTaskByViewport="toggleTaskByViewport" @previewCD="previewCD"
|
||||
@renderAnnotations="renderAnnotations" @upperRangeChange="upperRangeChange"
|
||||
@contentMouseup="contentMouseup" />
|
||||
@contentMouseup="contentMouseup" @fusionSlicePointChange="handleFusionSlicePointChange" />
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="readingTool === 2" class="fusion-hidden-viewports">
|
||||
|
|
@ -2634,6 +2634,25 @@ export default {
|
|||
if (this.isFusion) return [this.fusionToolGroupId]
|
||||
return [`${this.viewportKey}-0`, `${this.viewportKey}-1`, `${this.viewportKey}-2`, `${this.viewportKey}-3`]
|
||||
},
|
||||
handleFusionSlicePointChange({ viewportId, worldPoint }) {
|
||||
if (!this.isFusion) return
|
||||
if (!viewportId || !Array.isArray(worldPoint) || worldPoint.length < 3) return
|
||||
|
||||
const activeFusionViewportId = `viewport-fusion-${this.activeViewportIndex}`
|
||||
if (viewportId !== activeFusionViewportId) return
|
||||
if (viewportId === 'viewport-fusion-3') return
|
||||
|
||||
const renderingEngine = getRenderingEngine(renderingEngineId)
|
||||
if (!renderingEngine) return
|
||||
const toolGroup = ToolGroupManager.getToolGroup(this.fusionToolGroupId)
|
||||
const instance = toolGroup.getToolInstance(FusionJumpToPointTool.toolName)
|
||||
if (!instance.setPoint) return
|
||||
|
||||
instance.setPoint(worldPoint, viewportId, renderingEngine.id, {
|
||||
jumpToTargetViewports: false,
|
||||
dispatchEvent: false,
|
||||
})
|
||||
},
|
||||
setFusionMipJumpEnabled(enabled) {
|
||||
if (!this.isFusion) return
|
||||
const toolGroup = ToolGroupManager.getToolGroup(this.fusionToolGroupId)
|
||||
|
|
|
|||
Loading…
Reference in New Issue