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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 845 - (show annotations)
Fri Sep 8 07:13:01 2006 UTC (14 years ago) by jongui
File MIME type: text/x-python
File size: 1413 byte(s)
Display an image is partially completed.

1 """
2 @author: John Ngui
3 @author: Lutz Gross
4 """
5
6 import vtk
7 from common import *
8
9 class Map(Common):
10 """
11 Class that shows a scalar field by a surface map.
12 """
13
14 def __init__(self, scene, data_collector, lut = None):
15 """
16 @type scene: L{Scene <scene.Scene>} object
17 @param scene: Scene in which components are to be added to
18 @type data_collector: L{DataCollector <datacollector.DataCollector>}
19 object
20 @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, scene, data_collector)
27 Common.setMapper(self, "self.data_collector.getReader().GetOutput()",
28 lut)
29 Common.setActor(self)
30 Common.addActor(self)
31
32
33 from map import Map
34 from geo import Plane
35
36 class MapOnPlane(Map, Plane):
37 """
38 Class that shows a scalar field on a given plane.
39 """
40
41 def __init__(self, scene, data_collector, lut = None):
42 """
43 @type scene: L{Scene <scene.Scene>} object
44 @param scene: Scene in which components are to be added to
45 @type data_collector: L{DataCollector <datacollector.DataCollector>}
46 object
47 @param data_collector: Source of data for visualzation
48 """
49
50 Common.__init__(self, scene, data_collector)
51
52 Plane.__init__(self, scene, data_collector,
53 "self.data_collector.getReader().GetOutput()")
54
55
56

  ViewVC Help
Powered by ViewVC 1.1.26