1 |
""" |
2 |
@var __author__: name of author |
3 |
@var __copyright__: copyrights |
4 |
@var __license__: licence agreement |
5 |
@var __url__: url entry point on documentation |
6 |
@var __version__: version |
7 |
@var __date__: date of the version |
8 |
""" |
9 |
|
10 |
__author__="John Ngui, john.ngui@uq.edu.au" |
11 |
__copyright__=""" Copyright (c) 2006 by ACcESS MNRF |
12 |
http://www.access.edu.au |
13 |
Primary Business: Queensland, Australia""" |
14 |
__license__="""Licensed under the Open Software License version 3.0 |
15 |
http://www.opensource.org/licenses/osl-3.0.php""" |
16 |
__url__="http://www.iservo.edu.au/esys" |
17 |
__version__="$Revision$" |
18 |
__date__="$Date$" |
19 |
|
20 |
|
21 |
import vtk |
22 |
from mapper import DataSetMapper |
23 |
from actor import Actor3D |
24 |
from lookuptable import LookupTable |
25 |
from outline import Outline |
26 |
from constant import Viewport, Color, Lut, ColorMode |
27 |
from average import CellDataToPointData |
28 |
|
29 |
# NOTE: DataSetMapper and Actor3D were inherited to allow access to their |
30 |
# public methods from the driver. |
31 |
class Map(DataSetMapper, Actor3D): |
32 |
""" |
33 |
Class that shows a scalar field on a domain surface. The domain surface |
34 |
can either be colored or grey-scaled, depending on the lookup table used. |
35 |
""" |
36 |
|
37 |
# The SOUTH_WEST default viewport is used when there is only one viewport. |
38 |
# This saves the user from specifying the viewport when there is only one. |
39 |
# If no lut is specified, the color scheme will be used. |
40 |
def __init__(self, scene, data_collector, viewport = Viewport.SOUTH_WEST, |
41 |
lut = Lut.COLOR, cell_to_point = False, outline = True): |
42 |
""" |
43 |
Initialise the Map. |
44 |
|
45 |
@attention: The source can either be point or cell data. If the |
46 |
source is cell data, a conversion to point data may or may not be |
47 |
required, in order for the object to be rendered correctly. |
48 |
If a conversion is needed, the 'cell_to_point' flag must be set to |
49 |
'True', otherwise 'False' (which is the default). On occasions, an |
50 |
inaccurate object may be rendered from cell data even after conversion. |
51 |
|
52 |
@type scene: L{Scene <scene.Scene>} object |
53 |
@param scene: Scene in which objects are to be rendered on |
54 |
@type data_collector: L{DataCollector <datacollector.DataCollector>} |
55 |
object |
56 |
@param data_collector: Deal with source of data for vizualisation |
57 |
@type viewport: L{Viewport <constant.Viewport>} constant |
58 |
@param viewport: Viewport in which objects are to be rendered on |
59 |
@type lut : L{Lut <constant.Lut>} constant |
60 |
@param lut: Lookup table color scheme |
61 |
@type cell_to_point: Boolean |
62 |
@param cell_to_point: Converts cell data to point data (by averaging) |
63 |
@type outline: Boolean |
64 |
@param outline: Places an outline around the domain surface |
65 |
""" |
66 |
|
67 |
self.__data_collector = data_collector |
68 |
self.__viewport = viewport |
69 |
self.__lut = lut |
70 |
self.__cell_to_point = cell_to_point |
71 |
self.__outline = outline |
72 |
|
73 |
self.__modified = True # Keeps track whether Map has been modified. |
74 |
DataSetMapper.__init__(self) |
75 |
Actor3D.__init__(self) |
76 |
scene._addVisualizationModules(self) |
77 |
|
78 |
# ----- Outline ----- |
79 |
|
80 |
# NOTE: Changes cannot be made to the Outline's properties from the |
81 |
# driver. |
82 |
if(self.__outline == True): |
83 |
outline = Outline(self.__data_collector._getDataCollectorOutput()) |
84 |
mapper = DataSetMapper() |
85 |
mapper._setupDataSetMapper(outline._getOutlineOutput()) |
86 |
|
87 |
actor3D = Actor3D() |
88 |
actor3D._setupActor3D(mapper._getDataSetMapper()) |
89 |
# Default outline color is black. |
90 |
actor3D.setColor(Color.BLACK) |
91 |
|
92 |
# Default line width is 1. |
93 |
actor3D._setLineWidth(1) |
94 |
scene._addActor3D(self.__viewport, actor3D._getActor3D()) |
95 |
|
96 |
# ----- Map ----- |
97 |
|
98 |
# NOTE: Lookup table color mapping (color or grey scale) MUST be set |
99 |
# before DataSetMapper. If it is done after DataSetMapper, no effect |
100 |
# will take place. |
101 |
if(self.__lut == Lut.COLOR): # Colored lookup table. |
102 |
lookup_table = LookupTable() |
103 |
lookup_table._setTableValue() |
104 |
elif(self.__lut == Lut.GREY_SCALE): # Grey scaled lookup table. |
105 |
lookup_table = LookupTable() |
106 |
lookup_table._setLookupTableToGreyScale() |
107 |
|
108 |
if(self.__cell_to_point == True): # Convert cell data to point data. |
109 |
c2p = CellDataToPointData( |
110 |
self.__data_collector._getDataCollectorOutput()) |
111 |
self._setupDataSetMapper(c2p._getCellToPointOutput(), |
112 |
lookup_table._getLookupTable()) |
113 |
elif(self.__cell_to_point == False): # No conversion happens. |
114 |
self._setupDataSetMapper( |
115 |
self.__data_collector._getDataCollectorOutput(), |
116 |
lookup_table._getLookupTable()) |
117 |
|
118 |
self._setupActor3D(self._getDataSetMapper()) |
119 |
scene._addActor3D(self.__viewport, self._getActor3D()) |
120 |
|
121 |
def _isModified(self): |
122 |
""" |
123 |
Return whether the Map or DataCollector has been modified. |
124 |
|
125 |
@rtype: Boolean |
126 |
@return: True or False |
127 |
""" |
128 |
|
129 |
return self.__modified or self.__data_collector._isModified() |
130 |
|
131 |
def _render(self, scene): |
132 |
""" |
133 |
Render the surface map. |
134 |
|
135 |
@type scene: L{Scene <scene.Scene>} object |
136 |
@param scene: Scene in which objects are to be rendered on |
137 |
""" |
138 |
|
139 |
if (self._isModified() == True): |
140 |
if(self.__data_collector._isScalarSet() == True): |
141 |
self.__data_collector._setActiveScalar() |
142 |
|
143 |
# self._isScalarRangeSet checks whether the scalar range has been |
144 |
# specified by the user. If it has, then the scalar range |
145 |
# read from the source will be ignored. |
146 |
if(not(self._isScalarRangeSet())): |
147 |
self._setScalarRange(self.__data_collector._getScalarRange()) |
148 |
self.__modified = False |
149 |
|
150 |
|
151 |
############################################################################### |
152 |
|
153 |
|
154 |
from transform import Transform |
155 |
from plane import Plane |
156 |
from cutter import Cutter |
157 |
|
158 |
# NOTE: DataSetMapper, Actor3D, Transform, Plane and Cutter were inherited |
159 |
# to allow access to their public methods from the driver. |
160 |
class MapOnPlaneCut(DataSetMapper, Actor3D, Transform, Plane, Cutter): |
161 |
""" |
162 |
This class works in a similar way to L{Map <map.Map>}, except that it |
163 |
shows a scalar field cut using a plane. The plane can be translated |
164 |
and rotated along the X, Y and Z axes. |
165 |
""" |
166 |
|
167 |
# The SOUTH_WEST default viewport is used when there is only one viewport. |
168 |
# This saves the user from specifying the viewport when there is only one. |
169 |
# If no lut is specified, the color scheme will be used. |
170 |
def __init__(self, scene, data_collector, viewport = Viewport.SOUTH_WEST, |
171 |
lut = Lut.COLOR, cell_to_point = False, outline = True): |
172 |
""" |
173 |
Initialise the MapOnPlanceCut. |
174 |
|
175 |
@attention: The source can either be point or cell data. If the |
176 |
source is cell data, a conversion to point data may or may not be |
177 |
required, in order for the object to be rendered correctly. |
178 |
If a conversion is needed, the 'cell_to_point' flag must be set to |
179 |
'True', otherwise 'False' (which is the default). On occasions, an |
180 |
inaccurate object may be rendered from cell data even after conversion. |
181 |
|
182 |
@type scene: L{Scene <scene.Scene>} object |
183 |
@param scene: Scene in which objects are to be rendered on |
184 |
@type data_collector: L{DataCollector <datacollector.DataCollector>} |
185 |
object |
186 |
@param data_collector: Deal with source of data for visualisation |
187 |
@type viewport: L{Viewport <constant.Viewport>} constant |
188 |
@param viewport: Viewport in which objects are to be rendered on |
189 |
@type lut : L{Lut <constant.Lut>} constant |
190 |
@param lut: Lookup table color scheme |
191 |
@type cell_to_point: Boolean |
192 |
@param cell_to_point: Converts cell data to point data (by averaging) |
193 |
@type outline: Boolean |
194 |
@param outline: Places an outline around the domain surface |
195 |
""" |
196 |
|
197 |
self.__data_collector = data_collector |
198 |
self.__viewport = viewport |
199 |
self.__lut = lut |
200 |
self.__cell_to_point = cell_to_point |
201 |
self.__outline = outline |
202 |
|
203 |
# Keeps track whether MapOnPlaneCut has been modified. |
204 |
self.__modified = True |
205 |
Transform.__init__(self) |
206 |
Plane.__init__(self) |
207 |
Cutter.__init__(self) |
208 |
DataSetMapper.__init__(self) |
209 |
Actor3D.__init__(self) |
210 |
scene._addVisualizationModules(self) |
211 |
|
212 |
# ----- Outline ----- |
213 |
|
214 |
# NOTE: Changes cannot be made to the Outline's properties from the |
215 |
# driver. |
216 |
if(self.__outline == True): |
217 |
outline = Outline(self.__data_collector._getDataCollectorOutput()) |
218 |
mapper = DataSetMapper() |
219 |
mapper._setupDataSetMapper(outline._getOutlineOutput()) |
220 |
|
221 |
actor3D = Actor3D() |
222 |
actor3D._setupActor3D(mapper._getDataSetMapper()) |
223 |
# Default outline color is black. |
224 |
actor3D.setColor(Color.BLACK) |
225 |
|
226 |
# Default line width is 1. |
227 |
actor3D._setLineWidth(1) |
228 |
scene._addActor3D(self.__viewport, actor3D._getActor3D()) |
229 |
|
230 |
# ----- Map on a plane ----- |
231 |
|
232 |
# NOTE: Lookup table color mapping (color or grey scale) MUST be set |
233 |
# before DataSetMapper. If it is done after DataSetMapper, no effect |
234 |
# will take place. |
235 |
if(self.__lut == Lut.COLOR): # Colored lookup table. |
236 |
lookup_table = LookupTable() |
237 |
lookup_table._setTableValue() |
238 |
elif(self.__lut == Lut.GREY_SCALE): # Grey scaled lookup table. |
239 |
lookup_table = LookupTable() |
240 |
lookup_table._setLookupTableToGreyScale() |
241 |
|
242 |
self._setupPlane(self._getTransform()) |
243 |
|
244 |
if(self.__cell_to_point == True): # Converts cell data to point data. |
245 |
c2p = CellDataToPointData( |
246 |
self.__data_collector._getDataCollectorOutput()) |
247 |
self._setupCutter(c2p._getCellToPointOutput(), self._getPlane()) |
248 |
elif(self.__cell_to_point == False): # No conversion happens. |
249 |
c2p = CellDataToPointData( |
250 |
self.__data_collector._getDataCollectorOutput()) |
251 |
self._setupCutter(self.__data_collector._getDataCollectorOutput(), |
252 |
self._getPlane()) |
253 |
|
254 |
self._setupDataSetMapper(self._getCutterOutput(), |
255 |
lookup_table._getLookupTable()) |
256 |
|
257 |
self._setupActor3D(self._getDataSetMapper()) |
258 |
scene._addActor3D(self.__viewport, self._getActor3D()) |
259 |
|
260 |
def _isModified(self): |
261 |
""" |
262 |
Return whether the MapOnPlaneCut or DataCollector has been modified. |
263 |
|
264 |
@rtype: Boolean |
265 |
@return: True or False |
266 |
""" |
267 |
|
268 |
return self.__modified or self.__data_collector._isModified() |
269 |
|
270 |
def _render(self, scene): |
271 |
""" |
272 |
Render the surface map cut using a plane. |
273 |
|
274 |
@type scene: L{Scene <scene.Scene>} object |
275 |
@param scene: Scene in which objects are to be rendered on |
276 |
""" |
277 |
|
278 |
if (self._isModified() == True): |
279 |
if(self.__data_collector._isScalarSet() == True): |
280 |
self.__data_collector._setActiveScalar() |
281 |
# self._isScalarRangeSet checks whether the scalar range has been |
282 |
# specified by the user. If it has, then the scalar range |
283 |
# read from the source will be ignored. |
284 |
if(not(self._isScalarRangeSet())): |
285 |
self._setScalarRange(self.__data_collector._getScalarRange()) |
286 |
self.__modified = False |
287 |
|
288 |
|
289 |
############################################################################### |
290 |
|
291 |
|
292 |
from clipper import Clipper |
293 |
|
294 |
# NOTE: DataSetMapper, Actor3D, Transform, Plane and Clipper were inherited |
295 |
# to allow access to their public methods from the driver. |
296 |
class MapOnPlaneClip(DataSetMapper, Actor3D, Transform, Plane, Clipper): |
297 |
""" |
298 |
This class works in a similar way to L{MapOnPlaneCut <map.MapOnPlaneCut>}, |
299 |
except that it shows a scalar field clipped using a plane. |
300 |
""" |
301 |
|
302 |
# The SOUTH_WEST default viewport is used when there is only one viewport. |
303 |
# This saves the user from specifying the viewport when there is only one. |
304 |
# If no lut is specified, the color scheme will be used. |
305 |
def __init__(self, scene, data_collector, viewport = Viewport.SOUTH_WEST, |
306 |
lut = Lut.COLOR, cell_to_point = False, outline = True): |
307 |
""" |
308 |
Initialise the MapOnPlaneClip. |
309 |
|
310 |
@attention: The source can either be point or cell data. If the |
311 |
source is cell data, a conversion to point data may or may not be |
312 |
required, in order for the object to be rendered correctly. |
313 |
If a conversion is needed, the 'cell_to_point' flag must be set to |
314 |
'True', otherwise 'False' (which is the default). On occasions, an |
315 |
inaccurate object may be rendered from cell data even after conversion. |
316 |
|
317 |
@type scene: L{Scene <scene.Scene>} object |
318 |
@param scene: Scene in which objects are to be rendered on |
319 |
@type data_collector: L{DataCollector <datacollector.DataCollector>} |
320 |
object |
321 |
@param data_collector: Deal with source of data for visualisation |
322 |
@type viewport: L{Viewport <constant.Viewport>} constant |
323 |
@param viewport: Viewport in which objects are to be rendered on |
324 |
@type lut : L{Lut <constant.Lut>} constant |
325 |
@param lut: Lookup table color scheme |
326 |
@type cell_to_point: Boolean |
327 |
@param cell_to_point: Converts cell data to point data (by averaging) |
328 |
@type outline: Boolean |
329 |
@param outline: Places an outline around the domain surface |
330 |
""" |
331 |
|
332 |
self.__data_collector = data_collector |
333 |
self.__viewport = viewport |
334 |
self.__lut = lut |
335 |
self.__cell_to_point = cell_to_point |
336 |
self.__outline = outline |
337 |
|
338 |
# Keeps track whether MapOnPlaneClip has been modified. |
339 |
self.__modified = True |
340 |
Transform.__init__(self) |
341 |
Plane.__init__(self) |
342 |
Clipper.__init__(self) |
343 |
DataSetMapper.__init__(self) |
344 |
Actor3D.__init__(self) |
345 |
scene._addVisualizationModules(self) |
346 |
|
347 |
# ----- Outline ----- |
348 |
|
349 |
# NOTE: Changes cannot be made to the Outline's properties from the |
350 |
# driver. |
351 |
if(self.__outline == True): |
352 |
outline = Outline(self.__data_collector._getDataCollectorOutput()) |
353 |
mapper = DataSetMapper() |
354 |
mapper._setupDataSetMapper(outline._getOutlineOutput()) |
355 |
|
356 |
actor3D = Actor3D() |
357 |
actor3D._setupActor3D(mapper._getDataSetMapper()) |
358 |
# Default outline color is black. |
359 |
actor3D.setColor(Color.BLACK) |
360 |
|
361 |
# Default line width is 1. |
362 |
actor3D._setLineWidth(1) |
363 |
scene._addActor3D(self.__viewport, actor3D._getActor3D()) |
364 |
|
365 |
# ----- Map on a clipped plane ----- |
366 |
|
367 |
# NOTE: Lookup table color mapping (color or grey scale) MUST be set |
368 |
# before DataSetMapper. If it is done after DataSetMapper, no effect |
369 |
# will take place. |
370 |
if(self.__lut == Lut.COLOR): # Colored lookup table. |
371 |
lookup_table = LookupTable() |
372 |
lookup_table._setTableValue() |
373 |
elif(self.__lut == Lut.GREY_SCALE): # Grey scaled lookup table. |
374 |
lookup_table = LookupTable() |
375 |
lookup_table._setLookupTableToGreyScale() |
376 |
|
377 |
self._setupPlane(self._getTransform()) |
378 |
|
379 |
if(self.__cell_to_point == True): # Converts cell data to point data. |
380 |
c2p = CellDataToPointData(data_collector._getDataCollectorOutput()) |
381 |
self._setupClipper(c2p._getCellToPointOutput(), self._getPlane()) |
382 |
elif(self.__cell_to_point == False): # No conversion happens. |
383 |
self._setupClipper(data_collector._getDataCollectorOutput(), |
384 |
self._getPlane()) |
385 |
|
386 |
self._setClipFunction() |
387 |
self._setupDataSetMapper(self._getClipperOutput(), |
388 |
lookup_table._getLookupTable()) |
389 |
|
390 |
self._setupActor3D(self._getDataSetMapper()) |
391 |
scene._addActor3D(self.__viewport, self._getActor3D()) |
392 |
|
393 |
def _isModified(self): |
394 |
""" |
395 |
Return whether the MapOnPlaneClip or DataCollector has been modified. |
396 |
|
397 |
@rtype: Boolean |
398 |
@return: True or False |
399 |
""" |
400 |
|
401 |
return self.__modified or self.__data_collector._isModified() |
402 |
|
403 |
def _render(self, scene): |
404 |
""" |
405 |
Render the surface map clip using a plane. |
406 |
|
407 |
@type scene: L{Scene <scene.Scene>} object |
408 |
@param scene: Scene in which objects are to be rendered on |
409 |
""" |
410 |
|
411 |
if (self._isModified() == True): |
412 |
if(self.__data_collector._isScalarSet() == True): |
413 |
self.__data_collector._setActiveScalar() |
414 |
# self._isScalarRangeSet checks whether the scalar range has been |
415 |
# specified by the user. If it has, then the scalar range |
416 |
# read from the source will be ignored. |
417 |
if(not(self._isScalarRangeSet())): |
418 |
self._setScalarRange(self.__data_collector._getScalarRange()) |
419 |
self.__modified = False |
420 |
|
421 |
|
422 |
############################################################################# |
423 |
|
424 |
|
425 |
# NOTE: DataSetMapper, Actor3D and Clipper were inherited |
426 |
# to allow access to their public methods from the driver. |
427 |
class MapOnScalarClip(DataSetMapper, Actor3D, Clipper): |
428 |
""" |
429 |
This class works in a similar way to L{Map <map.Map>}, except that it |
430 |
shows a scalar field clipped using a scalar value. |
431 |
""" |
432 |
|
433 |
# The SOUTH_WEST default viewport is used when there is only one viewport. |
434 |
# This saves the user from specifying the viewport when there is only one. |
435 |
# If no lut is specified, the color scheme will be used. |
436 |
def __init__(self, scene, data_collector, viewport = Viewport.SOUTH_WEST, |
437 |
lut = Lut.COLOR, cell_to_point = False, outline = True): |
438 |
""" |
439 |
Initialise the MapOnScalarClip. |
440 |
|
441 |
@attention: The source can either be point or cell data. If the |
442 |
source is cell data, a conversion to point data may or may not be |
443 |
required, in order for the object to be rendered correctly. |
444 |
If a conversion is needed, the 'cell_to_point' flag must be set to |
445 |
'True', otherwise 'False' (which is the default). On occasions, an |
446 |
inaccurate object may be rendered from cell data even after conversion. |
447 |
|
448 |
@type scene: L{Scene <scene.Scene>} object |
449 |
@param scene: Scene in which objects are to be rendered on |
450 |
@type data_collector: L{DataCollector <datacollector.DataCollector>} |
451 |
object |
452 |
@param data_collector: Deal with source of data for visualisation |
453 |
@type viewport: L{Viewport <constant.Viewport>} constant |
454 |
@param viewport: Viewport in which objects are to be rendered on |
455 |
@type lut : L{Lut <constant.Lut>} constant |
456 |
@param lut: Lookup table color scheme |
457 |
@type cell_to_point: Boolean |
458 |
@param cell_to_point: Converts cell data to point data (by averaging) |
459 |
@type outline: Boolean |
460 |
@param outline: Places an outline around the domain surface |
461 |
""" |
462 |
|
463 |
self.__data_collector = data_collector |
464 |
self.__viewport = viewport |
465 |
self.__lut = lut |
466 |
self.__cell_to_point = cell_to_point |
467 |
self.__outline = outline |
468 |
|
469 |
# Keeps track whether MapOnScalarClip has been modified. |
470 |
self.__modified = True |
471 |
Clipper.__init__(self) |
472 |
DataSetMapper.__init__(self) |
473 |
Actor3D.__init__(self) |
474 |
scene._addVisualizationModules(self) |
475 |
|
476 |
# ----- Outline ----- |
477 |
|
478 |
# NOTE: Changes cannot be made to the Outline's properties from the |
479 |
# driver. |
480 |
if(self.__outline == True): |
481 |
outline = Outline(self.__data_collector._getDataCollectorOutput()) |
482 |
mapper = DataSetMapper() |
483 |
mapper._setupDataSetMapper(outline._getOutlineOutput()) |
484 |
|
485 |
actor3D = Actor3D() |
486 |
actor3D._setupActor3D(mapper._getDataSetMapper()) |
487 |
# Default outline color is black. |
488 |
actor3D.setColor(Color.BLACK) |
489 |
|
490 |
# Default line width is 1. |
491 |
actor3D._setLineWidth(1) |
492 |
scene._addActor3D(self.__viewport, actor3D._getActor3D()) |
493 |
|
494 |
# ----- Map clipped using a scalar value ----- |
495 |
|
496 |
# NOTE: Lookup table color mapping (color or grey scale) MUST be set |
497 |
# before DataSetMapper. If it is done after DataSetMapper, no effect |
498 |
# will take place. |
499 |
if(self.__lut == Lut.COLOR): # Colored lookup table. |
500 |
lookup_table = LookupTable() |
501 |
lookup_table._setTableValue() |
502 |
elif(self.__lut == Lut.GREY_SCALE): # Grey scaled lookup table. |
503 |
lookup_table = LookupTable() |
504 |
lookup_table._setLookupTableToGreyScale() |
505 |
|
506 |
if(self.__cell_to_point == True): # Converts cell data to point data. |
507 |
c2p = CellDataToPointData( |
508 |
self.__data_collector._getDataCollectorOutput()) |
509 |
# None is used because a plane is not required when a scalar |
510 |
# value is used to perform the clipping. |
511 |
self._setupClipper(c2p._getDataCollectorOutput(), None) |
512 |
elif(self.__cell_to_point == False): # No conversion happens. |
513 |
self._setupClipper( |
514 |
self.__data_collector._getDataCollectorOutput(),None) |
515 |
|
516 |
self._setupDataSetMapper(self._getClipperOutput(), |
517 |
lookup_table._getLookupTable()) |
518 |
|
519 |
self._setupActor3D(self._getDataSetMapper()) |
520 |
scene._addActor3D(self.__viewport, self._getActor3D()) |
521 |
|
522 |
def _isModified(self): |
523 |
""" |
524 |
Return whether the MapOnScalarClip or DataCollector has been modified. |
525 |
|
526 |
@rtype: Boolean |
527 |
@return: True or False |
528 |
""" |
529 |
|
530 |
return self.__modified or self.__data_collector._isModified() |
531 |
|
532 |
def _render(self, scene): |
533 |
""" |
534 |
Render the surface map clip using scalar data. |
535 |
|
536 |
@type scene: L{Scene <scene.Scene>} object |
537 |
@param scene: Scene in which objects are to be rendered on |
538 |
""" |
539 |
|
540 |
if (self._isModified() == True): |
541 |
if(self.__data_collector._isScalarSet() == True): |
542 |
self.__data_collector._setActiveScalar() |
543 |
# self._isScalarRangeSet checks whether the scalar range has been |
544 |
# specified by the user. If it has, then the scalar range |
545 |
# read from the source will be ignored. |
546 |
if(not(self._isScalarRangeSet())): |
547 |
self._setScalarRange(self.__data_collector._getScalarRange()) |
548 |
self.__modified = False |
549 |
|
550 |
|
551 |
|