Exemplo n.º 1
0
 def __init__(self, *args, **kwargs):
     """Initializer.
     """
     Vtk3dVisualizerNode.__init__(self, *args, **kwargs)
     self.renderer.GetActiveCamera().ParallelProjectionOn()
     self.particles_visual = ParticlesVisual(renderer=self.renderer,
                                             name='particles')
Exemplo n.º 2
0
 def __init__(self, *args, **kwargs):
     """Initializer.
     """
     Vtk3dVisualizerNode.__init__(self, *args, **kwargs)
     self.renderer.GetActiveCamera().ParallelProjectionOn()
     self.particles_visual = ParticlesVisual(
         renderer = self.renderer,
         name = 'particles')
Exemplo n.º 3
0
    def __init__(self, *args, **kwargs):
        """Initializer.
        """
        Vtk3dVisualizerNode.__init__(self, *args, **kwargs)
        self.renderer.GetActiveCamera().ParallelProjectionOn()
        self.particles_visual = ParticlesVisual(
            renderer=self.renderer, name='particles')

        self.view_scale = 1e-6
        self.sid_color_map = None
        self.time = 0
        self.index = 0
        self.max_index = 0
        self.__axes = None
Exemplo n.º 4
0
 def OnInit(self):
     """Initializer.
     """
     frame = wx.Frame(None, -1, u'DatasourcePanel Demo')
     # Node provides vtkRenderer.
     visualizer_node = Vtk3dVisualizerNode()
     # Panel provides wxVtkRenderWindowInteractor.
     visualizer_panel = Vtk3dVisualizerPage(frame,
                                            -1,
                                            target=visualizer_node)
     sizer = wx.BoxSizer()
     sizer.Add(visualizer_panel, 1, wx.ALL | wx.EXPAND, 5)
     frame.SetSizer(sizer)
     frame.Layout()
     frame.Show(True)
     self.SetTopWindow(frame)
     # configure renderer.
     renderer = visualizer_node.renderer
     source = vtk.vtkConeSource()
     source.SetResolution(64)
     mapper = vtk.vtkPolyDataMapper()
     mapper.SetInput(source.GetOutput())
     actor = vtk.vtkActor()
     actor.SetMapper(mapper)
     renderer.AddActor(actor)
     # add renderer to the window.
     visualizer_panel.add_renderer(renderer)
     return True
Exemplo n.º 5
0
 def OnInit(self):
     """Initializer.
     """
     frame = wx.Frame(None, -1, u'VisualizerPanel Demo', size=(-1, 600))
     visualizer_panel = VisualizerPanel(frame, -1)
     notebook = visualizer_panel.notebook
     sizer = wx.BoxSizer(wx.VERTICAL)
     sizer.Add(visualizer_panel, 1, wx.ALL | wx.EXPAND, 5)
     visualizer_node = Vtk3dVisualizerNode()
     notebook.create_page(Vtk3dVisualizerPage,
                          'VTK 3D',
                          target=visualizer_node)
     frame.SetSizer(sizer)
     frame.Layout()
     frame.Show(True)
     self.SetTopWindow(frame)
     return True