parameters: (self, master, cnf={}, **kw)
docstring: Constructor.
  
          Keyword arguments:
  
            iv -- Use passed image viewer instead of creating a new one.
  
            double -- If True, generate a double-buffered viewer.
            Defaults to False.
  
            focus_on_enter -- If True, use a focus-follows-mouse mode.
            Defaults to False where the widget will use a click-to-focus
            mode.
docstring_summary: Constructor.
docstring_tokens: Constructor .
function: def __init__(self, master, cnf={}, **kw):
          """
          Constructor.
  
          Keyword arguments:
  
            iv -- Use passed image viewer instead of creating a new one.
  
            double -- If True, generate a double-buffered viewer.
            Defaults to False.
  
            focus_on_enter -- If True, use a focus-follows-mouse mode.
            Defaults to False where the widget will use a click-to-focus
            mode.
          """
          # load the necessary extensions into tk
          vtkLoadPythonTkWidgets(master.tk)
  
          try: # use specified vtkImageViewer
              imageViewer = kw['iv']
          except KeyError: # or create one if none specified
              imageViewer = vtkImageViewer()
  
          doubleBuffer = 0
          try:
              if kw['double']:
                  doubleBuffer = 1
              del kw['double']
          except:
              pass
  
          # check if focus should follow mouse
          if kw.get('focus_on_enter'):
              self._FocusOnEnter = 1
              del kw['focus_on_enter']
          else:
              self._FocusOnEnter = 0
  
          kw['iv'] = imageViewer.GetAddressAsString("vtkImageViewer")
          tkinter.Widget.__init__(self, master, 'vtkTkImageViewerWidget',
                                  cnf, kw)
          if doubleBuffer:
              imageViewer.GetRenderWindow().DoubleBufferOn()
  
          self.BindTkImageViewer()
function_tokens: def __init__ ( self , master , cnf = { } , * * kw ) : # load the necessary extensions into tk vtkLoadPythonTkWidgets ( master . tk ) try : # use specified vtkImageViewer imageViewer = kw [ 'iv' ] except KeyError : # or create one if none specified imageViewer = vtkImageViewer ( ) doubleBuffer = 0 try : if kw [ 'double' ] : doubleBuffer = 1 del kw [ 'double' ] except : pass # check if focus should follow mouse if kw . get ( 'focus_on_enter' ) : self . _FocusOnEnter = 1 del kw [ 'focus_on_enter' ] else : self . _FocusOnEnter = 0 kw [ 'iv' ] = imageViewer . GetAddressAsString ( "vtkImageViewer" ) tkinter . Widget . __init__ ( self , master , 'vtkTkImageViewerWidget' , cnf , kw ) if doubleBuffer : imageViewer . GetRenderWindow ( ) . DoubleBufferOn ( ) self . BindTkImageViewer ( )