307 lines
8.0 KiB
JavaScript
307 lines
8.0 KiB
JavaScript
const config = {
|
|
'standards': [
|
|
{
|
|
'type': 1,
|
|
'name': 'RECIST 1.1',
|
|
'tools': [
|
|
{
|
|
'name': '直径测量工具',
|
|
'icon': 'length',
|
|
'toolName': 'Length',
|
|
'i18nKey': 'trials:reading:button:length',
|
|
'isDisabled': false,
|
|
'disabledReason': ''
|
|
},
|
|
{
|
|
'name': '长短径测量工具',
|
|
'icon': 'bidirection',
|
|
'toolName': 'Bidirectional',
|
|
'i18nKey': 'trials:reading:button:bidirectional',
|
|
'isDisabled': false,
|
|
'disabledReason': ''
|
|
},
|
|
{
|
|
'name': '矩形工具',
|
|
'icon': 'rectangle',
|
|
'toolName': 'RectangleROI',
|
|
'i18nKey': 'trials:reading:button:rectangle',
|
|
'isDisabled': false,
|
|
'disabledReason': ''
|
|
},
|
|
{
|
|
'name': '箭头工具',
|
|
'icon': 'arrow',
|
|
'toolName': 'ArrowAnnotate',
|
|
'i18nKey': 'trials:reading:button:arrowAnnotate',
|
|
'isDisabled': false,
|
|
'disabledReason': ''
|
|
}
|
|
]
|
|
},
|
|
{
|
|
'type': 2,
|
|
'name': 'Lugano 2014',
|
|
'tools': [
|
|
{
|
|
'name': '直径测量工具',
|
|
'icon': 'length',
|
|
'toolName': 'Length',
|
|
'i18nKey': 'trials:reading:button:length',
|
|
'isDisabled': false,
|
|
'disabledReason': ''
|
|
},
|
|
{
|
|
'name': '长短径测量工具',
|
|
'icon': 'bidirection',
|
|
'toolName': 'Bidirectional',
|
|
'i18nKey': 'trials:reading:button:bidirectional',
|
|
'isDisabled': false,
|
|
'disabledReason': ''
|
|
},
|
|
{
|
|
'name': '矩形工具',
|
|
'icon': 'rectangle',
|
|
'toolName': 'RectangleROI',
|
|
'i18nKey': 'trials:reading:button:rectangle',
|
|
'isDisabled': false,
|
|
'disabledReason': ''
|
|
},
|
|
{
|
|
'name': '箭头工具',
|
|
'icon': 'arrow',
|
|
'toolName': 'ArrowAnnotate',
|
|
'i18nKey': 'trials:reading:button:arrowAnnotate',
|
|
'isDisabled': false,
|
|
'disabledReason': ''
|
|
}
|
|
]
|
|
},
|
|
{
|
|
'type': 3,
|
|
'name': 'iRECIST',
|
|
'tools': [
|
|
{
|
|
'name': '直径测量工具',
|
|
'icon': 'length',
|
|
'toolName': 'Length',
|
|
'i18nKey': 'trials:reading:button:length',
|
|
'isDisabled': false,
|
|
'disabledReason': ''
|
|
},
|
|
{
|
|
'name': '长短径测量工具',
|
|
'icon': 'bidirection',
|
|
'toolName': 'Bidirectional',
|
|
'i18nKey': 'trials:reading:button:bidirectional',
|
|
'isDisabled': false,
|
|
'disabledReason': ''
|
|
},
|
|
{
|
|
'name': '矩形工具',
|
|
'icon': 'rectangle',
|
|
'toolName': 'RectangleROI',
|
|
'i18nKey': 'trials:reading:button:rectangle',
|
|
'isDisabled': false,
|
|
'disabledReason': ''
|
|
},
|
|
{
|
|
'name': '箭头工具',
|
|
'icon': 'arrow',
|
|
'toolName': 'ArrowAnnotate',
|
|
'i18nKey': 'trials:reading:button:arrowAnnotate',
|
|
'isDisabled': false,
|
|
'disabledReason': ''
|
|
}
|
|
]
|
|
},
|
|
{
|
|
'type': 7,
|
|
'name': 'mRECIST HCC',
|
|
'tools': [
|
|
{
|
|
'name': '直径测量工具',
|
|
'icon': 'length',
|
|
'toolName': 'Length',
|
|
'i18nKey': 'trials:reading:button:length',
|
|
'isDisabled': false,
|
|
'disabledReason': ''
|
|
},
|
|
{
|
|
'name': '长短径测量工具',
|
|
'icon': 'bidirection',
|
|
'toolName': 'Bidirectional',
|
|
'i18nKey': 'trials:reading:button:bidirectional',
|
|
'isDisabled': false,
|
|
'disabledReason': ''
|
|
},
|
|
{
|
|
'name': '矩形工具',
|
|
'icon': 'rectangle',
|
|
'toolName': 'RectangleROI',
|
|
'i18nKey': 'trials:reading:button:rectangle',
|
|
'isDisabled': false,
|
|
'disabledReason': ''
|
|
},
|
|
{
|
|
'name': '箭头工具',
|
|
'icon': 'arrow',
|
|
'toolName': 'ArrowAnnotate',
|
|
'i18nKey': 'trials:reading:button:arrowAnnotate',
|
|
'isDisabled': false,
|
|
'disabledReason': ''
|
|
}
|
|
]
|
|
},
|
|
{
|
|
'type': 10,
|
|
'name': 'PCWG3',
|
|
'tools': [
|
|
{
|
|
'name': '矩形工具',
|
|
'icon': 'rectangle',
|
|
'toolName': 'RectangleROI',
|
|
'i18nKey': 'trials:reading:button:rectangle',
|
|
'isDisabled': false,
|
|
'disabledReason': ''
|
|
},
|
|
{
|
|
'name': '箭头工具',
|
|
'icon': 'arrow',
|
|
'toolName': 'ArrowAnnotate',
|
|
'i18nKey': 'trials:reading:button:arrowAnnotate',
|
|
'isDisabled': false,
|
|
'disabledReason': ''
|
|
}
|
|
]
|
|
},
|
|
{
|
|
'type': 17,
|
|
'name': 'PCWG3',
|
|
'tools': [
|
|
{
|
|
'name': '直径测量工具',
|
|
'icon': 'length',
|
|
'toolName': 'Length',
|
|
'i18nKey': 'trials:reading:button:length',
|
|
'isDisabled': false,
|
|
'disabledReason': ''
|
|
},
|
|
{
|
|
'name': '矩形工具',
|
|
'icon': 'rectangle',
|
|
'toolName': 'RectangleROI',
|
|
'i18nKey': 'trials:reading:button:rectangle',
|
|
'isDisabled': false,
|
|
'disabledReason': ''
|
|
},
|
|
{
|
|
'name': '箭头工具',
|
|
'icon': 'arrow',
|
|
'toolName': 'ArrowAnnotate',
|
|
'i18nKey': 'trials:reading:button:arrowAnnotate',
|
|
'isDisabled': false,
|
|
'disabledReason': ''
|
|
}
|
|
]
|
|
},
|
|
{
|
|
'type': 19,
|
|
'name': 'IVUS定量评估',
|
|
'tools': []
|
|
},
|
|
{
|
|
'type': 20,
|
|
'name': 'OCT定量评估',
|
|
'tools': []
|
|
},
|
|
{
|
|
'type': 21,
|
|
'name': 'MRI-PDFF',
|
|
'tools': [
|
|
{
|
|
'name': '圆形测量',
|
|
'icon': 'oval',
|
|
'toolName': 'Probe',
|
|
'i18nKey': 'trials:reading:button:circle',
|
|
'isDisabled': false,
|
|
'disabledReason': ''
|
|
}
|
|
]
|
|
}
|
|
],
|
|
'customizeStandards': [
|
|
{
|
|
'name': '直径测量工具',
|
|
'icon': 'length',
|
|
'toolName': 'Length',
|
|
'props': ['length'],
|
|
'i18nKey': 'trials:reading:button:length',
|
|
'isDisabled': false,
|
|
'disabledReason': ''
|
|
},
|
|
{
|
|
'name': '长短径测量工具',
|
|
'icon': 'bidirection',
|
|
'toolName': 'Bidirectional',
|
|
'props': ['length', 'width'],
|
|
'i18nKey': 'trials:reading:button:bidirectional',
|
|
'isDisabled': false,
|
|
'disabledReason': ''
|
|
},
|
|
{
|
|
'name': '矩形工具',
|
|
'icon': 'rectangle',
|
|
'toolName': 'RectangleROI',
|
|
'props': ['area', 'mean', 'max', 'stdDev'],
|
|
'i18nKey': 'trials:reading:button:rectangle',
|
|
'isDisabled': false,
|
|
'disabledReason': ''
|
|
},
|
|
{
|
|
'name': '箭头工具',
|
|
'icon': 'arrow',
|
|
'toolName': 'ArrowAnnotate',
|
|
'props': [],
|
|
'i18nKey': 'trials:reading:button:arrowAnnotate',
|
|
'isDisabled': false,
|
|
'disabledReason': ''
|
|
},
|
|
{
|
|
'name': '椭圆工具',
|
|
'icon': 'oval',
|
|
'toolName': 'CircleROI',
|
|
'props': ['radius', 'area', 'mean', 'max', 'stdDev'],
|
|
'i18nKey': 'trials:reading:button:Circle',
|
|
'isDisabled': false,
|
|
'disabledReason': ''
|
|
},
|
|
{
|
|
'name': '角度工具',
|
|
'icon': 'angle',
|
|
'toolName': 'Angle',
|
|
'props': ['angle'],
|
|
'i18nKey': 'trials:reading:button:Angle',
|
|
'isDisabled': false,
|
|
'disabledReason': ''
|
|
},
|
|
{
|
|
'name': '角度工具',
|
|
'icon': 'cobb',
|
|
'toolName': 'CobbAngle',
|
|
'props': ['angle'],
|
|
'i18nKey': 'trials:reading:button:CobbAngle',
|
|
'isDisabled': false,
|
|
'disabledReason': ''
|
|
}
|
|
]
|
|
}
|
|
const getTools = (criterionType) => {
|
|
const standard = config.standards.find(s => s.type === criterionType)
|
|
return standard?.tools || []
|
|
}
|
|
const getCustomizeStandardsTools = (toolNames) => {
|
|
const filteredTools = config.customizeStandards.filter(item => toolNames.includes(item.toolName))
|
|
return filteredTools || []
|
|
}
|
|
export { config, getTools, getCustomizeStandardsTools }
|