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

Diff of /trunk/pyvisi/py_src/mapper.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 9  class DataSetMapper: Line 9  class DataSetMapper:
9      Class that defines a data set mapper.      Class that defines a data set mapper.
10      """      """
11    
12      # 'lookup_table = None' is used only by the outline.      # 'lookup_table = None' is used only by the Outline.
13      def __init__(self, object, lookup_table = None):      def __init__(self):
14          """          """
15          Initialise the data set mapper.          Initialise the data set mapper.
16            """
17    
18            self.__vtk_data_set_mapper = vtk.vtkDataSetMapper()
19    
20        def _setupDataSetMapper(self, object, lookup_table = None):
21            """
22            Setup the data set mapper.  
23    
24          @type object: vtkDataSet (i.e. vtkUnstructuredGrid, vtkPolyData, etc)          @type object: vtkDataSet (i.e. vtkUnstructuredGrid, vtkPolyData, etc)
25          @param object: Data source map          @param object: Data source map
# Line 21  class DataSetMapper: Line 28  class DataSetMapper:
28          """          """
29    
30          self.__object = object          self.__object = object
         self.__vtk_data_set_mapper = vtk.vtkDataSetMapper()  
31          self.__setInput()          self.__setInput()
32    
33          if(lookup_table != None): # False for the outline.          if(lookup_table != None): # False for the outline.
# Line 80  class ImageMapper: Line 86  class ImageMapper:
86      Class that defines a image mapper.      Class that defines a image mapper.
87      """      """
88    
89      def __init__(self, object):      def __init__(self):
90          """          """
91          Initialise the image mapper.          Initialise the image mapper.
           
         @type object: vtkImageData  
         @param object: Image data  
92          """          """
93    
         self.__object = object  
94          self.__vtk_image_mapper = vtk.vtkImageMapper()          self.__vtk_image_mapper = vtk.vtkImageMapper()
95    
96          self.__setupImageMapper()      def _setupImageMapper(self, object):
   
     def __setupImageMapper(self):  
97          """          """
98          Setup the image mapper.          Setup the image mapper.
99            
100            @type object: vtkImageData
101            @param object: Image data
102          """          """
103    
104            self.__object = object
105          self.__setInput()          self.__setInput()
106          # Both color window and color level needs to be set, otherwise only          # Both color window and color level needs to be set, otherwise only
107          # a black image will be produced. Both values were obtained from          # a black image will be produced. Both values were obtained from

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

  ViewVC Help
Powered by ViewVC 1.1.26