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

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

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

revision 978 by jongui, Fri Feb 16 07:02:18 2007 UTC revision 994 by jongui, Fri Feb 23 07:00:54 2007 UTC
# Line 65  class Map(DataSetMapper, Actor3D): Line 65  class Map(DataSetMapper, Actor3D):
65    
66          # ----- Map -----          # ----- Map -----
67    
68          if(scalar != None): # True only if a scalar field was specified.          #if(scalar != None): # True only if a scalar field was specified.
69              data_collector._setActiveScalar(scalar)          #   data_collector._setActiveScalar(scalar)
70    
71          # NOTE: Lookup table color mapping (color or grey scale) MUST be set          # NOTE: Lookup table color mapping (color or grey scale) MUST be set
72          # before DataSetMapper. If it is done after DataSetMapper, no effect          # before DataSetMapper. If it is done after DataSetMapper, no effect
# Line 77  class Map(DataSetMapper, Actor3D): Line 77  class Map(DataSetMapper, Actor3D):
77          elif(lut == Lut.GREY_SCALE): # Grey scaled lookup table.          elif(lut == Lut.GREY_SCALE): # Grey scaled lookup table.
78              lookup_table = LookupTable()              lookup_table = LookupTable()
79              lookup_table._setLookupTableToGreyScale()              lookup_table._setLookupTableToGreyScale()
         #print ("dir ", dir(lookup_table))  
80    
81          DataSetMapper.__init__(self, data_collector._getOutput(),          DataSetMapper.__init__(self, data_collector._getOutput(),
82                  lookup_table._getLookupTable())                  lookup_table._getLookupTable())
83          DataSetMapper._setScalarRange(self, data_collector._getScalarRange())          DataSetMapper._setScalarRange(self, data_collector._getScalarRange())
84          #print("range ", data_collector._getScalarRange())  
85    
86          Actor3D.__init__(self, DataSetMapper._getDataSetMapper(self))          Actor3D.__init__(self, DataSetMapper._getDataSetMapper(self))
87          scene._addActor3D(viewport, Actor3D._getActor3D(self))          scene._addActor3D(viewport, Actor3D._getActor3D(self))
# Line 151  class MapOnPlaneCut(DataSetMapper, Actor Line 150  class MapOnPlaneCut(DataSetMapper, Actor
150    
151          # ----- Map on a plane -----          # ----- Map on a plane -----
152    
153          if(scalar != None):          #if(scalar != None):
154              data_collector._setActiveScalar(scalar)          #   data_collector._setActiveScalar(scalar)
155    
156          # NOTE: Lookup table color mapping (color or grey scale) MUST be set          # NOTE: Lookup table color mapping (color or grey scale) MUST be set
157          # before DataSetMapper. If it is done after DataSetMapper, no effect          # before DataSetMapper. If it is done after DataSetMapper, no effect
# Line 239  class MapOnPlaneClip(DataSetMapper, Acto Line 238  class MapOnPlaneClip(DataSetMapper, Acto
238    
239          # ----- Map on a clipped plane -----          # ----- Map on a clipped plane -----
240    
241          if(scalar != None):          #if(scalar != None):
242              data_collector._setActiveScalar(scalar)          #   data_collector._setActiveScalar(scalar)
243    
244          # NOTE: Lookup table color mapping (color or grey scale) MUST be set          # NOTE: Lookup table color mapping (color or grey scale) MUST be set
245          # before DataSetMapper. If it is done after DataSetMapper, no effect          # before DataSetMapper. If it is done after DataSetMapper, no effect
# Line 327  class MapOnScalarClip(DataSetMapper, Act Line 326  class MapOnScalarClip(DataSetMapper, Act
326    
327          # ----- Map clipped using a scalar value -----          # ----- Map clipped using a scalar value -----
328    
329          if(scalar != None):          #if(scalar != None):
330              data_collector._setActiveScalar(scalar)          #   data_collector._setActiveScalar(scalar)
331    
332          # NOTE: Lookup table color mapping (color or grey scale) MUST be set          # NOTE: Lookup table color mapping (color or grey scale) MUST be set
333          # before DataSetMapper. If it is done after DataSetMapper, no effect          # before DataSetMapper. If it is done after DataSetMapper, no effect

Legend:
Removed from v.978  
changed lines
  Added in v.994

  ViewVC Help
Powered by ViewVC 1.1.26