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

Method GetColor

Common/Core/vtkScalarsToColors.cxx:231–246  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

229
230//------------------------------------------------------------------------------
231void vtkScalarsToColors::GetColor(double v, double rgb[3])
232{
233 constexpr double minval = 0.0;
234 constexpr double maxval = 1.0;
235
236 double shift, scale;
237 vtkScalarsToColorsComputeShiftScale(this, shift, scale);
238
239 double val = (v + shift) * scale;
240 val = (val > minval ? val : minval);
241 val = (val < maxval ? val : maxval);
242
243 rgb[0] = val;
244 rgb[1] = val;
245 rgb[2] = val;
246}
247
248//------------------------------------------------------------------------------
249double vtkScalarsToColors::GetOpacity(double vtkNotUsed(v))

Callers 2

MapValueMethod · 0.95
GetAnnotationColorMethod · 0.95

Tested by

no test coverage detected