DESKTOP-6C3NK6N\WXS 2024-07-30 10:43:24 +08:00
parent 535d30b6df
commit 2e11c881f5
1 changed files with 185 additions and 185 deletions

View File

@ -872,192 +872,192 @@ export default {
this.setAllToolsPassive() this.setAllToolsPassive()
}, },
onContextmenu(event) { onContextmenu(event) {
const colormapsList = cornerstone.colors.getColormapsList() // const colormapsList = cornerstone.colors.getColormapsList()
const colorItems = [] // const colorItems = []
colorItems.push({ // colorItems.push({
label: '默认值', // label: '',
onClick: () => { // onClick: () => {
this.setColormap() // this.setColormap()
} // }
}) // })
colormapsList.forEach(colormap => { // colormapsList.forEach(colormap => {
const item = {} // const item = {}
item.label = colormap.name // item.label = colormap.name
item.onClick = () => { // item.onClick = () => {
this.setColormap(colormap.id) // this.setColormap(colormap.id)
} // }
colorItems.push(item) // colorItems.push(item)
}) // })
this.$contextmenu({ // this.$contextmenu({
items: [ // items: [
{ // {
label: '移动', // label: '',
divided: true, // divided: true,
onClick: () => { // onClick: () => {
this.setToolActive('Pan') // this.setToolActive('Pan')
} // }
}, // },
{ // {
label: '缩放', // label: '',
divided: true, // divided: true,
children: [ // children: [
{ // {
label: '自由缩放', // label: '',
onClick: () => { // onClick: () => {
this.setToolActive('Zoom') // this.setToolActive('Zoom')
} // }
}, // },
{ // {
label: '适应图像', // label: '',
onClick: () => { // onClick: () => {
this.fitToWindow() // this.fitToWindow()
} // }
}, // },
{ // {
label: '适应窗口', // label: '',
onClick: () => { // onClick: () => {
this.fitToImage() // this.fitToImage()
} // }
} // }
] // ]
}, // },
{ // {
label: '透镜', // label: '',
divided: true, // divided: true,
onClick: () => { // onClick: () => {
this.setToolActive('Magnify') // this.setToolActive('Magnify')
} // }
}, // },
{ // {
label: '旋转', // label: '',
divided: true, // divided: true,
children: [ // children: [
{ // {
label: '默认值', // label: '',
onClick: () => { // onClick: () => {
this.resetRotate() // this.resetRotate()
} // }
}, // },
{ // {
label: '自由旋转', // label: '',
onClick: () => { // onClick: () => {
this.setToolActive('Rotate') // this.setToolActive('Rotate')
} // }
}, // },
{ // {
label: '水平翻转', // label: '',
onClick: () => { // onClick: () => {
this.setRotate(true, false, 0) // this.setRotate(true, false, 0)
} // }
}, // },
{ // {
label: '垂直翻转', // label: '',
onClick: () => { // onClick: () => {
this.setRotate(false, true, 0) // this.setRotate(false, true, 0)
} // }
}, // },
{ // {
label: '左转90度', // label: '90',
onClick: () => { // onClick: () => {
this.setRotate(false, false, -90) // this.setRotate(false, false, -90)
} // }
}, // },
{ // {
label: '右转90度', // label: '90',
onClick: () => { // onClick: () => {
this.setRotate(false, false, 90) // this.setRotate(false, false, 90)
} // }
} // }
] // ]
}, // },
{ // {
label: '测量', // label: '',
divided: true, // divided: true,
minWidth: 0, // minWidth: 0,
children: [ // children: [
{ // {
label: '探针', // label: '',
onClick: () => { // onClick: () => {
this.setToolActive('Probe') // this.setToolActive('Probe')
} // }
}, // },
{ // {
label: '长度测量', // label: '',
onClick: () => { // onClick: () => {
this.setToolActive('Length') // this.setToolActive('Length')
} // }
}, // },
{ // {
label: '角度测量', // label: '',
onClick: () => { // onClick: () => {
this.setToolActive('Angle') // this.setToolActive('Angle')
} // }
}, // },
{ // {
label: 'Cobb测量', // label: 'Cobb',
onClick: () => { // onClick: () => {
this.setToolActive('CobbAngle') // this.setToolActive('CobbAngle')
} // }
}, // },
{ // {
label: '椭圆测量', // label: '',
onClick: () => { // onClick: () => {
this.setToolActive('EllipticalRoi') // this.setToolActive('EllipticalRoi')
} // }
}, // },
{ // {
label: '矩形测量', // label: '',
onClick: () => { // onClick: () => {
this.setToolActive('RectangleRoi') // this.setToolActive('RectangleRoi')
} // }
}, // },
{ // {
label: '多边形标记', // label: '',
onClick: () => { // onClick: () => {
this.setToolActive('FreehandRoi') // this.setToolActive('FreehandRoi')
} // }
}, // },
{ // {
label: '十字线', // label: '线',
onClick: () => { // onClick: () => {
this.setToolActive('Bidirectional') // this.setToolActive('Bidirectional')
} // }
}, // },
{ // {
label: '文字标注', // label: '',
onClick: () => { // onClick: () => {
this.setToolActive('ArrowAnnotate') // this.setToolActive('ArrowAnnotate')
} // }
} // }
] // ]
}, // },
{ // {
label: '调窗', // label: '',
divided: true, // divided: true,
onClick: () => { // onClick: () => {
this.setToolActive('Wwwc') // this.setToolActive('Wwwc')
} // }
}, // },
{ // {
label: '反色', // label: '',
divided: true, // divided: true,
onClick: () => { // onClick: () => {
this.toggleInvert() // this.toggleInvert()
} // }
}, // },
{ // {
label: '伪彩', // label: '',
children: colorItems // children: colorItems
} // }
], // ],
event, // event,
// x: event.clientX, // // x: event.clientX,
// y: event.clientY, // // y: event.clientY,
customClass: 'class-a', // customClass: 'class-a',
zIndex: 3, // zIndex: 3,
minWidth: 100 // minWidth: 100
}) // })
return false return false
}, },
getToolSate() { getToolSate() {