Untitled

mail@pastecode.io avatar
unknown
typescript
a year ago
5.3 kB
5
Indexable
const buttons: IToolbarButton[] = [
        {
        id: 'ColorScheme',
        type: 'iris.selectAction',
        component: ToolbarSelect,
        props: {
            type: 'tool',
            name: 'ColorScheme',
            label: 'Color scheme',
            value: { value: 'WL', label: 'WL' },
            selectedSubmenu: {
                WL: 'WL Gray level',
                commands: [
                    {
                        commandName: 'setColorScheme',
                        commandOptions: { colorScheme: 'Grayscale' },
                        context: 'CORNERSTONE',
                    },
                ],
            },
            options: [
                {
                    value: 'WL',
                    label: 'WL',
                    submenu: [
                        {
                            ColorScheme: 'Grayscale',
                            key: 'WL Gray level',
                            description: 'WL Gray level',
                            commands: [
                                {
                                    commandName: 'setColorScheme',
                                    commandOptions: {
                                        colorScheme: 'Grayscale',
                                    },
                                    context: 'CORNERSTONE',
                                },
                            ],
                        },
                        {
                            ColorScheme: 'X Ray',
                            key: 'WL Gray level (invert)',
                            description: 'WL Gray level (invert)',
                            commands: [
                                {
                                    commandName: 'setColorScheme',
                                    commandOptions: { colorScheme: 'X Ray' },
                                    context: 'CORNERSTONE',
                                },
                            ],
                        },
                        {
                            ColorScheme: 'Spectrum_2D',
                            key: 'WL Spectrum 2D',
                            description: 'WL Spectrum 2D',
                            commands: [
                                {
                                    commandName: 'setColorScheme',
                                    commandOptions: {
                                        colorScheme: 'Spectrum_2D',
                                    },
                                    context: 'CORNERSTONE',
                                },
                            ],
                        },
                        {
                            ColorScheme: 'erdc_gold_BW',
                            key: 'WL Fabric',
                            description: 'WL Fabric',
                            commands: [
                                {
                                    commandName: 'setColorScheme',
                                    commandOptions: {
                                        colorScheme: 'erdc_gold_BW',
                                    },
                                    context: 'CORNERSTONE',
                                },
                            ],
                        },
                        {
                            ColorScheme: 'WL_PET_black_to_white',
                            key: 'WL PET',
                            description: 'WL PET',
                            commands: [
                                {
                                    commandName: 'setColorScheme',
                                    commandOptions: {
                                        colorScheme: 'WL_PET_black_to_white',
                                    },
                                    context: 'CORNERSTONE',
                                },
                            ],
                        },
                    ],
                },
                {
                    value: 'CT',
                    label: 'CT',
                    submenu: [
                        {
                            ColorScheme: 'CT_Bones',
                            key: 'CT Bones',
                            description: 'CT Bones',
                            commands: [
                                {
                                    commandName: 'setColorScheme',
                                    commandOptions: { colorScheme: 'CT_Bones' },
                                    context: 'CORNERSTONE',
                                },
                            ],
                        },
                        {
                            ColorScheme: 'CT_Lungs',
                            key: 'CT Lungs',
                            description: 'CT Lungs',
                            commands: [
                                {
                                    commandName: 'setColorScheme',
                                    commandOptions: { colorScheme: 'CT_Lungs' },
                                    context: 'CORNERSTONE',
                                },
                            ],
                        },
                    ],
                },
            ],
        },
    }
]