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

Method MapValue

Rendering/Core/vtkColorTransferFunction.cxx:713–723  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Returns the RGBA color evaluated at the specified location

Source from the content-addressed store, hash-verified

711//------------------------------------------------------------------------------
712// Returns the RGBA color evaluated at the specified location
713const unsigned char* vtkColorTransferFunction::MapValue(double x)
714{
715 double rgb[3];
716 this->GetColor(x, rgb);
717
718 this->UnsignedCharRGBAValue[0] = static_cast<unsigned char>(255.0 * rgb[0] + 0.5);
719 this->UnsignedCharRGBAValue[1] = static_cast<unsigned char>(255.0 * rgb[1] + 0.5);
720 this->UnsignedCharRGBAValue[2] = static_cast<unsigned char>(255.0 * rgb[2] + 0.5);
721 this->UnsignedCharRGBAValue[3] = 255;
722 return this->UnsignedCharRGBAValue;
723}
724
725//------------------------------------------------------------------------------
726// Returns the RGB color evaluated at the specified location

Callers 4

RenderMethod · 0.45
TestBareScalarsToColorsFunction · 0.45
TestColorSpaceFunction · 0.45

Calls 1

GetColorMethod · 0.95

Tested by 2

TestBareScalarsToColorsFunction · 0.36
TestColorSpaceFunction · 0.36