I need to color a PolyData points/cells by a value in its fields.
This works well, but how can I use a preset color maps (e.g. “Cool to Warm”) for coloring?
In vtk.js one can do
const preset = vtkColorMaps.getPresetByName("Cool to Warm");
transferFunction.applyColorMap(preset);
How can I do the same with VTK? I see the presets exist in vtkm’s ColorTable.h, but there’s no ApplyColorMap to use it in vtkColorTransferFunction. Do the value points need to be copied by hand, or is there a shortcut method to use the ColorTable?