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

Method SetColumnColor

Charts/Core/vtkPlotBox.cxx:352–365  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

350
351//------------------------------------------------------------------------------
352void vtkPlotBox::SetColumnColor(const vtkStdString& colName, double* rgb)
353{
354 if (this->LookupTable == nullptr)
355 {
356 this->CreateDefaultLookupTable();
357 }
358 int index = this->GetInput()->GetColumnIndex(colName.c_str());
359 vtkLookupTable* lut = vtkLookupTable::SafeDownCast(this->LookupTable);
360 if (index >= 0 && lut)
361 {
362 lut->SetTableValue(index, rgb[0], rgb[1], rgb[2]);
363 lut->Build();
364 }
365}
366
367//------------------------------------------------------------------------------
368void vtkPlotBox::CreateDefaultLookupTable()

Callers 1

TestBoxPlotFunction · 0.80

Calls 6

GetColumnIndexMethod · 0.80
SetTableValueMethod · 0.80
GetInputMethod · 0.45
c_strMethod · 0.45
BuildMethod · 0.45

Tested by 1

TestBoxPlotFunction · 0.64