vtkScalarBarActor usage

Hello,

I suggest you to study or find examples using vtkColorTransferFunction class: https://vtk.org/doc/nightly/html/classvtkColorTransferFunction.html. You programmaticaly build it with calls to its addRGBSegment() method. First, make sure the transfer function is clear by making a prior call to RemoveAllPoints(). For the valid continous values you do something like addRGBSegment(0.7, r1, g1, b1, 0.8, r2, g2, b2). For the outlier code (e.g. 100) you do like addRGBSegment(99.5, r, g, b, 100.5, r, g, b). Notice the usage of the same RGB values for the range that includes the 100 value.

After your transfer function is defined, you build a LUT with this recipe (in C++, sorry):

    //create the color table object
    vtkSmartPointer<vtkLookupTable> lut = vtkSmartPointer<vtkLookupTable>::New();
    lut->SetTableRange(0.0, 100.5);
    lut->SetNumberOfTableValues(64);
    for(size_t i = 0; i < tableSize; ++i)
    {
        double *rgb;
        double value = /* lookup/compute value from i and 0.0-1.0; 100 values */;
        rgb = transferFunction->GetColor( value ); //value can be 0.0-1.0 and 100
        lut->SetTableValue(i, rgb[0], rgb[1], rgb[2]);
    }
    lut->SetRampToLinear(); //you may play with other interpolation methods
    lut->Build();

I hope this helps.

regards,

Paulo