Skip to content

[WIP]Quick demo of discrete color map

This MR add a UseStepsColors mode to the DiscretizableColorTransferFunction.

When using the mode, Midpoint and Sharpness are both set to 1.0 by default, ensuring a kind of "Step" color space.

When using this mode, the DiscretizableTransferFunction::Build method will ensure the last two point are the same color and will add a point to ensure that if needed. The duplicated point is added because when using a step function for the color, the color of the last point can not be seen, by adding a point before the last point with the same color, this color actually appears.

The duplicated point is then removed when switching back to ColorSpace mode.

The control point is also modifying the sharpness and midpoint of the color in order to get an interpolated color when adding a point, wich is more practical.

Edited by Mathieu Westphal (Kitware)

Merge request reports