Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web
continuous-integration/drone/push Build is running Details

uat_us
wangxiaoshuang 2026-04-28 14:07:09 +08:00
commit 48b154bf87
3 changed files with 49 additions and 13 deletions

View File

@ -1926,6 +1926,7 @@ export default {
console.log('Completed') console.log('Completed')
const { annotation } = e.detail const { annotation } = e.detail
if (!annotation) return if (!annotation) return
if (annotation.metadata.toolName === FusionJumpToPointTool.toolName) return
if (annotation.metadata.toolName.includes('histogram_')) return this.$refs.histogram.initToolValue(annotation) if (annotation.metadata.toolName.includes('histogram_')) return this.$refs.histogram.initToolValue(annotation)
if (this.readingTaskState === 2) return if (this.readingTaskState === 2) return
if (annotation.metadata.toolName === 'PlanarFreehandROI' && !annotation.data.contour.closed) return if (annotation.metadata.toolName === 'PlanarFreehandROI' && !annotation.data.contour.closed) return
@ -1952,6 +1953,7 @@ export default {
console.log('Modified') console.log('Modified')
const { annotation } = e.detail const { annotation } = e.detail
if (!annotation) return if (!annotation) return
if (annotation.metadata.toolName === FusionJumpToPointTool.toolName) return
if (annotation.metadata.toolName.includes('histogram_')) return this.$refs.histogram.initToolValue(annotation) if (annotation.metadata.toolName.includes('histogram_')) return this.$refs.histogram.initToolValue(annotation)
if (this.readingTaskState === 2) return if (this.readingTaskState === 2) return
if (!annotation.highlighted) return if (!annotation.highlighted) return
@ -1968,6 +1970,7 @@ export default {
const { annotation } = e.detail const { annotation } = e.detail
try { try {
if (!annotation) return if (!annotation) return
if (annotation.metadata.toolName === FusionJumpToPointTool.toolName) return
if (annotation.metadata.toolName === CrosshairsTool.toolName) return if (annotation.metadata.toolName === CrosshairsTool.toolName) return
if (this.readingTaskState === 2 && !annotation.data.label) return false if (this.readingTaskState === 2 && !annotation.data.label) return false
if (this.readingTaskState === 2) { if (this.readingTaskState === 2) {
@ -1997,6 +2000,7 @@ export default {
async customAnnotationCompletedListener(e) { async customAnnotationCompletedListener(e) {
const { annotation } = e.detail const { annotation } = e.detail
if (!annotation) return if (!annotation) return
if (annotation.metadata.toolName === FusionJumpToPointTool.toolName) return
if (annotation.metadata.toolName.includes('histogram_')) return this.$refs.histogram.initToolValue(annotation) if (annotation.metadata.toolName.includes('histogram_')) return this.$refs.histogram.initToolValue(annotation)
if (this.readingTaskState === 2) return if (this.readingTaskState === 2) return
const i = this.tools.findIndex(i => i.toolName === annotation.metadata.toolName) const i = this.tools.findIndex(i => i.toolName === annotation.metadata.toolName)
@ -2085,6 +2089,7 @@ export default {
customAnnotationModifiedListener(e) { customAnnotationModifiedListener(e) {
const { annotation } = e.detail const { annotation } = e.detail
if (!annotation) return if (!annotation) return
if (annotation.metadata.toolName === FusionJumpToPointTool.toolName) return
if (annotation.metadata.toolName.includes('histogram_')) return this.$refs.histogram.initToolValue(annotation) if (annotation.metadata.toolName.includes('histogram_')) return this.$refs.histogram.initToolValue(annotation)
if (this.readingTaskState === 2) return if (this.readingTaskState === 2) return
if (!annotation.highlighted) return if (!annotation.highlighted) return
@ -2114,6 +2119,7 @@ export default {
try { try {
// if ( this.resetAnnotation && this.isFusion ) return false // if ( this.resetAnnotation && this.isFusion ) return false
if (!annotation) return false if (!annotation) return false
if (annotation.metadata.toolName === FusionJumpToPointTool.toolName) return false
if (annotation.metadata.toolName === CrosshairsTool.toolName) return false if (annotation.metadata.toolName === CrosshairsTool.toolName) return false
if (this.readingTaskState === 2 && !annotation.data.label) return false if (this.readingTaskState === 2 && !annotation.data.label) return false
if (this.readingTaskState === 2) { if (this.readingTaskState === 2) {
@ -2218,7 +2224,11 @@ export default {
} }
} }
}, },
annotationSelectionChangeListener(e) { }, annotationSelectionChangeListener(e) {
const { annotation } = e.detail || {}
if (!annotation) return
if (annotation.metadata.toolName === FusionJumpToPointTool.toolName) return
},
async getAnnotations(visitTaskId) { async getAnnotations(visitTaskId) {
if (this.readingTaskState === 2) return if (this.readingTaskState === 2) return
const taskIdx = this.visitTaskList.findIndex(i => i.VisitTaskId === visitTaskId) const taskIdx = this.visitTaskList.findIndex(i => i.VisitTaskId === visitTaskId)

View File

@ -40,17 +40,23 @@ class FusionJumpToPointTool extends AnnotationDisplayTool {
return return
} }
const { element, currentPoints } = evt.detail || {} const { element, currentPoints } = evt.detail || {}
const worldPoint = currentPoints?.world if (!element || !currentPoints) return
if (!element || !worldPoint || worldPoint.length < 3) return
const enabledElement = getEnabledElement(element) const enabledElement = getEnabledElement(element)
const { viewport, renderingEngine } = enabledElement || {} const { viewport, renderingEngine } = enabledElement || {}
if (!viewport || !renderingEngine) return if (!viewport || !renderingEngine) return
const selectedPoint = this._resolveSelectedPoint(viewport, worldPoint) const sourceIsMip = this._isMipViewportId(viewport.id)
const interactionWorldPoint = this._getInteractionWorldPoint(viewport, currentPoints, !sourceIsMip)
if (!interactionWorldPoint || interactionWorldPoint.length < 3) return
const selectedPoint = sourceIsMip
? this._resolveSelectedPoint(viewport, interactionWorldPoint)
: interactionWorldPoint
if (!selectedPoint || selectedPoint.length < 3) return if (!selectedPoint || selectedPoint.length < 3) return
this.setPoint(selectedPoint, viewport.id, renderingEngine.id) this.setPoint(selectedPoint, viewport.id, renderingEngine.id, {
jumpToTargetViewports: sourceIsMip,
})
} }
mouseDownCallback(evt) { mouseDownCallback(evt) {
@ -70,15 +76,14 @@ class FusionJumpToPointTool extends AnnotationDisplayTool {
const { viewport, renderingEngine } = enabledElement || {} const { viewport, renderingEngine } = enabledElement || {}
if (!viewport || !renderingEngine) return if (!viewport || !renderingEngine) return
let worldPoint = currentPoints?.world const sourceIsMip = this._isMipViewportId(viewport.id)
if ((!worldPoint || worldPoint.length < 3) && currentPoints?.canvas && viewport.canvasToWorld) { const worldPoint = this._getInteractionWorldPoint(viewport, currentPoints, !sourceIsMip)
worldPoint = viewport.canvasToWorld(currentPoints.canvas)
}
if (!worldPoint || worldPoint.length < 3) return if (!worldPoint || worldPoint.length < 3) return
const annotation = this._getViewportCrosshairAnnotation(viewport) const annotation = this._getViewportCrosshairAnnotation(viewport)
const sourceViewportId = this.dragSourceViewportId || annotation?.data?.sourceViewportId || viewport.id const sourceViewportId = sourceIsMip
const sourceIsMip = this._isMipViewportId(viewport.id) ? (this.dragSourceViewportId || annotation?.data?.sourceViewportId || viewport.id)
: viewport.id
this.setPoint(worldPoint, sourceViewportId, renderingEngine.id, { this.setPoint(worldPoint, sourceViewportId, renderingEngine.id, {
jumpToTargetViewports: sourceIsMip, jumpToTargetViewports: sourceIsMip,
}) })
@ -345,6 +350,27 @@ class FusionJumpToPointTool extends AnnotationDisplayTool {
return true return true
} }
_getInteractionWorldPoint(viewport, currentPoints, preferCanvasToWorld = false) {
const worldPoint = currentPoints?.world
const canvasPoint = currentPoints?.canvas
if (preferCanvasToWorld && canvasPoint && viewport?.canvasToWorld) {
const worldFromCanvas = viewport.canvasToWorld(canvasPoint)
if (worldFromCanvas && worldFromCanvas.length >= 3) {
return worldFromCanvas
}
}
if (worldPoint && worldPoint.length >= 3) {
return worldPoint
}
if (canvasPoint && viewport?.canvasToWorld) {
const worldFromCanvas = viewport.canvasToWorld(canvasPoint)
if (worldFromCanvas && worldFromCanvas.length >= 3) {
return worldFromCanvas
}
}
return null
}
_dispatchPointEvent(worldPoint, sourceViewportId, crosshairAppearance) { _dispatchPointEvent(worldPoint, sourceViewportId, crosshairAppearance) {
const { dispatchEventName } = this.configuration const { dispatchEventName } = this.configuration
if (!dispatchEventName || typeof window === 'undefined') return if (!dispatchEventName || typeof window === 'undefined') return

View File

@ -521,7 +521,7 @@ export default {
IsImageFilter: false, IsImageFilter: false,
KeyFileListStr: '', KeyFileListStr: '',
KeyFileList: [], KeyFileList: [],
CircleRadius: null CircleRadius: 10
}, },
rules: { rules: {
IsAutoCreate: [ IsAutoCreate: [
@ -1063,7 +1063,7 @@ export default {
}, },
handleReadingToolListChange(v) { handleReadingToolListChange(v) {
if (!v.includes('FixedRadiusCircleROI')) { if (!v.includes('FixedRadiusCircleROI')) {
this.form.CircleRadius = null this.form.CircleRadius = 10
} }
}, },
handleNumberInput(value, field) { handleNumberInput(value, field) {