/[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 828 - (show annotations)
Wed Aug 30 07:52:35 2006 UTC (14 years, 7 months ago) by jongui
File MIME type: text/x-python
File size: 1687 byte(s)
Tidy up the codes to include inheritance of common features for reusability. Also added options to change opacity, scale factor, color mode and contour values.

1 """
2 class that shows scalar data by color on the domain surface
3
4 @var __author__: name of author
5 @var __license__: licence agreement
6 @var __copyright__: copyrights
7 @var __url__: url entry point on documentation
8 @var __version__: version
9 @var __date__: date of the version
10 """
11 __copyright__=""" Copyright (c) 2006 by ACcESS MNRF
12 http://www.access.edu.au
13 Primary Business: Queensland, Australia"""
14 __license__="""Licensed under the Open Software License version 3.0
15 http://www.opensource.org/licenses/osl-3.0.php"""
16 __author__="Paul Cochrane, L. Gross"
17 __url__="http://www.iservo.edu.au/esys"
18 __version__="$Revision:$"
19 __date__="$Date:$"
20
21 import vtk
22 from common import *
23
24 class Map(Common):
25
26 def __init__(self, open_scene, data_collector):
27 Common.__init__(self, open_scene, data_collector)
28 #self.open_scene = open_scene
29 #self.data_collector = data_collector
30 #self.vtk_xml_mapper = None
31 #self.vtk_xml_actor = None
32
33 #self.setMapper()
34 #self.setActor()
35 Common.setMapper(self, "self.data_collector.getReader().GetOutput()")
36 Common.setActor(self)
37 Common.addActor(self)
38
39
40
41
42 # set up the mapper and data
43 #def setMapper(self):
44
45 #self.vtk_xml_mapper = vtk.vtkDataSetMapper()
46 #self.vtk_xml_mapper.SetInput(
47 # self.data_collector.getReader().GetOutput())
48
49 # set up the actor and add the actor to the scene
50 #def setActor(self):
51 #self.vtk_xml_actor = vtk.vtkActor()
52 #self.vtk_xml_actor.SetMapper(self.vtk_xml_mapper)
53 #self.vtk_xml_actor.GetProperty().SetOpacity(0.2)
54
55 #self.open_scene.getRenderer().AddActor(self.vtk_xml_actor)
56
57
58
59 """
60 class MapOnPlane():
61 shows scalar data by color on a given plane
62 """
63 pass

  ViewVC Help
Powered by ViewVC 1.1.26