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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 949 - (show annotations)
Fri Feb 2 05:33:05 2007 UTC (13 years, 5 months ago) by jongui
File MIME type: text/x-python
File size: 1028 byte(s)
Fixed some more bugs and added more epydocs. Testing remains outstanding.
1 """
2 @author: John NGUI
3 """
4
5 import vtk
6
7 class Probe:
8 """
9 Class that defines the probe. This class samples data values at
10 the specified point locations.
11 """
12
13 def __init__(self, object, source):
14 """
15 Initialise the probe.
16
17 @type object: vtkUnstructuredGrid, etc
18 @param object: Inpur for the probe
19 @type source: vtkDataSet (i.e. vtkStructuredPoints)
20 @param source: Source for the probe
21 """
22
23 self.__object = object
24 self.__source = source
25 self.__vtk_probe_filter = vtk.vtkProbeFilter()
26
27 self.__setupProbe()
28
29 def __setupProbe(self):
30 """
31 Setup the probe.
32 """
33
34 self.__setInput()
35 self.__setSource()
36
37 def __setInput(self):
38 """
39 Set the input for the probe.
40 """
41
42 self.__vtk_probe_filter.SetInput(self.__source)
43
44 def __setSource(self):
45 """
46 Set the source for the probe.
47 """
48
49 self.__vtk_probe_filter.SetSource(self.__object)
50
51 def _getOutput(self):
52 """
53 Return the output for the probe.
54
55 @rtype: vtkDataSet
56 @return: Data set
57 """
58
59 return self.__vtk_probe_filter.GetOutput()
60

  ViewVC Help
Powered by ViewVC 1.1.26