Class: Vtk::TkPhotoImage
- Inherits:
-
TkPhotoImage
- Object
- TkPhotoImage
- Vtk::TkPhotoImage
- Defined in:
- lib/VTK/tk/vtkTkPhotoImage.rb
Instance Method Summary collapse
-
#initialize(kw = {}) ⇒ TkPhotoImage
constructor
A subclass of PhotoImage with helper functions A subend for displaying vtkImageData.
- #PutImageSlice(image, z, options = {}) ⇒ Object
Constructor Details
#initialize(kw = {}) ⇒ TkPhotoImage
A subclass of PhotoImage with helper functions
A subend
for displaying vtkImageData
16 17 18 19 20 |
# File 'lib/VTK/tk/vtkTkPhotoImage.rb', line 16 def initialize( kw={} ) # Caller the superclass super( kw ) Vtk.LoadRubyTkWidgets end |
Instance Method Details
#PutImageSlice(image, z, options = {}) ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/VTK/tk/vtkTkPhotoImage.rb', line 21 def PutImageSlice ( image, z, ={} ) = { 'orientation'=>'transverse', 'window'=>256, 'level'=>128 } .update( ) = t = "_"+image.GetAddressAsString('vtkImageData')[5..-1]+"_"+image.GetClassName Tk.tk_call("vtkImageDataToTkPhoto", t, @path, "%d"%z, ['orientation'], "%d"%['window'], "%d"%['level']) end |