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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 944 by jongui, Mon Jan 29 07:22:43 2007 UTC revision 945 by jongui, Tue Jan 30 22:34:27 2007 UTC
# Line 5  Line 5 
5  import vtk  import vtk
6    
7  class Probe:  class Probe:
8        """
9        Class that defines the probe. The class sample data values at
10        specified point locations.
11        """
12    
13      def __init__(self, object, source):      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          self.__object = object
24          self.__source = source          self.__source = source
25          self.__vtk_probe_filter = vtk.vtkProbeFilter()          self.__vtk_probe_filter = vtk.vtkProbeFilter()
# Line 13  class Probe: Line 27  class Probe:
27          self.__setSource()          self.__setSource()
28    
29      def __setInput(self):      def __setInput(self):
30            """
31            Set the input for the probe.
32            """
33    
34          self.__vtk_probe_filter.SetInput(self.__source)          self.__vtk_probe_filter.SetInput(self.__source)
35    
36      def __setSource(self):      def __setSource(self):
37            """
38            Set the source for the probe.
39            """
40    
41          self.__vtk_probe_filter.SetSource(self.__object)          self.__vtk_probe_filter.SetSource(self.__object)
42    
43      def _getOutput(self):      def _getOutput(self):
44            """
45            Return the probe.
46    
47            @rtype: vtkDataSet
48            @return: Data set
49            """
50    
51          return self.__vtk_probe_filter.GetOutput()          return self.__vtk_probe_filter.GetOutput()
52    

Legend:
Removed from v.944  
changed lines
  Added in v.945

  ViewVC Help
Powered by ViewVC 1.1.26