I am working with 3D grayscale stacks in 16 bits and I want to assign each gray value to a random RGB color value. A simple way I do this is by first creating an indexed lookup table where each channel (R, G, and B) is a shuffle of the [0,255] values. The table (dictionary) thus has entries (v r g b) which can be used to map a gray value ‘v’ to a random ‘r g b’ value. I then use a combination of append and split to create my randomly colored stack and save it as a tif file.
But I think I might be missing a built in feature of gmic that can do this automatically. I tried using map, colormap, index, clut but didn’t find a way to get what I wanted. Any suggestions?