mRecist标准bug修复
continuous-integration/drone/push Build is passing Details

uat
caiyiling 2025-04-24 16:47:08 +08:00
parent 2676ff4295
commit e3313edefd
6 changed files with 333 additions and 269 deletions

View File

@ -25,7 +25,7 @@
v-if="selectArr.includes(s.VisitTaskId) && s.StudyList.length > 0" v-if="selectArr.includes(s.VisitTaskId) && s.StudyList.length > 0"
:ref="s.VisitTaskId" :ref="s.VisitTaskId"
:visit-task-info="s" :visit-task-info="s"
:markedSeriesIds="markedSeriesIds" :marked-series-ids="markedSeriesIds"
@activeSeries="activeSeries" @activeSeries="activeSeries"
@showMultiFrame="showMultiFrame" @showMultiFrame="showMultiFrame"
/> />
@ -742,7 +742,7 @@ export default {
} }
if (item.IsCurrentTask) { if (item.IsCurrentTask) {
this.markedSeriesIds = [] this.markedSeriesIds = []
annotations.map(i=> { annotations.map(i => {
if (i.MeasureData && i.MeasureData.seriesId) { if (i.MeasureData && i.MeasureData.seriesId) {
this.markedSeriesIds.push(i.MeasureData.seriesId) this.markedSeriesIds.push(i.MeasureData.seriesId)
} }
@ -839,7 +839,7 @@ export default {
// //
let res2 = null let res2 = null
if (this.criterionType === 0) { if (this.criterionType === 0) {
res2 = await getCustomTag({visitTaskId: taskId}) res2 = await getCustomTag({ visitTaskId: taskId })
} else { } else {
res2 = await getTableAnswerRowInfoList(taskId) res2 = await getTableAnswerRowInfoList(taskId)
} }
@ -916,7 +916,7 @@ export default {
// //
async initLoader() { async initLoader() {
await initLibraries() await initLibraries()
cache.setMaxCacheSize(6 * 1024 * 1024 * 1024); cache.setMaxCacheSize(6 * 1024 * 1024 * 1024)
let renderingEngine = getRenderingEngine(renderingEngineId) let renderingEngine = getRenderingEngine(renderingEngineId)
if (!renderingEngine) { if (!renderingEngine) {
renderingEngine = new RenderingEngine(renderingEngineId) renderingEngine = new RenderingEngine(renderingEngineId)
@ -1227,22 +1227,21 @@ export default {
annotation.numberOfFrames = isNaN(parseInt(params.frame)) ? null : parseInt(params.frame) annotation.numberOfFrames = isNaN(parseInt(params.frame)) ? null : parseInt(params.frame)
annotation.markTool = annotation.metadata.toolName annotation.markTool = annotation.metadata.toolName
this.markedSeriesIds.push(series.Id) this.markedSeriesIds.push(series.Id)
let markName = await this.customPrompt() const markName = await this.customPrompt()
if (markName) { if (markName) {
annotation.data.label = markName annotation.data.label = markName
this.saveCustomAnnotation(annotation) this.saveCustomAnnotation(annotation)
} else { } else {
this.removeAnnotation(annotation) this.removeAnnotation(annotation)
} }
} }
this.setToolsPassive() this.setToolsPassive()
}, },
async saveCustomAnnotation(annotation) { async saveCustomAnnotation(annotation) {
try { try {
let measureData = Object.assign({}, annotation) const measureData = Object.assign({}, annotation)
let params = {} const params = {}
params.VisitTaskId = annotation.visitTaskId params.VisitTaskId = annotation.visitTaskId
params.StudyId = annotation.studyId params.StudyId = annotation.studyId
params.SeriesId = annotation.seriesId params.SeriesId = annotation.seriesId
@ -1250,10 +1249,10 @@ export default {
params.Id = annotation.id ? annotation.id : '' params.Id = annotation.id ? annotation.id : ''
params.MeasureData = JSON.stringify(measureData) params.MeasureData = JSON.stringify(measureData)
params.NumberOfFrames = annotation.numberOfFrames params.NumberOfFrames = annotation.numberOfFrames
let res = await submitCustomTag(params) const res = await submitCustomTag(params)
annotation.id = res.Result annotation.id = res.Result
console.log(res) console.log(res)
} catch(e) { } catch (e) {
console.log(e) console.log(e)
} }
}, },
@ -1298,7 +1297,7 @@ export default {
// //
let res = null let res = null
if (this.criterionType === 0) { if (this.criterionType === 0) {
res = await getCustomTag({visitTaskId: visitTaskId}) res = await getCustomTag({ visitTaskId: visitTaskId })
} else { } else {
res = await getTableAnswerRowInfoList(visitTaskId) res = await getTableAnswerRowInfoList(visitTaskId)
} }
@ -1324,7 +1323,7 @@ export default {
// //
let res = null let res = null
if (this.criterionType === 0) { if (this.criterionType === 0) {
res = await getCustomTag({visitTaskId: visitTaskId}) res = await getCustomTag({ visitTaskId: visitTaskId })
} else { } else {
res = await getTableAnswerRowInfoList(visitTaskId) res = await getTableAnswerRowInfoList(visitTaskId)
} }
@ -1345,6 +1344,13 @@ export default {
cornerstoneTools.annotation.state.removeAnnotation(i.annotationUID) cornerstoneTools.annotation.state.removeAnnotation(i.annotationUID)
} }
}) })
annotations.map(i => {
if (i.MeasureData) {
const annotation = i.MeasureData
cornerstoneTools.annotation.state.addAnnotation(annotation)
this.markedSeriesIds.push(annotation.seriesId)
}
})
const renderingEngine = getRenderingEngine(renderingEngineId) const renderingEngine = getRenderingEngine(renderingEngineId)
for (let i = 0; i < this.cells.length; i++) { for (let i = 0; i < this.cells.length; i++) {
const viewportId = `viewport-${i}` const viewportId = `viewport-${i}`
@ -1774,9 +1780,9 @@ export default {
bindHotKey() { bindHotKey() {
const container = this.$refs['container'] const container = this.$refs['container']
container.addEventListener('keydown', event => { container.addEventListener('keydown', event => {
let idx = this.hotKeyList.findIndex(i => i.code === event.code && i.ctrlKey === event.ctrlKey && i.shiftKey === event.shiftKey && i.altKey === event.altKey) const idx = this.hotKeyList.findIndex(i => i.code === event.code && i.ctrlKey === event.ctrlKey && i.shiftKey === event.shiftKey && i.altKey === event.altKey)
if (idx === -1) return if (idx === -1) return
let shortcutKeyEnum = this.hotKeyList[idx].shortcutKeyEnum const shortcutKeyEnum = this.hotKeyList[idx].shortcutKeyEnum
if (shortcutKeyEnum === 1) { if (shortcutKeyEnum === 1) {
// //
@ -1869,7 +1875,6 @@ export default {
fitToType(forceFitToWindow) { fitToType(forceFitToWindow) {
this.forceFitToWindow = !forceFitToWindow this.forceFitToWindow = !forceFitToWindow
this.$refs[`viewport-${this.activeViewportIndex}`][0].resize(forceFitToWindow) this.$refs[`viewport-${this.activeViewportIndex}`][0].resize(forceFitToWindow)
}, },
// //
toggleFullScreen(e, index) { toggleFullScreen(e, index) {

View File

@ -1306,11 +1306,10 @@ export default {
this.activeName = '' this.activeName = ''
} }
loading.close() loading.close()
} catch(e) { } catch (e) {
console.log(e) console.log(e)
loading.close() loading.close()
} }
}, },
// //
async uploadScreenshots(fileName, file) { async uploadScreenshots(fileName, file) {
@ -1619,9 +1618,17 @@ export default {
let lesionLength = null let lesionLength = null
let lesionShort = null let lesionShort = null
if (innerForm.MeasureData) { if (innerForm.MeasureData) {
// if (innerForm.MeasureData.metadata.toolName === 'Length') {
lesionLength = innerForm.LesionLength ? innerForm.LesionLength : null const referencedImageId = innerForm.MeasureData.metadata.referencedImageId
lesionShort = innerForm.LesionShort ? innerForm.LesionShort : null const length = innerForm.MeasureData.data.cachedStats[`imageId:${referencedImageId}`].length
lesionLength = length ? parseFloat(length).toFixed(this.digitPlaces) : length
} else if (innerForm.MeasureData.metadata.toolName === 'Bidirectional') {
const referencedImageId = innerForm.MeasureData.metadata.referencedImageId
const length = innerForm.MeasureData.data.cachedStats[`imageId:${referencedImageId}`].length
lesionLength = length ? parseFloat(length).toFixed(this.digitPlaces) : length
const short = innerForm.MeasureData.data.cachedStats[`imageId:${referencedImageId}`].width
lesionShort = short ? parseFloat(short).toFixed(this.digitPlaces) : short
}
this.$emit('setMarkName', { this.$emit('setMarkName', {
annotationUID: innerForm.MeasureData.annotationUID, annotationUID: innerForm.MeasureData.annotationUID,
name: answer.LesionName name: answer.LesionName

View File

@ -110,10 +110,10 @@ import {
utilities as csUtils utilities as csUtils
} from '@cornerstonejs/core' } from '@cornerstonejs/core'
import * as cornerstoneTools from '@cornerstonejs/tools' import * as cornerstoneTools from '@cornerstonejs/tools'
import cornerstoneDICOMImageLoader from '@cornerstonejs/dicom-image-loader'; import cornerstoneDICOMImageLoader from '@cornerstonejs/dicom-image-loader'
const { // const {
ToolGroupManager // ToolGroupManager
} = cornerstoneTools // } = cornerstoneTools
import { vec3 } from 'gl-matrix' import { vec3 } from 'gl-matrix'
export default { export default {
name: 'ImageViewport', name: 'ImageViewport',
@ -312,7 +312,7 @@ export default {
newImageIdIndex = numImages - 1 newImageIdIndex = numImages - 1
} }
// viewport.setImageIdIndex(newImageIdIndex) // viewport.setImageIdIndex(newImageIdIndex)
csUtils.jumpToSlice(viewport.element, {imageIndex: newImageIdIndex}) csUtils.jumpToSlice(viewport.element, { imageIndex: newImageIdIndex })
cornerstoneTools.utilities.cine.stopClip(viewport.element) cornerstoneTools.utilities.cine.stopClip(viewport.element)
}, },
setZoom(ratio) { setZoom(ratio) {
@ -338,7 +338,6 @@ export default {
viewport.setZoom(1) viewport.setZoom(1)
viewport.render() viewport.render()
} }
}, },
async prefetchMetadataInformation(imageIdsToPrefetch) { async prefetchMetadataInformation(imageIdsToPrefetch) {
let taskPromises = [] let taskPromises = []
@ -363,10 +362,9 @@ export default {
await viewport.setStack(this.series.Stack, obj.SliceIndex) await viewport.setStack(this.series.Stack, obj.SliceIndex)
// cornerstoneTools.utilities.stackContextPrefetch.enable(viewport.element) // cornerstoneTools.utilities.stackContextPrefetch.enable(viewport.element)
viewport.render() viewport.render()
} catch(e) { } catch (e) {
console.log(e) console.log(e)
} }
}, },
cornerstoneToolsMouseMove(e) { cornerstoneToolsMouseMove(e) {
const { currentPoints } = e.detail const { currentPoints } = e.detail
@ -408,7 +406,7 @@ export default {
this.viewportId this.viewportId
) )
// viewport.setImageIdIndex(sliceIdx) // viewport.setImageIdIndex(sliceIdx)
csUtils.jumpToSlice(viewport.element, {imageIndex: sliceIdx}) csUtils.jumpToSlice(viewport.element, { imageIndex: sliceIdx })
viewport.render() viewport.render()
}, },
sliderMouseup(e) { sliderMouseup(e) {
@ -438,7 +436,7 @@ export default {
this.viewportId this.viewportId
) )
// viewport.setImageIdIndex(sliceIdx) // viewport.setImageIdIndex(sliceIdx)
csUtils.jumpToSlice(viewport.element, {imageIndex: sliceIdx}) csUtils.jumpToSlice(viewport.element, { imageIndex: sliceIdx })
viewport.render() viewport.render()
}, },
sliderMouseleave(e) { sliderMouseleave(e) {

View File

@ -9,7 +9,7 @@
:label="$t('trials:reading:tabTitle:review')" :label="$t('trials:reading:tabTitle:review')"
name="read" name="read"
> >
<read-page ref="readPage"/> <read-page ref="readPage" />
</el-tab-pane> </el-tab-pane>
<!-- 报告 --> <!-- 报告 -->
<el-tab-pane <el-tab-pane

View File

@ -832,9 +832,27 @@ export default {
async saveLesion(table, rowIndex) { async saveLesion(table, rowIndex) {
const valid = await this.$refs[`${table.Id}_${rowIndex}`][0].validate() const valid = await this.$refs[`${table.Id}_${rowIndex}`][0].validate()
if (!valid) return if (!valid) return
const loading = this.$loading({ fullscreen: true }) let loading = null
try { try {
const innerForm = this.innerFormData[`${table.Id}_${rowIndex}`] const innerForm = this.innerFormData[`${table.Id}_${rowIndex}`]
if (table.LesionType === 0 && this.isBaseLineTask && !innerForm.IsLymphNodes && !innerForm.IntrahepaticLesion) {
const arr = Object.values(this.innerFormData).filter(
obj => !obj.IntrahepaticLesion && (obj.LesionOrgan === '肝脏' || obj.LesionOrgan === 'Liver') && obj.LesionType === 0 && obj.SaveTypeEnum === 2
)
if (arr.length === 0) {
const confirm = await this.$confirm(
this.$t('trials:mRecist:warnning:msg7'),
{
type: 'warning',
distinguishCancelAndClose: true
}
)
if (confirm !== 'confirm') return
}
}
loading = this.$loading({ fullscreen: true })
const measureData = innerForm.MeasureData const measureData = innerForm.MeasureData
const lesionState = innerForm.LesionState const lesionState = innerForm.LesionState
let lesionLength = innerForm.LesionLength let lesionLength = innerForm.LesionLength
@ -842,6 +860,7 @@ export default {
const lymphNodes = innerForm.IsLymphNodes const lymphNodes = innerForm.IsLymphNodes
const lesionType = table.LesionType const lesionType = table.LesionType
const lesionPart = innerForm.LesionPart const lesionPart = innerForm.LesionPart
const intrahepaticLesion = innerForm.IntrahepaticLesion
if (this.isBaseLineTask) { if (this.isBaseLineTask) {
// 线 // 线
// 0 // 0
@ -1174,6 +1193,16 @@ export default {
} }
} else { } else {
// //
if (intrahepaticLesion && !(measureData && measureData.markTool === 'Length')) {
// 使
this.$confirm(this.$t('trials:mRecist:warnning:msg6'), {
type: 'warning',
showCancelButton: false,
callback: action => {}
})
loading.close()
return
}
if (!(measureData && (measureData.markTool === 'Length' || measureData.markTool === 'ArrowAnnotate'))) { if (!(measureData && (measureData.markTool === 'Length' || measureData.markTool === 'ArrowAnnotate'))) {
// 使 // 使
this.$confirm(this.$t('trials:reading:warnning:msg40'), { this.$confirm(this.$t('trials:reading:warnning:msg40'), {
@ -1212,6 +1241,16 @@ export default {
return return
} }
} else { } else {
if (innerForm.IntrahepaticLesion && !(measureData && (measureData.markTool === 'Length'))) {
// `使`
this.$confirm(this.$t('trials:mRecist:warnning:msg6'), {
type: 'warning',
showCancelButton: false,
callback: action => {}
})
loading.close()
return
}
// //
if (!(measureData && (measureData.markTool === 'Length' || measureData.markTool === 'ArrowAnnotate'))) { if (!(measureData && (measureData.markTool === 'Length' || measureData.markTool === 'ArrowAnnotate'))) {
// `使` // `使`
@ -1356,7 +1395,9 @@ export default {
loading.close() loading.close()
} catch (e) { } catch (e) {
console.log(e) console.log(e)
loading.close() if (loading) {
loading.close()
}
} }
}, },
// //
@ -1704,9 +1745,17 @@ export default {
let lesionLength = null let lesionLength = null
let lesionShort = null let lesionShort = null
if (innerForm.MeasureData) { if (innerForm.MeasureData) {
// if (innerForm.MeasureData.metadata.toolName === 'Length') {
lesionLength = innerForm.LesionLength ? innerForm.LesionLength : null const referencedImageId = innerForm.MeasureData.metadata.referencedImageId
lesionShort = innerForm.LesionShort ? innerForm.LesionShort : null const length = innerForm.MeasureData.data.cachedStats[`imageId:${referencedImageId}`].length
lesionLength = length ? parseFloat(length).toFixed(this.digitPlaces) : length
} else if (innerForm.MeasureData.metadata.toolName === 'Bidirectional') {
const referencedImageId = innerForm.MeasureData.metadata.referencedImageId
const length = innerForm.MeasureData.data.cachedStats[`imageId:${referencedImageId}`].length
lesionLength = length ? parseFloat(length).toFixed(this.digitPlaces) : length
const short = innerForm.MeasureData.data.cachedStats[`imageId:${referencedImageId}`].width
lesionShort = short ? parseFloat(short).toFixed(this.digitPlaces) : short
}
this.$emit('setMarkName', { this.$emit('setMarkName', {
annotationUID: innerForm.MeasureData.annotationUID, annotationUID: innerForm.MeasureData.annotationUID,
name: answer.LesionName name: answer.LesionName
@ -1816,6 +1865,7 @@ export default {
const rowIndex = this.activeName.split('_')[1] const rowIndex = this.activeName.split('_')[1]
const innerForm = this.innerFormData[`${tableId}_${rowIndex}`] const innerForm = this.innerFormData[`${tableId}_${rowIndex}`]
const isLymphNodes = innerForm.IsLymphNodes const isLymphNodes = innerForm.IsLymphNodes
const intrahepaticLesion = innerForm.IntrahepaticLesion
if (!innerForm.MeasureData) { if (!innerForm.MeasureData) {
if (this.isBaseLineTask) { if (this.isBaseLineTask) {
if (innerForm.LesionType === 0 && isLymphNodes === 1 && toolName !== 'Bidirectional') { if (innerForm.LesionType === 0 && isLymphNodes === 1 && toolName !== 'Bidirectional') {
@ -1851,6 +1901,10 @@ export default {
} else if (innerForm.LesionType === 2 && isLymphNodes === 1 && toolName !== 'Bidirectional' && toolName !== 'ArrowAnnotate') { } else if (innerForm.LesionType === 2 && isLymphNodes === 1 && toolName !== 'Bidirectional' && toolName !== 'ArrowAnnotate') {
// 使 // 使
return { isCanActiveTool: false, reason: this.$t('trials:reading:warnning:msg12') } return { isCanActiveTool: false, reason: this.$t('trials:reading:warnning:msg12') }
} else if (innerForm.LesionType === 2 && isLymphNodes === 0 && toolName !== 'Length' && intrahepaticLesion) {
// 使
// 使
return { isCanActiveTool: false, reason: this.$t('trials:mRecist:warnning:msg5') }
} else if (innerForm.LesionType === 2 && isLymphNodes === 0 && toolName !== 'Length' && toolName !== 'ArrowAnnotate') { } else if (innerForm.LesionType === 2 && isLymphNodes === 0 && toolName !== 'Length' && toolName !== 'ArrowAnnotate') {
// 使 // 使
return { isCanActiveTool: false, reason: this.$t('trials:reading:warnning:msg13') } return { isCanActiveTool: false, reason: this.$t('trials:reading:warnning:msg13') }

View File

@ -1,275 +1,275 @@
const config = { const config = {
"standards": [ 'standards': [
{ {
"type": 1, 'type': 1,
"name": "RECIST 1.1", 'name': 'RECIST 1.1',
"tools": [ 'tools': [
{ {
"name": "直径测量工具", 'name': '直径测量工具',
"icon": "length", 'icon': 'length',
"toolName": "Length", 'toolName': 'Length',
"i18nKey": "trials:reading:button:length", 'i18nKey': 'trials:reading:button:length',
"isDisabled": false, 'isDisabled': false,
"disabledReason": '' 'disabledReason': ''
}, },
{ {
"name": "长短径测量工具", 'name': '长短径测量工具',
"icon": "bidirection", 'icon': 'bidirection',
"toolName": "Bidirectional", 'toolName': 'Bidirectional',
"i18nKey": "trials:reading:button:bidirectional", 'i18nKey': 'trials:reading:button:bidirectional',
"isDisabled": false, 'isDisabled': false,
"disabledReason": '' 'disabledReason': ''
}, },
{ {
"name": "矩形工具", 'name': '矩形工具',
"icon": "rectangle", 'icon': 'rectangle',
"toolName": "RectangleROI", 'toolName': 'RectangleROI',
"i18nKey": "trials:reading:button:rectangle", 'i18nKey': 'trials:reading:button:rectangle',
"isDisabled": false, 'isDisabled': false,
"disabledReason": '' 'disabledReason': ''
}, },
{ {
"name": "箭头工具", 'name': '箭头工具',
"icon": "arrow", 'icon': 'arrow',
"toolName": "ArrowAnnotate", 'toolName': 'ArrowAnnotate',
"i18nKey": "trials:reading:button:arrowAnnotate", 'i18nKey': 'trials:reading:button:arrowAnnotate',
"isDisabled": false, 'isDisabled': false,
"disabledReason": '' 'disabledReason': ''
} }
] ]
}, },
{ {
"type": 2, 'type': 2,
"name": "Lugano 2014", 'name': 'Lugano 2014',
"tools": [ 'tools': [
{ {
"name": "直径测量工具", 'name': '直径测量工具',
"icon": "length", 'icon': 'length',
"toolName": "Length", 'toolName': 'Length',
"i18nKey": "trials:reading:button:length", 'i18nKey': 'trials:reading:button:length',
"isDisabled": false, 'isDisabled': false,
"disabledReason": '' 'disabledReason': ''
}, },
{ {
"name": "长短径测量工具", 'name': '长短径测量工具',
"icon": "bidirection", 'icon': 'bidirection',
"toolName": "Bidirectional", 'toolName': 'Bidirectional',
"i18nKey": "trials:reading:button:bidirectional", 'i18nKey': 'trials:reading:button:bidirectional',
"isDisabled": false, 'isDisabled': false,
"disabledReason": '' 'disabledReason': ''
}, },
{ {
"name": "矩形工具", 'name': '矩形工具',
"icon": "rectangle", 'icon': 'rectangle',
"toolName": "RectangleROI", 'toolName': 'RectangleROI',
"i18nKey": "trials:reading:button:rectangle", 'i18nKey': 'trials:reading:button:rectangle',
"isDisabled": false, 'isDisabled': false,
"disabledReason": '' 'disabledReason': ''
}, },
{ {
"name": "箭头工具", 'name': '箭头工具',
"icon": "arrow", 'icon': 'arrow',
"toolName": "ArrowAnnotate", 'toolName': 'ArrowAnnotate',
"i18nKey": "trials:reading:button:arrowAnnotate", 'i18nKey': 'trials:reading:button:arrowAnnotate',
"isDisabled": false, 'isDisabled': false,
"disabledReason": '' 'disabledReason': ''
} }
] ]
}, },
{ {
"type": 3, 'type': 3,
"name": "iRECIST", 'name': 'iRECIST',
"tools": [ 'tools': [
{ {
"name": "直径测量工具", 'name': '直径测量工具',
"icon": "length", 'icon': 'length',
"toolName": "Length", 'toolName': 'Length',
"i18nKey": "trials:reading:button:length", 'i18nKey': 'trials:reading:button:length',
"isDisabled": false, 'isDisabled': false,
"disabledReason": '' 'disabledReason': ''
}, },
{ {
"name": "长短径测量工具", 'name': '长短径测量工具',
"icon": "bidirection", 'icon': 'bidirection',
"toolName": "Bidirectional", 'toolName': 'Bidirectional',
"i18nKey": "trials:reading:button:bidirectional", 'i18nKey': 'trials:reading:button:bidirectional',
"isDisabled": false, 'isDisabled': false,
"disabledReason": '' 'disabledReason': ''
}, },
{ {
"name": "矩形工具", 'name': '矩形工具',
"icon": "rectangle", 'icon': 'rectangle',
"toolName": "RectangleROI", 'toolName': 'RectangleROI',
"i18nKey": "trials:reading:button:rectangle", 'i18nKey': 'trials:reading:button:rectangle',
"isDisabled": false, 'isDisabled': false,
"disabledReason": '' 'disabledReason': ''
}, },
{ {
"name": "箭头工具", 'name': '箭头工具',
"icon": "arrow", 'icon': 'arrow',
"toolName": "ArrowAnnotate", 'toolName': 'ArrowAnnotate',
"i18nKey": "trials:reading:button:arrowAnnotate", 'i18nKey': 'trials:reading:button:arrowAnnotate',
"isDisabled": false, 'isDisabled': false,
"disabledReason": '' 'disabledReason': ''
} }
] ]
}, },
{ {
"type": 7, 'type': 7,
"name": "mRECIST HCC", 'name': 'mRECIST HCC',
"tools": [ 'tools': [
{ {
"name": "直径测量工具", 'name': '直径测量工具',
"icon": "length", 'icon': 'length',
"toolName": "Length", 'toolName': 'Length',
"i18nKey": "trials:reading:button:length", 'i18nKey': 'trials:reading:button:length',
"isDisabled": false, 'isDisabled': false,
"disabledReason": '' 'disabledReason': ''
}, },
{ {
"name": "长短径测量工具", 'name': '长短径测量工具',
"icon": "bidirection", 'icon': 'bidirection',
"toolName": "Bidirectional", 'toolName': 'Bidirectional',
"i18nKey": "trials:reading:button:bidirectional", 'i18nKey': 'trials:reading:button:bidirectional',
"isDisabled": false, 'isDisabled': false,
"disabledReason": '' 'disabledReason': ''
}, },
{ {
"name": "矩形工具", 'name': '矩形工具',
"icon": "rectangle", 'icon': 'rectangle',
"toolName": "RectangleROI", 'toolName': 'RectangleROI',
"i18nKey": "trials:reading:button:rectangle", 'i18nKey': 'trials:reading:button:rectangle',
"isDisabled": false, 'isDisabled': false,
"disabledReason": '' 'disabledReason': ''
}, },
{ {
"name": "箭头工具", 'name': '箭头工具',
"icon": "arrow", 'icon': 'arrow',
"toolName": "ArrowAnnotate", 'toolName': 'ArrowAnnotate',
"i18nKey": "trials:reading:button:arrowAnnotate", 'i18nKey': 'trials:reading:button:arrowAnnotate',
"isDisabled": false, 'isDisabled': false,
"disabledReason": '' 'disabledReason': ''
} }
] ]
}, },
{ {
"type": 10, 'type': 10,
"name": "PCWG3", 'name': 'PCWG3',
"tools": [ 'tools': [
{ {
"name": "矩形工具", 'name': '矩形工具',
"icon": "rectangle", 'icon': 'rectangle',
"toolName": "RectangleROI", 'toolName': 'RectangleROI',
"i18nKey": "trials:reading:button:rectangle", 'i18nKey': 'trials:reading:button:rectangle',
"isDisabled": false, 'isDisabled': false,
"disabledReason": '' 'disabledReason': ''
}, },
{ {
"name": "箭头工具", 'name': '箭头工具',
"icon": "arrow", 'icon': 'arrow',
"toolName": "ArrowAnnotate", 'toolName': 'ArrowAnnotate',
"i18nKey": "trials:reading:button:arrowAnnotate", 'i18nKey': 'trials:reading:button:arrowAnnotate',
"isDisabled": false, 'isDisabled': false,
"disabledReason": '' 'disabledReason': ''
} }
] ]
}, },
{ {
"type": 17, 'type': 17,
"name": "PCWG3", 'name': 'PCWG3',
"tools": [ 'tools': [
{ {
"name": "直径测量工具", 'name': '直径测量工具',
"icon": "length", 'icon': 'length',
"toolName": "Length", 'toolName': 'Length',
"i18nKey": "trials:reading:button:length", 'i18nKey': 'trials:reading:button:length',
"isDisabled": false, 'isDisabled': false,
"disabledReason": '' 'disabledReason': ''
}, },
{ {
"name": "矩形工具", 'name': '矩形工具',
"icon": "rectangle", 'icon': 'rectangle',
"toolName": "RectangleROI", 'toolName': 'RectangleROI',
"i18nKey": "trials:reading:button:rectangle", 'i18nKey': 'trials:reading:button:rectangle',
"isDisabled": false, 'isDisabled': false,
"disabledReason": '' 'disabledReason': ''
}, },
{ {
"name": "箭头工具", 'name': '箭头工具',
"icon": "arrow", 'icon': 'arrow',
"toolName": "ArrowAnnotate", 'toolName': 'ArrowAnnotate',
"i18nKey": "trials:reading:button:arrowAnnotate", 'i18nKey': 'trials:reading:button:arrowAnnotate',
"isDisabled": false, 'isDisabled': false,
"disabledReason": '' 'disabledReason': ''
} }
] ]
}, },
{ {
"type": 19, 'type': 19,
"name": "IVUS定量评估", 'name': 'IVUS定量评估',
"tools": [] 'tools': []
}, },
{ {
"type": 20, 'type': 20,
"name": "OCT定量评估", 'name': 'OCT定量评估',
"tools": [] 'tools': []
}, },
{ {
"type": 21, 'type': 21,
"name": "MRI-PDFF", 'name': 'MRI-PDFF',
"tools": [ 'tools': [
{ {
"name": "圆形测量", 'name': '圆形测量',
"icon": "oval", 'icon': 'oval',
"toolName": "Probe", 'toolName': 'Probe',
"i18nKey": "trials:reading:button:circle", 'i18nKey': 'trials:reading:button:circle',
"isDisabled": false, 'isDisabled': false,
"disabledReason": '' 'disabledReason': ''
} }
] ]
} }
], ],
"customizeStandards": [ 'customizeStandards': [
{ {
"name": "直径测量工具", 'name': '直径测量工具',
"icon": "length", 'icon': 'length',
"toolName": "Length", 'toolName': 'Length',
"i18nKey": "trials:reading:button:length", 'i18nKey': 'trials:reading:button:length',
"isDisabled": false, 'isDisabled': false,
"disabledReason": '' 'disabledReason': ''
}, },
{ {
"name": "长短径测量工具", 'name': '长短径测量工具',
"icon": "bidirection", 'icon': 'bidirection',
"toolName": "Bidirectional", 'toolName': 'Bidirectional',
"i18nKey": "trials:reading:button:bidirectional", 'i18nKey': 'trials:reading:button:bidirectional',
"isDisabled": false, 'isDisabled': false,
"disabledReason": '' 'disabledReason': ''
}, },
{ {
"name": "矩形工具", 'name': '矩形工具',
"icon": "rectangle", 'icon': 'rectangle',
"toolName": "RectangleROI", 'toolName': 'RectangleROI',
"i18nKey": "trials:reading:button:rectangle", 'i18nKey': 'trials:reading:button:rectangle',
"isDisabled": false, 'isDisabled': false,
"disabledReason": '' 'disabledReason': ''
}, },
{ {
"name": "箭头工具", 'name': '箭头工具',
"icon": "arrow", 'icon': 'arrow',
"toolName": "ArrowAnnotate", 'toolName': 'ArrowAnnotate',
"i18nKey": "trials:reading:button:arrowAnnotate", 'i18nKey': 'trials:reading:button:arrowAnnotate',
"isDisabled": false, 'isDisabled': false,
"disabledReason": '' 'disabledReason': ''
} }
] ]
} }
const getTools = (criterionType) => { const getTools = (criterionType) => {
const standard = config.standards.find(s => s.type === criterionType); const standard = config.standards.find(s => s.type === criterionType)
return standard?.tools || []; return standard?.tools || []
}; }
const getCustomizeStandardsTools = (toolNames) => { const getCustomizeStandardsTools = (toolNames) => {
const filteredTools =config.customizeStandards.filter(item => toolNames.includes(item.toolName)); const filteredTools = config.customizeStandards.filter(item => toolNames.includes(item.toolName))
return filteredTools || []; return filteredTools || []
}; }
export {config, getTools, getCustomizeStandardsTools} export { config, getTools, getCustomizeStandardsTools }