def __init__(self):
        GtkGLExtVTKRenderWindowInteractor.__init__(self)
        EventHandler().attach(self)
        self.interactButtons = (1,2,3)
        self.renderOn = 1
        self.Initialize()
        self.Start()

        self.renderer = vtk.vtkRenderer()
        self.renWin = self.GetRenderWindow()
        self.renWin.AddRenderer(self.renderer)
        self.interactor = self.renWin.GetInteractor()
        #self.camera = self.renderer.GetActiveCamera()

        
        self.pressFuncs = {1 : self._Iren.LeftButtonPressEvent,
                           2 : self._Iren.MiddleButtonPressEvent,
                           3 : self._Iren.RightButtonPressEvent}
        self.releaseFuncs = {1 : self._Iren.LeftButtonReleaseEvent,
                             2 : self._Iren.MiddleButtonReleaseEvent,
                             3 : self._Iren.RightButtonReleaseEvent}

        self.pressHooks = {}
        self.releaseHooks = {}
        self.lastLabel = None

        self.vtk_interact_mode = False
    def __init__(self):
        GtkGLExtVTKRenderWindowInteractor.__init__(self)
        EventHandler().attach(self) #this class works very closely with the event handler. 
	#the attach function makes the markerwindowinteractor an observer in the event_handler class's observer dictionary, s.t. when an object-related 		event calls notify in the event_handler, the event handler can use the observer to call the correct update_viewer function for the object.
        self.interactButtons = (1,2,3)
        self.renderOn = 1
        self.Initialize()
        self.Start()

        self.renderer = vtk.vtkRenderer()
        self.renWin = self.GetRenderWindow() #from GtkGLExtVTKRenderWindowInteractor.py, returns a vtk.vtkrenderwindow
        self.renWin.AddRenderer(self.renderer) #attach the vtk.vtkRenderer to the vtk.vtkrenderwindow
        self.interactor = self.renWin.GetInteractor()
        #self.camera = self.renderer.GetActiveCamera()

        #where _Iren is the vtk render window interactor defined and used in gtkglextvtkrenderwindowinteractor
        self.pressFuncs = {1 : self._Iren.LeftButtonPressEvent,
                           2 : self._Iren.MiddleButtonPressEvent,
                           3 : self._Iren.RightButtonPressEvent}
        self.releaseFuncs = {1 : self._Iren.LeftButtonReleaseEvent,
                             2 : self._Iren.MiddleButtonReleaseEvent,
                             3 : self._Iren.RightButtonReleaseEvent}

        self.pressHooks = {}
        self.releaseHooks = {}
        self.lastLabel = None

        self.vtk_interact_mode = False
Пример #3
0
    def __init__(self):
        GtkGLExtVTKRenderWindowInteractor.__init__(self)
        EventHandler().attach(self)
        self.interactButtons = (1, 2, 3)
        self.renderOn = 1
        self.Initialize()
        self.Start()

        self.renderer = vtk.vtkRenderer()
        self.renWin = self.GetRenderWindow()
        self.renWin.AddRenderer(self.renderer)
        self.interactor = self.renWin.GetInteractor()
        #self.camera = self.renderer.GetActiveCamera()

        self.pressFuncs = {
            1: self._Iren.LeftButtonPressEvent,
            2: self._Iren.MiddleButtonPressEvent,
            3: self._Iren.RightButtonPressEvent
        }
        self.releaseFuncs = {
            1: self._Iren.LeftButtonReleaseEvent,
            2: self._Iren.MiddleButtonReleaseEvent,
            3: self._Iren.RightButtonReleaseEvent
        }

        self.pressHooks = {}
        self.releaseHooks = {}
        self.lastLabel = None

        self.vtk_interact_mode = False
Пример #4
0
    def __init__(self, imageData=None):
        GtkGLExtVTKRenderWindowInteractor.__init__(self)
        EventHandler().attach(self)

        self.Initialize()
        self.Start()
        self.renderOn = True
        
        self.renderer = vtk.vtkRenderer()
        self.renWin = self.GetRenderWindow()
        self.renWin.AddRenderer(self.renderer)
        self.interactor = self.renWin.GetInteractor()
        self.renderer.SetBackground(0,0,0)
        self.textActors = {}
Пример #5
0
    def __init__(self, imageData=None):
        GtkGLExtVTKRenderWindowInteractor.__init__(self)
        EventHandler().attach(self)

        self.Initialize()
        self.Start()
        self.renderOn = True

        self.renderer = vtk.vtkRenderer()
        self.renWin = self.GetRenderWindow()
        self.renWin.AddRenderer(self.renderer)
        self.interactor = self.renWin.GetInteractor()
        self.renderer.SetBackground(0, 0, 0)
        self.textActors = {}
    def __init__(self):
        GtkGLExtVTKRenderWindowInteractor.__init__(self)
        EventHandler().attach(
            self)  #this class works very closely with the event handler.
        #the attach function makes the markerwindowinteractor an observer in the event_handler class's observer dictionary, s.t. when an object-related 		event calls notify in the event_handler, the event handler can use the observer to call the correct update_viewer function for the object.
        self.interactButtons = (1, 2, 3)
        self.renderOn = 1
        self.Initialize()
        self.Start()

        self.renderer = vtk.vtkRenderer()
        self.renWin = self.GetRenderWindow(
        )  #from GtkGLExtVTKRenderWindowInteractor.py, returns a vtk.vtkrenderwindow
        self.renWin.AddRenderer(
            self.renderer
        )  #attach the vtk.vtkRenderer to the vtk.vtkrenderwindow
        self.interactor = self.renWin.GetInteractor()
        #self.camera = self.renderer.GetActiveCamera()

        #where _Iren is the vtk render window interactor defined and used in gtkglextvtkrenderwindowinteractor
        self.pressFuncs = {
            1: self._Iren.LeftButtonPressEvent,
            2: self._Iren.MiddleButtonPressEvent,
            3: self._Iren.RightButtonPressEvent
        }
        self.releaseFuncs = {
            1: self._Iren.LeftButtonReleaseEvent,
            2: self._Iren.MiddleButtonReleaseEvent,
            3: self._Iren.RightButtonReleaseEvent
        }

        self.pressHooks = {}
        self.releaseHooks = {}
        self.lastLabel = None

        self.vtk_interact_mode = False
 def Render(self):
     if self.renderOn:
         #print "render on: MarkerWindowInteractor.Render()!! uhh classname is?" , str(self.__class__)
         GtkGLExtVTKRenderWindowInteractor.Render(self)
Пример #8
0
 def Render(self):
     if self.renderOn:
         GtkGLExtVTKRenderWindowInteractor.Render(self)