MCPcopy Create free account
hub / github.com/MITK/MITK / RGBToLab

Function RGBToLab

Modules/Multilabel/src/mitkLabelSetImageHelper.cpp:34–39  ·  view source on GitHub ↗

Convert an RGB triple in [0,1] to CIE Lab via VTK. L is in [0, 100]; a and b are roughly in [-110, 110].

Source from the content-addressed store, hash-verified

32 // Convert an RGB triple in [0,1] to CIE Lab via VTK. L is in [0, 100];
33 // a and b are roughly in [-110, 110].
34 std::array<double, 3> RGBToLab(const double* rgb)
35 {
36 std::array<double, 3> lab{};
37 vtkMath::RGBToLab(rgb, lab.data());
38 return lab;
39 }
40
41 std::array<double, 3> RGBToLab(const mitk::Color& color)
42 {

Calls 1

dataMethod · 0.45

Tested by

no test coverage detected