分裂主病灶状态计算逻辑优化
parent
dc6340f65c
commit
af9ad72798
|
@ -516,7 +516,7 @@ export default {
|
||||||
loadingText: '',
|
loadingText: '',
|
||||||
initAnnotations: [],
|
initAnnotations: [],
|
||||||
activeCanvasWW: null,
|
activeCanvasWW: null,
|
||||||
activeCanvasWC: null,
|
activeCanvasWC: null
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -18,7 +18,7 @@ const {
|
||||||
} = cornerstoneTools
|
} = cornerstoneTools
|
||||||
// const { getWorldWidthAndHeightFromTwoPoints } = utilities.planar
|
// const { getWorldWidthAndHeightFromTwoPoints } = utilities.planar
|
||||||
// const { roundNumber } = utilities
|
// const { roundNumber } = utilities
|
||||||
const { hideElementCursor,resetElementCursor } = cursors.elementCursor
|
const { hideElementCursor } = cursors.elementCursor
|
||||||
const { getAnnotations, addAnnotation } = annotation.state
|
const { getAnnotations, addAnnotation } = annotation.state
|
||||||
const { isAnnotationVisible } = annotation.visibility
|
const { isAnnotationVisible } = annotation.visibility
|
||||||
const { isAnnotationLocked } = annotation.locking
|
const { isAnnotationLocked } = annotation.locking
|
||||||
|
@ -84,27 +84,27 @@ class CircleROITool extends cornerstoneTools.CircleROITool {
|
||||||
// this._getTextLines = this.getTextLines
|
// this._getTextLines = this.getTextLines
|
||||||
}
|
}
|
||||||
addNewAnnotation = (evt) => {
|
addNewAnnotation = (evt) => {
|
||||||
const eventDetail = evt.detail;
|
const eventDetail = evt.detail
|
||||||
const { currentPoints, element } = eventDetail;
|
const { currentPoints, element } = eventDetail
|
||||||
const worldPos = currentPoints.world;
|
const worldPos = currentPoints.world
|
||||||
// const canvasPos = currentPoints.canvas;
|
// const canvasPos = currentPoints.canvas;
|
||||||
|
|
||||||
const enabledElement = getEnabledElement(element);
|
const enabledElement = getEnabledElement(element)
|
||||||
const { viewport, renderingEngine } = enabledElement;
|
const { viewport, renderingEngine } = enabledElement
|
||||||
|
|
||||||
this.isDrawing = true;
|
this.isDrawing = true
|
||||||
|
|
||||||
const camera = viewport.getCamera();
|
const camera = viewport.getCamera()
|
||||||
const { viewPlaneNormal, viewUp } = camera;
|
const { viewPlaneNormal, viewUp } = camera
|
||||||
|
|
||||||
const referencedImageId = this.getReferencedImageId(
|
const referencedImageId = this.getReferencedImageId(
|
||||||
viewport,
|
viewport,
|
||||||
worldPos,
|
worldPos,
|
||||||
viewPlaneNormal,
|
viewPlaneNormal,
|
||||||
viewUp
|
viewUp
|
||||||
);
|
)
|
||||||
|
|
||||||
const FrameOfReferenceUID = viewport.getFrameOfReferenceUID();
|
const FrameOfReferenceUID = viewport.getFrameOfReferenceUID()
|
||||||
|
|
||||||
const annotation = {
|
const annotation = {
|
||||||
highlighted: true,
|
highlighted: true,
|
||||||
|
@ -114,7 +114,7 @@ class CircleROITool extends cornerstoneTools.CircleROITool {
|
||||||
viewPlaneNormal: [...viewPlaneNormal],
|
viewPlaneNormal: [...viewPlaneNormal],
|
||||||
viewUp: [...viewUp],
|
viewUp: [...viewUp],
|
||||||
FrameOfReferenceUID,
|
FrameOfReferenceUID,
|
||||||
referencedImageId,
|
referencedImageId
|
||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
label: '',
|
label: '',
|
||||||
|
@ -126,37 +126,37 @@ class CircleROITool extends cornerstoneTools.CircleROITool {
|
||||||
topLeft: [0, 0, 0],
|
topLeft: [0, 0, 0],
|
||||||
topRight: [0, 0, 0],
|
topRight: [0, 0, 0],
|
||||||
bottomLeft: [0, 0, 0],
|
bottomLeft: [0, 0, 0],
|
||||||
bottomRight: [0, 0, 0],
|
bottomRight: [0, 0, 0]
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
points: [[...worldPos], [...worldPos]],
|
points: [[...worldPos], [...worldPos]],
|
||||||
activeHandleIndex: 1,
|
activeHandleIndex: 1
|
||||||
},
|
},
|
||||||
cachedStats: {},
|
cachedStats: {}
|
||||||
},
|
}
|
||||||
};
|
}
|
||||||
addAnnotation(annotation, element);
|
addAnnotation(annotation, element)
|
||||||
|
|
||||||
const viewportIdsToRender = getViewportIdsWithToolToRender(
|
const viewportIdsToRender = getViewportIdsWithToolToRender(
|
||||||
element,
|
element,
|
||||||
this.getToolName()
|
this.getToolName()
|
||||||
);
|
)
|
||||||
|
|
||||||
this.editData = {
|
this.editData = {
|
||||||
annotation,
|
annotation,
|
||||||
viewportIdsToRender,
|
viewportIdsToRender,
|
||||||
newAnnotation: true,
|
newAnnotation: true,
|
||||||
hasMoved: false,
|
hasMoved: false
|
||||||
};
|
}
|
||||||
this._activateDraw(element);
|
this._activateDraw(element)
|
||||||
|
|
||||||
hideElementCursor(element);
|
hideElementCursor(element)
|
||||||
|
|
||||||
evt.preventDefault();
|
evt.preventDefault()
|
||||||
|
|
||||||
triggerAnnotationRenderForViewportIds(renderingEngine, viewportIdsToRender);
|
triggerAnnotationRenderForViewportIds(renderingEngine, viewportIdsToRender)
|
||||||
|
|
||||||
return annotation;
|
return annotation
|
||||||
};
|
};
|
||||||
renderAnnotation = (enabledElement, svgDrawingHelper) => {
|
renderAnnotation = (enabledElement, svgDrawingHelper) => {
|
||||||
let renderStatus = false
|
let renderStatus = false
|
||||||
|
@ -249,7 +249,6 @@ class CircleROITool extends cornerstoneTools.CircleROITool {
|
||||||
modalityUnitOptions
|
modalityUnitOptions
|
||||||
)
|
)
|
||||||
} else if (annotation.invalidated) {
|
} else if (annotation.invalidated) {
|
||||||
|
|
||||||
this._throttledCalculateCachedStats(
|
this._throttledCalculateCachedStats(
|
||||||
annotation,
|
annotation,
|
||||||
viewport,
|
viewport,
|
||||||
|
|
|
@ -450,13 +450,15 @@ export default {
|
||||||
const lesionState = !isNaN(parseInt(this.getQuestionVal(7))) ? parseInt(this.getQuestionVal(7)) : ''
|
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 })
|
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
|
// ppd
|
||||||
|
|
||||||
var ppd = this.getQuestionVal(12)
|
var ppd = this.getQuestionVal(12)
|
||||||
ppd = isNaN(parseFloat(ppd)) ? 0 : parseFloat(ppd)
|
ppd = isNaN(parseFloat(ppd)) ? 0 : parseFloat(ppd)
|
||||||
|
|
||||||
this.splitLesionTargetPDD = ppd + params.splitLesionTargetPPD
|
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)
|
state = isNaN(parseInt(state)) ? 0 : parseInt(state)
|
||||||
var ldi = this.getQuestionVal(0)// 长径
|
var ldi = this.getQuestionVal(0)// 长径
|
||||||
ldi = isNaN(parseFloat(ldi)) ? 0 : ldi
|
ldi = isNaN(parseFloat(ldi)) ? 0 : ldi
|
||||||
if (this.lesionType === 0 && params && params.splitLesionTargetLDi) {
|
|
||||||
this.splitLesionTargetLDi = ldi + params.splitLesionTargetLDi
|
|
||||||
}
|
|
||||||
var pddIncrease = this.getQuestionVal(17) // 相比最低点PPD增加百分比
|
var pddIncrease = this.getQuestionVal(17) // 相比最低点PPD增加百分比
|
||||||
pddIncrease = isNaN(parseFloat(pddIncrease)) ? 0 : parseFloat(pddIncrease)
|
pddIncrease = isNaN(parseFloat(pddIncrease)) ? 0 : parseFloat(pddIncrease)
|
||||||
var ldiIncrease = this.getQuestionVal(18)// 相比PPD最低点LDi增加值
|
var ldiIncrease = this.getQuestionVal(18)// 相比PPD最低点LDi增加值
|
||||||
|
@ -490,10 +489,17 @@ export default {
|
||||||
var minPPD = this.getQuestionVal(13)
|
var minPPD = this.getQuestionVal(13)
|
||||||
minPPD = parseFloat(minPPD)
|
minPPD = parseFloat(minPPD)
|
||||||
pddIncrease = ((((this.splitLesionTargetPDD - minPPD) / minPPD)) * 100).toFixed(this.digitPlaces)
|
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) {
|
// if(this.)
|
||||||
ldi = this.splitLesionTargetLDi
|
|
||||||
}
|
|
||||||
/** 疾病进展
|
/** 疾病进展
|
||||||
* 15mm<当前靶病灶LDi≤20mm
|
* 15mm<当前靶病灶LDi≤20mm
|
||||||
* 相比最低点PPD增加百分比 ≥50%
|
* 相比最低点PPD增加百分比 ≥50%
|
||||||
|
@ -983,6 +989,10 @@ export default {
|
||||||
var pddIncreaseNum = null
|
var pddIncreaseNum = null
|
||||||
if (this.splitLesionTargetPDD) {
|
if (this.splitLesionTargetPDD) {
|
||||||
pddIncreaseNum = ((((this.splitLesionTargetPDD - minPPD) / minPPD)) * 100).toFixed(this.digitPlaces)
|
pddIncreaseNum = ((((this.splitLesionTargetPDD - minPPD) / minPPD)) * 100).toFixed(this.digitPlaces)
|
||||||
|
ldi = this.splitLesionTargetLDi + ldi
|
||||||
|
ldiIncrease = ldi - minLDi
|
||||||
|
sdi = this.splitLesionTargetSDi + sdi
|
||||||
|
sdiIncrease = sdi - minSDi
|
||||||
} else {
|
} else {
|
||||||
pddIncreaseNum = ((((ppd - minPPD) / minPPD)) * 100).toFixed(this.digitPlaces)
|
pddIncreaseNum = ((((ppd - minPPD) / minPPD)) * 100).toFixed(this.digitPlaces)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue