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

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

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

revision 838 by jongui, Mon Sep 4 22:20:28 2006 UTC revision 839 by jongui, Wed Sep 6 04:53:50 2006 UTC
# Line 1  Line 1 
1  """  """
2  Class that shows a scalar field by a surface map.  @author: John Ngui
3    @author: Lutz Gross
4  """  """
5    
6  import vtk  import vtk
# Line 7  from common import * Line 8  from common import *
8    
9  class Map(Common):  class Map(Common):
10      """      """
11      @author: John Ngui      Class that shows a scalar field by a surface map.
     @author: Lutz Gross  
12      """      """
13    
14      def __init__(self, open_scene, data_collector):      def __init__(self, scene, data_collector, lut = None):
15          """          """
16          @type open_scene: L{OpenScene <openscene.OpenScene>} object          @type scene: L{OpenScene <scene.Scene>} object
17          @param open_scene: Scene in which components are to be added to          @param scene: Scene in which components are to be added to
18          @type data_collector: L{DataCollector <datacollector.DataCollector>}          @type data_collector: L{DataCollector <datacollector.DataCollector>}
19              object              object
20          @param data_collector: Source of data for visualization          @param data_collector: Source of data for visualization
21            @type lut: L{BlueToRed <colormap.BlueToRed>} object or
22                L{RedToBlue <colormap.RedToBlue>} object
23            @param lut: Color lookup tabl to be used by the mapper
24          """          """
25    
26          Common.__init__(self, open_scene, data_collector)          Common.__init__(self, scene, data_collector)
27          Common.setMapper(self, "self.data_collector.getReader().GetOutput()")          Common.setMapper(self, "self.data_collector.getReader().GetOutput()",
28                lut)
29          Common.setActor(self)          Common.setActor(self)
30          Common.addActor(self)          Common.addActor(self)
31    

Legend:
Removed from v.838  
changed lines
  Added in v.839

  ViewVC Help
Powered by ViewVC 1.1.26