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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1388 - (show annotations)
Fri Jan 11 07:45:58 2008 UTC (13 years, 1 month ago) by trankine
File MIME type: text/x-python
File size: 1288 byte(s)
And get the *(&(*&(* name right
1 """
2 @var __author__: name of author
3 @var __copyright__: copyrights
4 @var __license__: licence agreement
5 @var __url__: url entry point on documentation
6 @var __version__: version
7 @var __date__: date of the version
8 """
9
10 __author__="John Ngui, john.ngui@uq.edu.au"
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 __url__="http://www.iservo.edu.au/esys"
17 __version__="$Revision$"
18 __date__="$Date$"
19
20
21 import vtk
22
23 class Texture:
24 """
25 Class that defines the texture for the rendered object.
26 """
27
28 def __init__(self):
29 """
30 Initialise the texture.
31 """
32
33 self.__vtk_texture = vtk.vtkTexture()
34
35 def _setupTexture(self, image):
36 """
37 Setup the texture.
38
39 @type image: vtkImageData
40 @param image: Image from which data is to be read
41 """
42
43 self.__image = image
44 self.__setInput()
45
46 def __setInput(self):
47 """
48 Set the input for the texture.
49 """
50
51 self.__vtk_texture.SetInput(self.__image)
52
53 def _getTexture(self):
54 """
55 Return the texture.
56
57 @rtype: vtkTexture
58 @return: Texture of the rendered object
59 """
60
61 return self.__vtk_texture
62

  ViewVC Help
Powered by ViewVC 1.1.26