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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 949 - (hide annotations)
Fri Feb 2 05:33:05 2007 UTC (13 years, 6 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 jongui 943 """
2     @author: John NGUI
3     """
4    
5     import vtk
6    
7     class Probe:
8 jongui 945 """
9 jongui 949 Class that defines the probe. This class samples data values at
10     the specified point locations.
11 jongui 945 """
12    
13 jongui 943 def __init__(self, object, source):
14 jongui 945 """
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 jongui 943 self.__object = object
24     self.__source = source
25     self.__vtk_probe_filter = vtk.vtkProbeFilter()
26 jongui 949
27     self.__setupProbe()
28    
29     def __setupProbe(self):
30     """
31     Setup the probe.
32     """
33    
34 jongui 943 self.__setInput()
35     self.__setSource()
36    
37     def __setInput(self):
38 jongui 945 """
39     Set the input for the probe.
40     """
41    
42 jongui 943 self.__vtk_probe_filter.SetInput(self.__source)
43    
44     def __setSource(self):
45 jongui 945 """
46     Set the source for the probe.
47     """
48    
49 jongui 943 self.__vtk_probe_filter.SetSource(self.__object)
50    
51     def _getOutput(self):
52 jongui 945 """
53 jongui 949 Return the output for the probe.
54 jongui 945
55     @rtype: vtkDataSet
56     @return: Data set
57     """
58    
59 jongui 943 return self.__vtk_probe_filter.GetOutput()
60    

  ViewVC Help
Powered by ViewVC 1.1.26