While the GetTable function can be passed a xStart = xEnd to obtain just one color for a given Scalar value, I need to do the opposite. Given a RGB color, getting the scalar that maps to it.
Is there already any function around that I am not finding? Or do I have to write that function by extending the class?
Inverse lookup is not implemented as it is normally should not be necessary and a general solution would not be trivial (for example, the same RGB value can be mapped to many scalar values). So, if you really need this, then you need to implement it.
Hi! Thank you for your answers!
Andras, That’s what I recon. An alternative would be to replace the lookup for a linear gray scale lookup mapped to the Scalar range. Then the gray value would immediately tell me what the scalar value is. Would you agree with this?