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

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

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

revision 1147 by ksteube, Wed May 16 06:39:11 2007 UTC revision 1148 by jongui, Wed May 16 22:45:33 2007 UTC
# Line 10  class Warp: Line 10  class Warp:
10      Class that defines the deformation of a scalar field.      Class that defines the deformation of a scalar field.
11      """      """
12    
13      def __init__(self, object, warp_mode):      def __init__(self,  warp_mode):
14          """          """
15          Initialise the warp scalar/vector.          Initialise the warp scalar/vector.
16    
         @type object: vtkPolyData, etc  
         @param object: Input for the warp scalar/vector  
17          @type warp_mode: L{WarpMode <constant.WarpMode>} constant          @type warp_mode: L{WarpMode <constant.WarpMode>} constant
18          @param warp_mode: Mode in which to deform the data          @param warp_mode: Mode in which to deform the data
19          """          """
20    
         self.__object = object  
   
21          if(warp_mode == WarpMode.SCALAR): # Deform data with scalar data.          if(warp_mode == WarpMode.SCALAR): # Deform data with scalar data.
22              self.__vtk_warp = vtk.vtkWarpScalar()              self.__vtk_warp = vtk.vtkWarpScalar()
23          elif(warp_mode == WarpMode.VECTOR): # Deform data with vector data.          elif(warp_mode == WarpMode.VECTOR): # Deform data with vector data.
24              self.__vtk_warp = vtk.vtkWarpVector()              self.__vtk_warp = vtk.vtkWarpVector()
25    
26        def _setupWarp(self, object):
27            """
28            Setup the warp.
29    
30            @type object: vtkPolyData, etc
31            @param object: Input for the warp scalar/vector
32            """
33    
34            self.__object = object
35          self.__setInput()          self.__setInput()
36    
37      def __setInput(self):      def __setInput(self):
# Line 46  class Warp: Line 51  class Warp:
51    
52          self.__vtk_warp.SetScaleFactor(scale_factor)          self.__vtk_warp.SetScaleFactor(scale_factor)
53    
54      def _getOutput(self):      def _getWarpOutput(self):
55          """          """
56          Return the output of the deformed data.          Return the output of the deformed data.
57                    

Legend:
Removed from v.1147  
changed lines
  Added in v.1148

  ViewVC Help
Powered by ViewVC 1.1.26