📄 vtktkphotoimage.py
字号:
"""A subclass of Tkinter.PhotoImage that connects avtkImageData to a photo widget.Created by Daniel Blezek, August 2002"""import Tkinterfrom Tkinter import *from vtkpython import *from vtkLoadPythonTkWidgets import vtkLoadPythonTkWidgetsclass vtkTkPhotoImage ( Tkinter.PhotoImage ): """ A subclass of PhotoImage with helper functions for displaying vtkImageData """ def __init__ ( self, **kw ): # Caller the superclass Tkinter.PhotoImage.__init__ ( self, kw ) vtkLoadPythonTkWidgets ( self.tk ) def PutImageSlice ( self, image, z, orientation='transverse', window=256, level=128 ): t = image.__this__ s = 'vtkImageDataToTkPhoto %s %s %d %s %d %d' % ( t[:-2], self.name, z, orientation, window, level ) self.tk.eval ( s )
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -