def __init__(self, caller): caller.imageObservers.append(self.UpdateObserver) self.region = Region() self.renSpline = Spline.RenderSpline() self.InitCurves() self.caller = caller
def Start(self): istyle = vtk.vtkInteractorStyleImage() istyle.AddObserver("LeftButtonPressEvent", self.Left) istyle.AddObserver("RightButtonPressEvent", self.Right) iren = Globals.renWin.GetInteractor() iren.SetInteractorStyle(istyle) self.spline = Spline.PlaneSpline() self.renSpline = Spline.RenderSpline(1) self.splineExists = 0
def InitCurves(self): self.renSpline.Hide() self.spline = Spline.PlaneSpline() self.renSpline = Spline.RenderSpline(1)