<div dir="ltr"><p>// This is an example</p><p>
std::vetor<uint32> listIds = {3, 5, 6, 7, 8};</p><p>
table = vtkSmartPointer<vtkDiscretizableColorTransferFunction>::New();
    table->DiscretizeOn();</p><p>
    table->IndexedLookupOff();

</p><p>    table->SetNumberOfValues(listIds.size());</p><p>
    foreach (uint32 id, listaIds) {

</p><p>        QColor color(myFunctionTogetColorsFromIds(id))
        double r = color.redF();
        double g = color.greenF();
        double b = color.blueF();
        table->AddRGBPoint(static_cast<double>(id), r, g, b);
    }
    table->Build();
</p></div>