0031454: Visualization - perceptually uniform color scale
authorabv <abv@opencascade.com>
Thu, 19 Mar 2020 07:03:40 +0000 (10:03 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 26 Mar 2020 16:53:27 +0000 (19:53 +0300)
commit14b741b0ef831d72e0f97a3e699c8a8a37fe30fc
treebb433c32db82cecb98ece62335c7c86259c6a0cc
parent89180f98222651faa3f1cffe9f6d5a9abae8a4e8
0031454: Visualization - perceptually uniform color scale

Support of CIE Lab and Lch color spaces is introduced in Quantity_Color:
- Enumeration Quantity_TypeOfColor is extended by new values representing CIE Lab and Lch color spaces (with D65 2 deg illuminant).
- Conversion of RGB color to and from these color spaces is implemented in Quantity_Color class (within existing API).
- Color difference calculation using CIE Delta E 200 formula is implemented in method DeltaE2000().

New methods MakeUniformColors() and SetUniformColors() are added in class AIS_ColorScale, generating and setting color scale based on colors of the same lightness in CIE Lch color model.

DRAW commands vcolorconvert and vcolordiff are added to perform conversions and compute difference, respectively.
A new option -uniform is added in DRAW command vcolorscale, to set uniform color scale.

Added test grid v3d colors (color conversions and difference), test bugs vis bug31454 (uniform color scale)
15 files changed:
src/AIS/AIS_ColorScale.cxx
src/AIS/AIS_ColorScale.hxx
src/Quantity/Quantity_Color.cxx
src/Quantity/Quantity_Color.hxx
src/Quantity/Quantity_TypeOfColor.hxx
src/ViewerTest/ViewerTest_ViewerCommands.cxx
tests/bugs/vis/bug22632
tests/bugs/vis/bug31454 [new file with mode: 0644]
tests/v3d/colors/begin [new file with mode: 0644]
tests/v3d/colors/de2000 [new file with mode: 0644]
tests/v3d/colors/de2000_sharma [new file with mode: 0644]
tests/v3d/colors/rgb2lab [new file with mode: 0644]
tests/v3d/colors/rgb2lch [new file with mode: 0644]
tests/v3d/colors/stability [new file with mode: 0644]
tests/v3d/grids.list