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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1147 - (show annotations)
Wed May 16 06:39:11 2007 UTC (12 years, 2 months ago) by ksteube
File MIME type: text/x-python
File size: 822 byte(s)
Added back in some files that were accidentally deleted.

1 """
2 @author: John NGUI
3 """
4
5 import vtk
6
7 class CellDataToPointData:
8 """
9 Class that defines a filter to convert cell data to point data by
10 averaging the data values of all cells using a particular point.
11 """
12
13 def __init__(self, object):
14 """
15 Initialise the cell to point data filter.
16
17 @type object: vtkUnstructuredGrid, etc
18 @param object: Input for the cell to point data filter
19 """
20
21 self.__object = object
22 self.__vtk_cell_to_point = vtk.vtkCellDataToPointData()
23
24 self.__setInput()
25
26 def __setInput(self):
27 """
28 Set the input for the cell to point data filter.
29 """
30
31 self.__vtk_cell_to_point.SetInput(self.__object)
32
33 def _getOutput(self):
34 """
35 Return the output of the cell to point data filter.
36
37 @rtype: vtkDataSet
38 @return: Data set
39 """
40
41 return self.__vtk_cell_to_point.GetOutput()
42
43

  ViewVC Help
Powered by ViewVC 1.1.26