ModifyImage: "Direct color image" range and lookup wave for individual channels?
Fri, 02/19/2016 - 10:42 am
(Put yet another way, I'd like to be able to open the ModifyImage dialog box and, just as happens for grayscale images, be able to adjust the lowest and highest z values that are displayed (like "color table range"), and set a lookup wave. In Igor 6 and 7 beta, this dialog is empty for direct color images, save the choice of image plane for direct color image stacks. I realize that allowing a color table wave other than grayscale values for each color gun to map onto would be roundabout and potentially very confusing, perhaps even computationally inefficient.)
I can implement this myself in an inelegant method, where I directly modify the values of each layer to to the scale I want across the full range of 16 bit unsigned integer values. This is rather cumbersome and slow (though perhaps it would go somewhat faster using matrixOP functions instead of wave assignments, I haven't tried that yet). From my perspective it seems much more attractive to have the image update its range and gamma directly as I described above (though I don't know the details of how the graphics routines set the final pixel intensity values, and I suppose it might be no more time efficient than my method of direct calculation. However, my impression from changing the threshold on grayscale images in Igor is that that calculation is performed more efficiently than my direct calculation.)
Is there a more direct way to do this? I was hoping that Igor 7 might allow semi-transparent overlays of (three) grayscale image so that I could assign a red, green, and blue color table to each of three grayscale images, thus achieving the same goal, but I don't see that functionality in the beta release. I suppose one other possibility would be to devote a subrange of the z values in a single layer wave to each color channel, with a similarly-divided color table wave (i.e. lowest third of values increasing intensity of red, middle third green, top third blue) and then compute a discontinuous gamma function/lookup wave that thresholds the subrange for each color and maps them onto the appropriate region of color table wave. (Sounds fun but time-consuming to implement.)
Thanks very much for any advice! Please let me know if anything needs clarification.