Trace, clip, color bar scale range


I am recording a trace for two vtk files (each vtk file has its own renderview window) that takes and saves pictures (screenshots) of three different camera positions. The first two camera positions have a different angle of the vtk files. The last camera position includes clipping both vtk files on the X Normal. During the trace, all three pictures have the same color bar range.

When I replay the trace (using the same vtk files), the first two pictures (without clipping) look the same as the trace. However, the last picture (including the clipping), displays a different coloring and scaling range.

Is there anything I should include in my trace to keep all pictures with the same color bar range.

I appreciate any help.


Looks like a bug, you could still add the command to set coloring and scaling before the screenshot.

You may want to provide a simple way to reproduce the issue.

Mr. Westphal,

Thank you for your kind reply.

Would you mind helping me with where and what command should I activate before the screenshot? (There is a few that I do not know the difference between them).

I would greatly appreciate your feedback.

Thank you.

Yvon Martinez

It would be something like

# set scalar coloring
ColorBy(clip1Display, ('POINTS', 'RTData'))

# rescale color and/or opacity maps used to include current data range
clip1Display.RescaleTransferFunctionToDataRange(True, False)

# Rescale transfer function
rTDataLUT = GetColorTransferFunction('RTData')
rTDataLUT.RescaleTransferFunction(40.0, 250.0)

# Rescale transfer function
rTDataPWF = GetOpacityTransferFunction('RTData')
rTDataPWF.RescaleTransferFunction(40.0, 250.0)

Mr. Westphal,

Thank you for your quick response.

The idea you have suggested in the previous email can potentially work. However, I am using this python script trace in a FOR LOOP to iterate over different “attributes” that have different scale ranges. For instance, if I set a specific value in the code you have provided, this would only work for the ‘RTData’. If I happen to have ‘DTData’, and ‘MTData’, I will most likely lose the value ranges for these other sets of attributes (the scale seems to be fixed for values between 40.0 to 250.0).

I was hoping that maybe if I click a button, i.e rescale to data range, could potentially help me with this issue. I do not want to use rescale to custom range since I would have to provide a manual input of hard values belonging to that specific attribute i.e ‘RTData’. I am looking to have some flexibility with the data ranges.

I very much appreciate any other ideas.

Thank you in advance.


For the first part, you can simply write this in python.

For the second part, the call is :
wavelet1Display.RescaleTransferFunctionToDataRange(False, True)