------------------------------------------------------------------------------
| 350 | |
| 351 | //------------------------------------------------------------------------------ |
| 352 | void 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 | //------------------------------------------------------------------------------ |
| 368 | void vtkPlotBox::CreateDefaultLookupTable() |