[vtkusers] RGBColor -> Scalar value. How to make reverse color lookup?

David Doria daviddoria at gmail.com
Sun Aug 28 09:10:57 EDT 2011


On Sun, Aug 28, 2011 at 5:48 AM, Liam Kurmos <quantum.leaf at gmail.com> wrote:
>
> Hi All,
>
> I am using vtkLookupTable to get colors from scalar, and now i would
> like to do the reverse. Is there any implementation to do this? or
> else convert a single colour RGB -> HSV from which i could calculate
> the value.
>
> Liam

I don't know about a reverse lookup in a vtkLookupTable, but this is
the second function you asked for:

http://www.vtk.org/doc/nightly/html/classvtkMath.html#acda272197c6723e3ff6e72822b1e1d79

static void vtkMath::RGBToHSV(const float rgb[3], float hsv[3] )

David



More information about the vtkusers mailing list