This question is prompted from the MakeLUT function in the DisplacementPlot example:
https://kitware.github.io/vtk-examples/site/Cxx/VisualizationAlgorithms/DisplacementPlot/
The MakeLUT function shows how to generate LUT’s with diverging color schemes as described by Kenneth Moreland on his website (given on the example’s webpage).
Is there a way to create these diverging LUT’s using a vtkLogLookupTable?
I know that for scalars I could always take the log of the scalar and use a linear vtkLogLookupTable.
Hi,
What are you getting? An error? Wrong colors or no rendering at all?
regards,
Paulo
Hi Paulo,
I didn’t try it – yet. In looking at the code in MakeLUT, it didn’t appear that a log table would work.
I’m curious if anyone has diverging log tables working.
BK
Hello,
Well, give it a shot and see what happens.
best,
Paulo
Will do. I should have tried it, but have been juggling too much – still am.
BK
Well, I tweaked the displacement example that I mentioned before and the log LUT worked. At first there was the error:
vtkLookupTable.cxx:160 ERR| vtkLogLookupTable (0x1ee46f0): Bad table range for log scale: [-1, 1]
When I changed the range in the example, it worked and there was no error message. I need to check this on something more complex in the future. But, at least there is something.
BK
The log function is undefied for negative arguments, thus the error.
Yes, I knew that. I just didn’t see that the example was setting a definite range.