/[escript]/trunk/pyvisi/py_src/examples/image.py
ViewVC logotype

Contents of /trunk/pyvisi/py_src/examples/image.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1029 - (show annotations)
Wed Mar 14 05:01:13 2007 UTC (12 years, 5 months ago) by jongui
File MIME type: text/x-python
File size: 978 byte(s)
Fixed problems in relation to updates propagating when multiple files/sources are read.
1 from esys.pyvisi import Scene, ImageReader, Image, GlobalPosition,\
2 DataCollector, Map
3 from esys.pyvisi.constant import *
4
5 s = Scene(renderer = Renderer.ONLINE, num_viewport = 1, x_size = 1000,
6 y_size = 800)
7
8 dc1 = DataCollector(source = Source.XML)
9 dc1.setFileName(file_name =
10 "/home/jongui/trunk/pyvisi/test/python/data_data/interior_3D.xml")
11
12 # Create a map instance for the first viewport.
13 m1 = Map(scene = s, data_collector = dc1, viewport = Viewport.SOUTH_WEST,
14 lut = Lut.COLOR, outline = True)
15 m1.setOpacity(0.1)
16
17 # Create one image reader instance (used in place of data collector).
18 ir = ImageReader(ImageFormat.JPG)
19 ir.setImageName(image_name =
20 "/home/jongui/trunk/pyvisi/test/python/data_data/Flinders_eval.jpg")
21
22
23 # Create one image instance.
24 i = Image(scene = s, image_reader = ir)
25 #i.setOpacity(opacity = 0.9)
26 i.translate(0,0,1.)
27 #i.rotateX(20)
28 i.setPoint1(GlobalPosition(3,0,0))
29 i.setPoint2(GlobalPosition(0,3,0))
30
31 s.render()
32

  ViewVC Help
Powered by ViewVC 1.1.26