/[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 1196 by jongui, Fri Jun 8 05:47:25 2007 UTC revision 1197 by jongui, Mon Jun 18 02:08:34 2007 UTC
# Line 1  Line 1 
1  """  """
2  @author: John NGUI  @var __author__: name of author
3    @var __copyright__: copyrights
4    @var __license__: licence agreement
5    @var __url__: url entry point on documentation
6    @var __version__: version
7    @var __date__: date of the version
8  """  """
9    
10    __author__="John Ngui, john.ngui@uq.edu.au"
11    __copyright__="""  Copyright (c) 2006 by ACcESS MNRF
12                        http://www.access.edu.au
13                    Primary Business: Queensland, Australia"""
14    __license__="""Licensed under the Open Software License version 3.0
15                 http://www.opensource.org/licenses/osl-3.0.php"""
16    __url__="http://www.iservo.edu.au/esys"
17    __version__="$Revision$"
18    __date__="$Date$"
19    
20    
21  import vtk  import vtk
22  from constant import Renderer, Color, Viewport, ImageFormat  from constant import Renderer, Color, Viewport, ImageFormat
23    
# Line 164  class Scene: Line 180  class Scene:
180          """          """
181          Enables the offline rendering (no window comes up).          Enables the offline rendering (no window comes up).
182          """          """
183    
184          # Enables the offscreen rendering.          # Enables the offscreen rendering.
185          self.__vtk_render_window.OffScreenRenderingOn()          self.__vtk_render_window.OffScreenRenderingOn()
186    
# Line 172  class Scene: Line 189  class Scene:
189          Setup the window to image filter to convert the output from the render          Setup the window to image filter to convert the output from the render
190          window into an image.          window into an image.
191          """          """
192    
193          self.__vtk_window_to_image = vtk.vtkWindowToImageFilter()          self.__vtk_window_to_image = vtk.vtkWindowToImageFilter()
194          self.__vtk_window_to_image.SetInput(self.__vtk_render_window)          self.__vtk_window_to_image.SetInput(self.__vtk_render_window)
195          self.__vtk_image_writer = self.__getImageWriter()          self.__vtk_image_writer = self.__getImageWriter()
# Line 243  class Scene: Line 261  class Scene:
261      def render(self, image_name = None):      def render(self, image_name = None):
262          """          """
263          Render the object using either the online, offline or display mode.          Render the object using either the online, offline or display mode.
264    
265            @type image_name: String
266            @param image_name: Name of the saved image.
267          """          """
268    
269          for i in range(0, len(self.__visualization_modules)):          for i in range(0, len(self.__visualization_modules)):
270              self.__visualization_modules[i]._render(self)                self.__visualization_modules[i]._render(self)  
271              self.__vtk_render_window.Render()              self.__vtk_render_window.Render()

Legend:
Removed from v.1196  
changed lines
  Added in v.1197

  ViewVC Help
Powered by ViewVC 1.1.26