1 |
""" |
2 |
@author: John Ngui |
3 |
@author: Lutz Gross |
4 |
""" |
5 |
|
6 |
from contour import Contour |
7 |
|
8 |
class IsoSurface(Contour): |
9 |
""" |
10 |
Class that shows a scalar field for a given value by an isosurface. |
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 a scalar field for a given value by an isosurface |
44 |
on a given 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 a scalar field for a given value by an isosurface |
69 |
on a given 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 |
|