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

Annotation of /trunk/pyvisi/py_src/isosurface.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 860 - (hide annotations)
Thu Sep 28 08:17:29 2006 UTC (14 years, 3 months ago) by jongui
File MIME type: text/x-python
File size: 2686 byte(s)
- added sample drivers on how to use all of the currently available modules.
- completed the epydocs for all the currently available modules.
- added the rotation feature for camera and plane cutting.


1 gross 792 """
2 jongui 860 @author: John Ngui
3     @author: Lutz Gross
4 gross 792 """
5    
6 jongui 860 from contour import Contour
7 gross 792
8 jongui 860 class IsoSurface(Contour):
9     """
10     Class that shows the isosurface of a scalar field for a given value.
11     """
12    
13     def __init__(self, scene, data_collector, lut = None):
14     """
15     @type scene: L{Scene <scene.Scene>} object
16     @param scene: Scene in which components are to be added to
17     @type data_collector: L{DataCollector <datacollector.DataCollector>}
18     object
19     @param data_collector: Source of data for visualization
20     @type lut: L{BlueToRed <colormap.BlueToRed>} or
21     L{RedToBLue <colormap.RedToBlue>} object
22     @param lut: Lookup table to be used by the mapper
23     """
24    
25     Contour.__init__(self, scene, data_collector, lut)
26    
27     def setValue(self, contour_number, value):
28     """
29     Set the contour number and value.
30     @type contour_number: Number
31     @param contour_number: Contour number
32     @type value: Number
33     @param value: Contour value
34     """
35    
36     self.vtk_contour.SetValue(contour_number, value)
37    
38     from isosurface import IsoSurface
39     from contour import ContourOnPlane
40    
41     class IsoSurfaceOnPlane(IsoSurface, ContourOnPlane):
42     """
43     Class that shows the isosurface of a scalar field for a given value
44     on a plane.
45     """
46    
47     def __init__(self, scene, data_collector, transform, lut = None):
48     """
49     @type scene: L{Scene <scene.Scene>} object
50     @param scene: Scene in which components are to be added to
51     @type data_collector: L{DataCollector <datacollector.DataCollector>}
52     object
53     @param data_collector: Source of data for visualization
54     @type transform: L{Transform <geo.Transform>} object
55     @param transform: Orientation of the plane
56     @type lut: L{BlueToRed <colormap.BlueToRed>} or
57     L{RedToBLue <colormap.RedToBlue>} object
58     @param lut: Lookup table to be used by the mapper
59     """
60    
61     ContourOnPlane.__init__(self, scene, data_collector, transform, lut)
62    
63     from isosurface import IsoSurface
64     from contour import ContourOnClip
65    
66     class IsoSurfaceOnClip(IsoSurface, ContourOnClip):
67     """
68     Class that shows the isosurface of a scalar field for a given value
69     on a clip.
70     """
71    
72     def __init__(self, scene, data_collector, transform, lut = None):
73     """
74     @type scene: L{Scene <scene.Scene>} object
75     @param scene: Scene in which components are to be added to
76     @type data_collector: L{DataCollector <datacollector.DataCollector>}
77     object
78     @param data_collector: Source of data for visualization
79     @type transform: L{Transform <geo.Transform>} object
80     @param transform: Orientation of the plane
81     @type lut: L{BlueToRed <colormap.BlueToRed>} or
82     L{RedToBLue <colormap.RedToBlue>} object
83     @param lut: Lookup table to be used by the mapper
84     """
85    
86     ContourOnClip.__init__(self, scene, data_collector, transform, lut)
87    

  ViewVC Help
Powered by ViewVC 1.1.26