分裂主病灶状态计算逻辑优化

uat_us
caiyiling 2024-03-18 17:26:24 +08:00
parent dc6340f65c
commit af9ad72798
4 changed files with 78 additions and 69 deletions

View File

@ -516,7 +516,7 @@ export default {
loadingText: '',
initAnnotations: [],
activeCanvasWW: null,
activeCanvasWC: null,
activeCanvasWC: null
}
},

View File

@ -18,7 +18,7 @@ const {
} = cornerstoneTools
// const { getWorldWidthAndHeightFromTwoPoints } = utilities.planar
// const { roundNumber } = utilities
const { hideElementCursor,resetElementCursor } = cursors.elementCursor
const { hideElementCursor } = cursors.elementCursor
const { getAnnotations, addAnnotation } = annotation.state
const { isAnnotationVisible } = annotation.visibility
const { isAnnotationLocked } = annotation.locking
@ -84,27 +84,27 @@ class CircleROITool extends cornerstoneTools.CircleROITool {
// this._getTextLines = this.getTextLines
}
addNewAnnotation = (evt) => {
const eventDetail = evt.detail;
const { currentPoints, element } = eventDetail;
const worldPos = currentPoints.world;
const eventDetail = evt.detail
const { currentPoints, element } = eventDetail
const worldPos = currentPoints.world
// const canvasPos = currentPoints.canvas;
const enabledElement = getEnabledElement(element);
const { viewport, renderingEngine } = enabledElement;
const enabledElement = getEnabledElement(element)
const { viewport, renderingEngine } = enabledElement
this.isDrawing = true;
this.isDrawing = true
const camera = viewport.getCamera();
const { viewPlaneNormal, viewUp } = camera;
const camera = viewport.getCamera()
const { viewPlaneNormal, viewUp } = camera
const referencedImageId = this.getReferencedImageId(
viewport,
worldPos,
viewPlaneNormal,
viewUp
);
)
const FrameOfReferenceUID = viewport.getFrameOfReferenceUID();
const FrameOfReferenceUID = viewport.getFrameOfReferenceUID()
const annotation = {
highlighted: true,
@ -114,7 +114,7 @@ class CircleROITool extends cornerstoneTools.CircleROITool {
viewPlaneNormal: [...viewPlaneNormal],
viewUp: [...viewUp],
FrameOfReferenceUID,
referencedImageId,
referencedImageId
},
data: {
label: '',
@ -126,37 +126,37 @@ class CircleROITool extends cornerstoneTools.CircleROITool {
topLeft: [0, 0, 0],
topRight: [0, 0, 0],
bottomLeft: [0, 0, 0],
bottomRight: [0, 0, 0],
},
bottomRight: [0, 0, 0]
}
},
points: [[...worldPos], [...worldPos]],
activeHandleIndex: 1,
activeHandleIndex: 1
},
cachedStats: {},
},
};
addAnnotation(annotation, element);
cachedStats: {}
}
}
addAnnotation(annotation, element)
const viewportIdsToRender = getViewportIdsWithToolToRender(
element,
this.getToolName()
);
)
this.editData = {
annotation,
viewportIdsToRender,
newAnnotation: true,
hasMoved: false,
};
this._activateDraw(element);
hasMoved: false
}
this._activateDraw(element)
hideElementCursor(element);
hideElementCursor(element)
evt.preventDefault();
evt.preventDefault()
triggerAnnotationRenderForViewportIds(renderingEngine, viewportIdsToRender);
triggerAnnotationRenderForViewportIds(renderingEngine, viewportIdsToRender)
return annotation;
return annotation
};
renderAnnotation = (enabledElement, svgDrawingHelper) => {
let renderStatus = false
@ -249,7 +249,6 @@ class CircleROITool extends cornerstoneTools.CircleROITool {
modalityUnitOptions
)
} else if (annotation.invalidated) {
this._throttledCalculateCachedStats(
annotation,
viewport,

View File

@ -450,13 +450,15 @@ export default {
const lesionState = !isNaN(parseInt(this.getQuestionVal(7))) ? parseInt(this.getQuestionVal(7)) : ''
this.$emit('resetQuestions', { isLymphLesion, lesionPart, lesionOrgan, lesionShort, lesionState, saveTypeEnum: this.questionForm.saveTypeEnum, lesionLength, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: this.questionForm })
}
if (this.lesionType === 0 && params && params.splitLesionTargetPPD) {
if (this.lesionType === 0 && params) {
// ppd
var ppd = this.getQuestionVal(12)
ppd = isNaN(parseFloat(ppd)) ? 0 : parseFloat(ppd)
this.splitLesionTargetPDD = ppd + params.splitLesionTargetPPD
this.splitLesionTargetLDi = params.splitLesionTargetLDi
this.splitLesionTargetSDi = params.splitLesionTargetSDi
}
//
@ -464,9 +466,6 @@ export default {
state = isNaN(parseInt(state)) ? 0 : parseInt(state)
var ldi = this.getQuestionVal(0)//
ldi = isNaN(parseFloat(ldi)) ? 0 : ldi
if (this.lesionType === 0 && params && params.splitLesionTargetLDi) {
this.splitLesionTargetLDi = ldi + params.splitLesionTargetLDi
}
var pddIncrease = this.getQuestionVal(17) // PPD
pddIncrease = isNaN(parseFloat(pddIncrease)) ? 0 : parseFloat(pddIncrease)
var ldiIncrease = this.getQuestionVal(18)// PPDLDi
@ -490,10 +489,17 @@ export default {
var minPPD = this.getQuestionVal(13)
minPPD = parseFloat(minPPD)
pddIncrease = ((((this.splitLesionTargetPDD - minPPD) / minPPD)) * 100).toFixed(this.digitPlaces)
ldi = this.splitLesionTargetLDi + ldi
var minLDi = this.getQuestionVal(15)
ldiIncrease = ldi - minLDi
var sdi = this.getQuestionVal(1)//
sdi = isNaN(parseFloat(sdi)) ? 0 : sdi
sdi = this.splitLesionTargetSDi + sdi
var minSDi = this.getQuestionVal(16)
sdiIncrease = sdi - minSDi
}
if (this.splitLesionTargetPDD) {
ldi = this.splitLesionTargetLDi
}
// if(this.)
/**
* 15mm<当前靶病灶LDi20mm
* 相比最低点PPD增加百分比 50
@ -983,6 +989,10 @@ export default {
var pddIncreaseNum = null
if (this.splitLesionTargetPDD) {
pddIncreaseNum = ((((this.splitLesionTargetPDD - minPPD) / minPPD)) * 100).toFixed(this.digitPlaces)
ldi = this.splitLesionTargetLDi + ldi
ldiIncrease = ldi - minLDi
sdi = this.splitLesionTargetSDi + sdi
sdiIncrease = sdi - minSDi
} else {
pddIncreaseNum = ((((ppd - minPPD) / minPPD)) * 100).toFixed(this.digitPlaces)
}