10 bit per channel RGB

Hi, I am wondering if there are any low/high-level options to change color-manipulating classes such as vtkLookupTable, vtkImageMapToColors, etc, to use 10 bpc instead of 8?

Background: Trying to pass 10 bpc QC tests.

Ideally, I want to be able to map a grayscale lookup table to an image with minimum color banding, whereas currently if I try to do so:

Grayscale color banding becomes highly visible, because even though there are 4096 colors in the lut, there is actually only 256 colors in the output, as I cannot find any options in the lut nor the mapper to instruct vtk to use normalized 30 bit color instead of normalized 24 bit color.

In this example, with 10 bpc, the size of the band should become 1/4 smaller, since there are now 1024 grays instead of 256.

lut I am using:

int length = 4096;
// Map the scalar values in the image to colors with a lookup table:
vtkSmartPointer<vtkLookupTable> lookupTable = vtkSmartPointer<vtkLookupTable>::New();
lookupTable->SetTableRange(0, length);
lookupTable->SetNumberOfTableValues(length);
lookupTable->SetVectorModeToRGBColors();
double gray = 0;
for (double i = 0; i < length; i++)
{
	gray = i / length;
	lookupTable->SetTableValue(i, gray, gray, gray);
}

Basic System specs:
Win 10 64 bit
Intel Core i7-8700
NVIDIA GeForce GTX 1070
16GB RAM

VTK: 8.2

Monitor: DELL UP2716D - QHD 2560 x 1440 at 60 Hz; capable of 10 bpc

Any support is appreciated, thank you.

Very interesting question! This is something that needs to be supported with the popularity of the HDR10 monitors these days.
Unfortunately, as far as I know, only 8-bits render windows are supported in VTK (not sure if 10-bits contexts are well supported on all OS and graphics drivers though).

@ken-martin

Though it might not serve your purpose, you can get 1024 distinct luminance values by tweaking the R, G, and B individually to approximate the in-between values. This is a trick that people used to apply to get full performance out of 10-bit grayscale monitors with ordinary 8-bit color graphics cards. Of course, proper 10-bit support would be a better option.