/[escript]/trunk/pyvisi/py_src/scene.py
ViewVC logotype

Diff of /trunk/pyvisi/py_src/scene.py

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

revision 1189 by jongui, Thu Jun 7 05:31:25 2007 UTC revision 1190 by jongui, Fri Jun 8 05:47:25 2007 UTC
# Line 3  Line 3 
3  """  """
4    
5  import vtk  import vtk
6  from constant import Renderer, Color, Viewport  from constant import Renderer, Color, Viewport, ImageFormat
7    
8  class Scene:  class Scene:
9      """      """
# Line 37  class Scene: Line 37  class Scene:
37          self.__visualization_modules = []          self.__visualization_modules = []
38    
39          self.__OFFLINE = "offline"          self.__OFFLINE = "offline"
         self.__JPG = "jpg"  
         self.__BMP = "bmp"  
         self.__PNM = "pnm"  
         self.__PNG = "png"  
         self.__TIF = "tif"  
         self.__PS  = "ps"  
40          self.__VRML = "vrml"          self.__VRML = "vrml"
41          self.__IV = "iv"          self.__IV = "iv"
42            
# Line 191  class Scene: Line 185  class Scene:
185          @return: Image writer or exporter          @return: Image writer or exporter
186          """          """
187    
188          if(self.__renderer.endswith(self.__JPG)):          if(self.__renderer.endswith(ImageFormat.JPG)):
189              return vtk.vtkJPEGWriter()              return vtk.vtkJPEGWriter()
190          elif(self.__renderer.endswith(self.__BMP)):          elif(self.__renderer.endswith(ImageFormat.BMP)):
191              return vtk.vtkBMPWriter()              return vtk.vtkBMPWriter()
192          elif(self.__renderer.endswith(self.__PNM)):          elif(self.__renderer.endswith(ImageFormat.PNM)):
193              return vtk.vtkPNMWriter()              return vtk.vtkPNMWriter()
194          elif(self.__renderer.endswith(self.__PNG)):          elif(self.__renderer.endswith(ImageFormat.PNG)):
195              return vtk.vtkPNGWriter()              return vtk.vtkPNGWriter()
196          elif(self.__renderer.endswith(self.__TIF)):          elif(self.__renderer.endswith(ImageFormat.TIF)):
197              return vtk.vtkTIFFWriter()              return vtk.vtkTIFFWriter()
198          elif(self.__renderer.endswith(self.__PS)):          elif(self.__renderer.endswith(ImageFormat.PS)):
199              return vtk.vtkPostScriptWriter()              return vtk.vtkPostScriptWriter()
200          elif(self.__renderer.endswith(self.__VRML)):          elif(self.__renderer.endswith(self.__VRML)):
201              return vtk.vtkVRMLExporter() # Generates VRML files (.wrl).              return vtk.vtkVRMLExporter() # Generates VRML files (.wrl).

Legend:
Removed from v.1189  
changed lines
  Added in v.1190

  ViewVC Help
Powered by ViewVC 1.1.26