total数值绑定更改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
b7c57c3c27
commit
e04e94a792
|
|
@ -653,7 +653,7 @@ const newStyles = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
annotation.config.style.setDefaultToolStyles(newStyles)
|
annotation.config.style.setDefaultToolStyles(newStyles)
|
||||||
const { MouseBindings, Events: toolsEvents } = csToolsEnums
|
const { MouseBindings, Events: toolsEvents, ChangeTypes } = csToolsEnums
|
||||||
export default {
|
export default {
|
||||||
name: 'ReadPage',
|
name: 'ReadPage',
|
||||||
components: {
|
components: {
|
||||||
|
|
@ -974,7 +974,6 @@ export default {
|
||||||
this.tools = getCustomizeStandardsTools(this.taskInfo.ReadingToolList)
|
this.tools = getCustomizeStandardsTools(this.taskInfo.ReadingToolList)
|
||||||
const toolNames = this.tools.map(i => i.toolName)
|
const toolNames = this.tools.map(i => i.toolName)
|
||||||
this.customizeStandards = config.customizeStandards.filter(item => !toolNames.includes(item.toolName))
|
this.customizeStandards = config.customizeStandards.filter(item => !toolNames.includes(item.toolName))
|
||||||
console.log(this.customizeStandards, 'this.customizeStandards')
|
|
||||||
} else {
|
} else {
|
||||||
this.tools = getTools(this.criterionType)
|
this.tools = getTools(this.criterionType)
|
||||||
}
|
}
|
||||||
|
|
@ -1058,7 +1057,6 @@ export default {
|
||||||
let imageId = imageIds[0]
|
let imageId = imageIds[0]
|
||||||
const imagePixelModule = metaData.get('imagePixelModule', imageId);
|
const imagePixelModule = metaData.get('imagePixelModule', imageId);
|
||||||
const photometricInterpretation = imagePixelModule?.photometricInterpretation;
|
const photometricInterpretation = imagePixelModule?.photometricInterpretation;
|
||||||
console.log(photometricInterpretation, 'photometricInterpretation')
|
|
||||||
if (photometricInterpretation && photometricInterpretation !== 'MONOCHROME1' && photometricInterpretation !== 'MONOCHROME2') return this.$confirm(this.$t('trials:histogram:confirm:photometricInterpretationNotSupported'))
|
if (photometricInterpretation && photometricInterpretation !== 'MONOCHROME1' && photometricInterpretation !== 'MONOCHROME2') return this.$confirm(this.$t('trials:histogram:confirm:photometricInterpretationNotSupported'))
|
||||||
this.histogramVisible = true
|
this.histogramVisible = true
|
||||||
this.setToolsPassive()
|
this.setToolsPassive()
|
||||||
|
|
@ -1939,12 +1937,6 @@ export default {
|
||||||
// this.toolModeChanged
|
// this.toolModeChanged
|
||||||
// )
|
// )
|
||||||
},
|
},
|
||||||
toolModeChanged(e) {
|
|
||||||
console.log(e)
|
|
||||||
const arr = cornerstoneTools.annotation.state.getAllAnnotations()
|
|
||||||
// if (arr)
|
|
||||||
console.log(arr)
|
|
||||||
},
|
|
||||||
annotationAddedListener(e) {
|
annotationAddedListener(e) {
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
@ -1978,12 +1970,13 @@ export default {
|
||||||
},
|
},
|
||||||
annotationModifiedListener(e) {
|
annotationModifiedListener(e) {
|
||||||
console.log('Modified')
|
console.log('Modified')
|
||||||
const { annotation } = e.detail
|
const { annotation, changeType } = e.detail
|
||||||
|
const isStatsUpdated = changeType === ChangeTypes.StatsUpdated
|
||||||
if (!annotation) return
|
if (!annotation) return
|
||||||
if (annotation.metadata.toolName === FusionJumpToPointTool.toolName) 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 && !isStatsUpdated) return
|
||||||
if (annotation.metadata.toolName === 'PlanarFreehandROI' && !annotation.data.contour.closed) return
|
if (annotation.metadata.toolName === 'PlanarFreehandROI' && !annotation.data.contour.closed) return
|
||||||
const series = this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].series
|
const series = this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].series
|
||||||
if (series && series.TaskInfo.VisitTaskId && series.TaskInfo.VisitTaskId === this.taskInfo.VisitTaskId) {
|
if (series && series.TaskInfo.VisitTaskId && series.TaskInfo.VisitTaskId === this.taskInfo.VisitTaskId) {
|
||||||
|
|
@ -2040,7 +2033,6 @@ export default {
|
||||||
const series = this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].series
|
const series = this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].series
|
||||||
if (series && series.TaskInfo.VisitTaskId && series.TaskInfo.VisitTaskId === this.taskInfo.VisitTaskId) {
|
if (series && series.TaskInfo.VisitTaskId && series.TaskInfo.VisitTaskId === this.taskInfo.VisitTaskId) {
|
||||||
const referencedImageId = annotation.metadata.referencedImageId
|
const referencedImageId = annotation.metadata.referencedImageId
|
||||||
console.log(annotation, 'annotation')
|
|
||||||
const params = this.getInstanceInfo(referencedImageId)
|
const params = this.getInstanceInfo(referencedImageId)
|
||||||
annotation.visitTaskId = series.TaskInfo.VisitTaskId
|
annotation.visitTaskId = series.TaskInfo.VisitTaskId
|
||||||
annotation.studyId = series.StudyId
|
annotation.studyId = series.StudyId
|
||||||
|
|
@ -2114,12 +2106,13 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
customAnnotationModifiedListener(e) {
|
customAnnotationModifiedListener(e) {
|
||||||
const { annotation } = e.detail
|
const { annotation, changeType } = e.detail
|
||||||
|
const isStatsUpdated = changeType === ChangeTypes.StatsUpdated
|
||||||
if (!annotation) return
|
if (!annotation) return
|
||||||
if (annotation.metadata.toolName === FusionJumpToPointTool.toolName) 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 && !isStatsUpdated) return
|
||||||
const i = this.tools.findIndex(i => i.toolName === annotation.metadata.toolName)
|
const i = this.tools.findIndex(i => i.toolName === annotation.metadata.toolName)
|
||||||
if (i === -1) {
|
if (i === -1) {
|
||||||
if (annotation.metadata.toolName !== LabelMapEditWithContourTool.toolName) this.setToolsPassive()
|
if (annotation.metadata.toolName !== LabelMapEditWithContourTool.toolName) this.setToolsPassive()
|
||||||
|
|
@ -2216,7 +2209,6 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
contentMouseup(e) {
|
contentMouseup(e) {
|
||||||
console.log('contentMouseup')
|
|
||||||
if (this.$refs.Segmentations) {
|
if (this.$refs.Segmentations) {
|
||||||
this.$refs.Segmentations.contentMouseup()
|
this.$refs.Segmentations.contentMouseup()
|
||||||
}
|
}
|
||||||
|
|
@ -3395,7 +3387,6 @@ export default {
|
||||||
this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].resize(true)
|
this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].resize(true)
|
||||||
} else if (shortcutKeyEnum === 15) {
|
} else if (shortcutKeyEnum === 15) {
|
||||||
// 截图
|
// 截图
|
||||||
console.log("截图")
|
|
||||||
this.saveImage()
|
this.saveImage()
|
||||||
} else if (shortcutKeyEnum === 16) {
|
} else if (shortcutKeyEnum === 16) {
|
||||||
// 反色
|
// 反色
|
||||||
|
|
@ -4061,7 +4052,6 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
setToolToTarget(obj) {
|
setToolToTarget(obj) {
|
||||||
console.log('setToolToTarget')
|
|
||||||
if (obj.visitTaskId === this.taskInfo.VisitTaskId && this.readingTaskState !== 2 && obj.markTool && !obj.isMarked) {
|
if (obj.visitTaskId === this.taskInfo.VisitTaskId && this.readingTaskState !== 2 && obj.markTool && !obj.isMarked) {
|
||||||
const toolName = obj.markTool
|
const toolName = obj.markTool
|
||||||
if (this.activeTool) {
|
if (this.activeTool) {
|
||||||
|
|
|
||||||
|
|
@ -1263,10 +1263,23 @@ export default {
|
||||||
} else if (this.isNoneDicom && value !== null) {
|
} else if (this.isNoneDicom && value !== null) {
|
||||||
value = this.reRound(csUtils.roundNumber(value), this.digitPlaces)
|
value = this.reRound(csUtils.roundNumber(value), this.digitPlaces)
|
||||||
}
|
}
|
||||||
|
if (prop === 'total' && value !== null) {
|
||||||
|
return this.formatStatSum(value)
|
||||||
|
}
|
||||||
return value !== null
|
return value !== null
|
||||||
? parseFloat(value).toFixed(this.digitPlaces)
|
? parseFloat(value).toFixed(this.digitPlaces)
|
||||||
: value
|
: value
|
||||||
},
|
},
|
||||||
|
formatStatSum(value) {
|
||||||
|
const num = Number(value)
|
||||||
|
if (!Number.isFinite(num)) return value
|
||||||
|
|
||||||
|
if (Math.abs(num - Math.round(num)) < 1e-6) {
|
||||||
|
return String(Math.round(num))
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.reRound(num, this.digitPlaces)
|
||||||
|
},
|
||||||
reRound(result, finalPrecision) {
|
reRound(result, finalPrecision) {
|
||||||
if (typeof result === 'string' && result.includes(', ')) {
|
if (typeof result === 'string' && result.includes(', ')) {
|
||||||
const numStrs = result.split(', ')
|
const numStrs = result.split(', ')
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue