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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 996 - (hide annotations)
Mon Feb 26 03:43:13 2007 UTC (12 years, 5 months ago) by jongui
File MIME type: text/x-python
File size: 562 byte(s)
Updated the drivers. Setting the active scalar/vector/tensor is now done in the DataCollector. i.e. 
dc = DataCollector(...)
dc.setFileName(...)
dc.setActiveScalar(...)

The use of setActiveScalar / setActiveVector / setActiveTensor have to be done after the setFileName.
1 jongui 996 from esys.pyvisi import Scene, ImageReader, Image, GlobalPosition
2 jongui 962 from esys.pyvisi.constant import *
3    
4     s = Scene(renderer = Renderer.ONLINE, num_viewport = 1, x_size = 1000,
5     y_size = 800)
6    
7     # Create one image reader instance (used in place of data collector).
8     ir = ImageReader(ImageFormat.JPG)
9 jongui 992 ir.setFileName(file_name =
10 jongui 962 "/home/jongui/trunk/pyvisi/test/python/data_data/Flinders_eval.jpg")
11    
12     # Create one image instance.
13     i = Image(scene = s, image_reader = ir)
14 jongui 996 i.setOpacity(opacity = 0.9)
15     i.setPosition(GlobalPosition(-600,50.9,0.5))
16 jongui 962
17     s.render()
18    

  ViewVC Help
Powered by ViewVC 1.1.26