VTK  9.3.20240328
vtkCIEDE2000.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright (c) 2015 Greg Fiumara
3 // SPDX-License-Identifier: BSD-3-Clause AND MIT
18 #ifndef vtkCIEDE2000_h
19 #define vtkCIEDE2000_h
20 
21 #include "vtkABINamespace.h"
22 
23 #include <vector> // needed for std::vector
24 
25 namespace CIEDE2000
26 {
27 VTK_ABI_NAMESPACE_BEGIN
31 struct Node
32 {
33  double rgb[3]; // RGB color
34  double distance; // Distance from the start
35 };
36 
40 void MapColor(double rgb[3]);
41 
46 double GetCIEDeltaE2000(const double lab1[3], const double lab2[3]);
47 
52 double GetColorPath(const double rgb1[3], const double rgb2[3], std::vector<Node>& path,
53  bool forceExactSupportColors);
54 VTK_ABI_NAMESPACE_END
55 }
56 
57 #endif
58 // VTK-HeaderTest-Exclude: vtkCIEDE2000.h
Private header used by vtkColorTransferFunction to support LAB/CIEDE2000 interpolation.
Definition: vtkCIEDE2000.h:26
void MapColor(double rgb[3])
Map a RGB color to its corresponding color in the sampled RGB space.
double GetColorPath(const double rgb1[3], const double rgb2[3], std::vector< Node > &path, bool forceExactSupportColors)
Calculates the shortest color path between two colors with respect to the CIEDE2000 measure and retur...
double GetCIEDeltaE2000(const double lab1[3], const double lab2[3])
Returns the distance between two colors as given by the CIE Delta E 2000 (CIEDE2000) color distance m...
Node of the color path.
Definition: vtkCIEDE2000.h:32
double rgb[3]
Definition: vtkCIEDE2000.h:33