Universal colormap applicabillity
We have a nice configurable colormap component but at present you can only use it for DeltphImage and Tensors.
Any archetype that uses Color should be able to work with a scalar value and a colormap.
another motivation is size (see #6976):
When logging a lot of images, the data in rerun grows quickly. A lot of images are RGB heatmaps that stem from grayscale images. It would be nice being able to log images as grayscale and visualize them in rerun with a given heatmap.
This would be very cool in combination with the graph viewer as well, for example to create bubble charts or color groups of nodes that belong together in a graph.
I really like the modular API of d3-scale together with d3-scale-chromatic for all kinds of scales. When we implement this we can take a look at their topology, and support many of their scales, ideally configurable via blueprints.
- Categorical: https://d3js.org/d3-scale-chromatic/categorical
- Cyclical: https://d3js.org/d3-scale-chromatic/cyclical
- Diverging: https://d3js.org/d3-scale-chromatic/diverging
- Sequential: https://d3js.org/d3-scale-chromatic/sequential
For many use cases, it also makes sense to have control over the domain and the range of the scale. I'd be happy to work on this!
Wanted to chime in here, I'd love to use colormap for a "confidence map", ideally I would love to log as a monochrome image like https://github.com/rerun-io/rerun/issues/6976 . I'm getting around it by using a DepthImage instead that supports colormap but this leads to issues if logging in both 2d+3d views (I can deal with this by excluding the depth map from the 3d view using a blueprint but its a bit of a pain). Setting a color map on a monochrome image would be ideal! Another option is for me to do it manually with opecv or matplotlib and just log that image. I'll look into using a tensor instead as well since I think this would probably not have the 3d spatial view issues