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

Annotation of /trunk/pyvisi/py_src/logo.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1110 - (hide annotations)
Thu Apr 19 05:24:28 2007 UTC (15 years, 11 months ago) by jongui
File MIME type: text/x-python
File size: 1332 byte(s)
Some test for the logo.
1 jongui 1108 """
2     @author: John NGUI
3     """
4    
5     import vtk
6     from mapper import ImageMapper
7     from imagereslice import ImageReslice
8     from actor import Actor2D
9     from constant import Viewport
10    
11     # NOTE: ImageMapper, ImageReslice and Actor2D were inherited to allow access
12     # to their public methods from the driver.
13     class Logo(ImageMapper, ImageReslice, Actor2D):
14     """
15 jongui 1110 Class that displays a static image in particular a logo
16     (i.e. company symbol) which has NO interaction capability.
17 jongui 1108 """
18    
19     # The SOUTH_WEST default viewport is used when there is only one viewport.
20     # This saves the user from specifying the viewport when there is only one.
21     def __init__(self, scene, image_reader, viewport = Viewport.SOUTH_WEST):
22     """
23     @type scene: L{Scene <scene.Scene>} object
24 jongui 1110 @param scene: Scene in which the logo is to be displayed
25 jongui 1108 @type image_reader: L{ImageReader <imagereader.ImageReader>}
26     object
27 jongui 1110 @param image_reader: Deal with source of data for vizualisation
28 jongui 1108 @type viewport: L{Viewport <constant.Viewport>} constant
29 jongui 1110 @param viewport: Viewport in which the logo is to be displayed
30 jongui 1108 """
31    
32 jongui 1110 # ----- Logo -----
33 jongui 1108
34     ImageReslice.__init__(self, image_reader._getOutput())
35     ImageMapper.__init__(self, ImageReslice._getOutput(self))
36    
37     Actor2D.__init__(self, ImageMapper._getImageMapper(self))
38     scene._addActor2D(viewport, Actor2D._getActor2D(self))
39    

  ViewVC Help
Powered by ViewVC 1.1.26