/[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 845 by jongui, Fri Sep 8 07:13:01 2006 UTC revision 849 by jongui, Fri Sep 15 07:11:55 2006 UTC
# 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          self.vtk_contour = vtk.vtkContourFilter()
25          self.setContour()          self.setContour()
26    
27          Common.setMapper(self, "self.vtk_contour.GetOutput()", lut)          Common.setMapperInput(self, self.vtk_contour.GetOutput(), lut)
28          Common.setActor(self)          Common.setActorInput(self)
29          Common.addActor(self)          Common.addActor(self)
30    
31      def setContour(self):      def setContour(self):
# Line 33  class Contour(Common): Line 33  class Contour(Common):
33          Set up the contour and its input.          Set up the contour and its input.
34          """          """
35    
         self.vtk_contour = vtk.vtkContourFilter()  
36          self.vtk_contour.SetInput(self.data_collector.getReader().GetOutput())          self.vtk_contour.SetInput(self.data_collector.getReader().GetOutput())
37    
38      def setValue(self, contour_number, value):      def setValue(self, contour_number, value):
# Line 63  class Contour(Common): Line 62  class Contour(Common):
62          self.vtk_contour.GenerateValues(number_contours, min_range, max_range)          self.vtk_contour.GenerateValues(number_contours, min_range, max_range)
63    
64  from contour import Contour  from contour import Contour
65  from geo import Plane  from plane import Plane
66    
67  class ContourOnPlane(Contour, Plane):  class ContourOnPlane(Contour, Plane):
68      """      """
# Line 79  class ContourOnPlane(Contour, Plane): Line 78  class ContourOnPlane(Contour, Plane):
78          @param data_collector: Source of data for visualization          @param data_collector: Source of data for visualization
79          """          """
80    
81          Common.__init__(self, scene, data_collector)          self.data_collector = data_collector
82          self.setContour()          self.vtk_contour = vtk.vtkContourFilter()
83            Contour.setContour(self)
84    
85          Plane.__init__(self, scene, data_collector,          Plane.__init__(self, scene, data_collector,
86              "self.vtk_contour.GetOutput()")              self.vtk_contour.GetOutput(), lut)

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

  ViewVC Help
Powered by ViewVC 1.1.26