MCPcopy Create free account
hub / github.com/IENT/YUView / applyIMapping

Function applyIMapping

YUViewLib/src/statistics/ColorMapper.cpp:54–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52};
53
54RGBA applyIMapping(int i, double k, double n)
55{
56 if (i == 0)
57 return RGBA({1.0, k, 0.0, 1.0});
58 if (i == 1)
59 return RGBA({n, 1.0, 0.0, 1.0});
60 if (i == 2)
61 return RGBA({0.0, 1.0, k, 1.0});
62 if (i == 3)
63 return RGBA({0.0, n, 1.0, 1.0});
64 if (i == 4)
65 return RGBA({k, 0.0, 1.0, 1.0});
66 if (i == 5)
67 return RGBA({1.0, 0.0, n, 1.0});
68 return {};
69}
70
71std::string rangeToString(const Range<int> range)
72{

Callers 1

getColorMethod · 0.85

Calls 1

RGBAClass · 0.85

Tested by

no test coverage detected