MCPcopy Create free account
hub / github.com/Kitware/VTK / DisableColor

Method DisableColor

Rendering/Core/vtkLookupTableWithEnabling.cxx:33–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31}
32
33void vtkLookupTableWithEnabling::DisableColor(unsigned char r, unsigned char g, unsigned char b,
34 unsigned char* rd, unsigned char* gd, unsigned char* bd)
35{
36 double rgb[3], hsv[3];
37 rgb[0] = static_cast<double>(r);
38 rgb[1] = static_cast<double>(g);
39 rgb[2] = static_cast<double>(b);
40 vtkMath::RGBToHSV(rgb, hsv);
41 hsv[1] = 0;
42 hsv[2] = 0;
43 vtkMath::HSVToRGB(hsv, rgb);
44 *rd = static_cast<unsigned char>(rgb[0]);
45 *gd = static_cast<unsigned char>(rgb[1]);
46 *bd = static_cast<unsigned char>(rgb[2]);
47}
48
49//------------------------------------------------------------------------------
50// There is a little more to this than simply taking the log10 of the

Callers 1

Calls 2

HSVToRGBFunction · 0.85
RGBToHSVFunction · 0.50

Tested by

no test coverage detected