We’re in the process of creating some scripts where users can specify up to 6 different imaging channels that get plotted together as a color overlay. Each imaging channel is stored as a greyscale, single channel image, which we then combine together according to the user’s color preference for each channel.
Our current implementation takes the values of R, G, B and assigns them to index 0, 1, and 2, respectively, of the 3D array we’re using to store the data. For example, if the DAPI greyscale image gets assigned to blue, the values of that greyscale image will be assigned to index 2 of the 3D array.
For the other three channels, we compute the weighting of R, G, and B for the color, and proportionally add the signal corresponding to that channel to the appropriate index. I’m wondering if there is a better way to generate the RGB image? I’m more used to working with multiple channels in photoshop, where everything remains separate. For actually rendering the image so that it can be plotted via matplotlib, I’m not sure if this (seemingly hacky) solution is the only way to do this, or if there are other options.
Thanks in advance,