MCPcopy Create free account
hub / github.com/Kitware/VTK / CorrectedDistance

Function CorrectedDistance

Rendering/Core/vtkCIEDE2000.cxx:208–225  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

206
207//------------------------------------------------------------------------------
208double CorrectedDistance(std::vector<Node>& path)
209{
210 double distance = 0.0;
211
212 for (std::size_t i = 1; i < path.size(); ++i)
213 {
214 double currentLabColor[3];
215 vtkMath::RGBToLab(path.at(i).rgb, currentLabColor);
216
217 double previousLabColor[3];
218 vtkMath::RGBToLab(path.at(i - 1).rgb, previousLabColor);
219
220 distance += GetCIEDeltaE2000(currentLabColor, previousLabColor);
221 path.at(i).distance = distance;
222 }
223
224 return distance;
225}
226
227//------------------------------------------------------------------------------
228double GetColorPath(

Callers 1

GetColorPathFunction · 0.85

Calls 4

RGBToLabFunction · 0.85
GetCIEDeltaE2000Function · 0.85
sizeMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected