/[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 1148 - (show annotations)
Wed May 16 22:45:33 2007 UTC (12 years, 6 months ago) by jongui
File MIME type: text/x-python
File size: 683 byte(s)
Added the updated files for pyvisi and removed some incorrect reference images.
1 """
2 @author: John NGUI
3 """
4
5 import vtk
6
7 class Texture:
8 """
9 Class that defines the texture for the rendered object.
10 """
11
12 def __init__(self):
13 """
14 Initialise the texture.
15 """
16
17 self.__vtk_texture = vtk.vtkTexture()
18
19 def _setupTexture(self, image):
20 """
21 Setup the texture.
22
23 @type image: vtkImageData
24 @param image: Image from which data is to be read
25 """
26
27 self.__image = image
28 self.__setInput()
29
30 def __setInput(self):
31 """
32 Set the input for the texture.
33 """
34
35 self.__vtk_texture.SetInput(self.__image)
36
37 def _getTexture(self):
38 """
39 Return the texture.
40
41 @rtype: vtkTexture
42 @return: Texture of the rendered object
43 """
44
45 return self.__vtk_texture
46

  ViewVC Help
Powered by ViewVC 1.1.26