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

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

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

revision 839 by jongui, Wed Sep 6 04:53:50 2006 UTC revision 845 by jongui, Fri Sep 8 07:13:01 2006 UTC
# Line 11  class Contour(Common): Line 11  class Contour(Common):
11      Class that shows a scalar field by contour surfaces.      Class that shows a scalar field by contour surfaces.
12      """      """
13    
14      def __init__(self, scene, data_collector):      def __init__(self, scene, data_collector, lut = None):
15          """          """
16          @type scene: L{OpenScene <scene.Scene>} object          @type scene: L{Scene <scene.Scene>} object
17          @param 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
# Line 21  class Contour(Common): Line 21  class Contour(Common):
21          """          """
22    
23          Common.__init__(self, scene, data_collector)          Common.__init__(self, scene, data_collector)
24            self.vtk_contour = None
25          self.setContour()          self.setContour()
26    
27          Common.setMapper(self, "self.vtk_contour.GetOutput()")          Common.setMapper(self, "self.vtk_contour.GetOutput()", lut)
28          Common.setActor(self)          Common.setActor(self)
29          Common.addActor(self)          Common.addActor(self)
30    
# Line 61  class Contour(Common): Line 62  class Contour(Common):
62    
63          self.vtk_contour.GenerateValues(number_contours, min_range, max_range)          self.vtk_contour.GenerateValues(number_contours, min_range, max_range)
64    
65    from contour import Contour
66    from geo import Plane
67    
68  #class ContourOnPlane(Component):  class ContourOnPlane(Contour, Plane):
69  """      """
70  shows scalar data by contour surfaces on a given plane      Class that shows a scalar field by contour surfaces on a given plane.
71  """      """
72  pass  
73        def __init__(self, scene, data_collector, lut = None):
74            """
75            @type scene: L{Scene <scene.Scene>} object      
76            @param scene: Scene in which components rae to be added to
77            @type data_collector: L{DataCollector <datacollector.DataCollector>}
78                object
79            @param data_collector: Source of data for visualization
80            """
81    
82            Common.__init__(self, scene, data_collector)
83            self.setContour()
84    
85            Plane.__init__(self, scene, data_collector,
86                "self.vtk_contour.GetOutput()")

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

  ViewVC Help
Powered by ViewVC 1.1.26