def get_viewer():
    global _viewer
    if _viewer is None:
        # If no viewer has been created till this point in program
        # _create_viewer() is called and a new ivtk viewer is created
        _viewer = _create_viewer()
    else:
        try:
            _viewer.scene.render()
        except:
            # If the original ivtk window is destroyed when function
            # is called more than once an exception is raised so that
            # a new ivtk browser is created and returned.
            _viewer = _create_viewer()
    return _viewer
Creates and returns an ivtk viewer. If the fuction is called
dataset/ETHPy150Open enthought/mayavi/tvtk/tools/visual.py/get_viewer