/[escript]/trunk/pyvisi_old/examples/vtkDataLoadExample.py
ViewVC logotype

Diff of /trunk/pyvisi_old/examples/vtkDataLoadExample.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 819 by gross, Tue Jul 25 04:58:05 2006 UTC revision 820 by gross, Mon Aug 28 06:55:36 2006 UTC
# Line 71  else: Line 71  else:
71      _renderer.SetBackground(1,1,1)      _renderer.SetBackground(1,1,1)
72            
73      # load the vtk file      # load the vtk file
74      _dataReader = vtk.vtkDataSetReader()      _dataReader = vtk.vtkXMLUnstructuredGridReader()
75      #_dataReader.SetFileName("Flinders_ranges.vtk")      #_dataReader.SetFileName("Flinders_ranges.vtk")
76      _dataReader.SetFileName("t.vtk")      _dataReader.SetFileName("/home/gross/tmp/jump_final_precon.xml")
77            
78      # set up the data      # set up the data
79      _dataMapper = vtk.vtkDataSetMapper()      # _dataMapper = vtk.vtkDataSetMapper()
80      _dataMapper.SetInput(_dataReader.GetOutput())      # _dataMapper.SetInput(_dataReader.GetOutput())
81      _dataMapper.ScalarVisibilityOff()  # what exactly does this do?      # _dataMapper.ScalarVisibilityOff()  # what exactly does this do?
82    
83        _plotContour = vtk.vtkContourGrid()
84        _plotContour.SetInput(_dataReader.GetOutput())
85        # _plotContour.GenerateValues(5)
86    
87    
88      # set up the actor for viewing it      # set up the actor for viewing it
89      _dataActor = vtk.vtkActor()      _dataActor = vtk.vtkActor()
90      _dataActor.SetMapper(_dataMapper)      _dataActor.SetMapper(_plotContour)
91      _dataActor.GetProperty().SetColor(0.2,0.2,0.2)      _dataActor.GetProperty().SetColor(0.2,0.2,0.2)
92      _dataActor.GetProperty().SetRepresentationToWireframe()      _dataActor.GetProperty().SetRepresentationToWireframe()
93            
# Line 96  else: Line 101  else:
101      _renderWindow.Render()      _renderWindow.Render()
102      _iRenderer.Start()      _iRenderer.Start()
103    
104      raw_input("Press enter to continue")      # raw_input("Press enter to continue")
105    
106  # vim: expandtab shiftwidth=4:  # vim: expandtab shiftwidth=4:

Legend:
Removed from v.819  
changed lines
  Added in v.820

  ViewVC Help
Powered by ViewVC 1.1.26