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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1108 - (show annotations)
Thu Apr 19 04:02:11 2007 UTC (12 years ago) by jongui
File MIME type: text/x-python
File size: 606 byte(s)
Added modules that allows logos (i.e. access logo) to be inserted together with the rendered object. An example on how to use the 'Logo' class has also been provided.

1
2 import vtk
3
4 class ImageReslice:
5
6 def __init__(self, object):
7 self.__object = object
8 self.__vtk_image_reslice = vtk.vtkImageReslice()
9
10 self.__setupImageReslice()
11
12 def __setupImageReslice(self):
13 self.__setInput()
14
15 def __setInput(self):
16 self.__vtk_image_reslice.SetInput(self.__object)
17
18 def setSize(self, size):
19 if(size > 1):
20 size = 1 - (size - 1)
21 self.__vtk_image_reslice.SetOutputSpacing(size, size, size)
22 elif(size < 1):
23 size = (1 - size) + 1
24 self.__vtk_image_reslice.SetOutputSpacing(size, size, size)
25
26 def _getOutput(self):
27 return self.__vtk_image_reslice.GetOutput()

  ViewVC Help
Powered by ViewVC 1.1.26