public ColorizeArgs(ColorMap <Vec3> colorMap) { Keys = ReadBuffer(colorMap.Keys().ToArray()); Colors = ReadBuffer(colorMap.Values().Select(v => new Vec4(v, 1f)).ToArray()); Count = Value(colorMap.Count); }
public static Signal <T, Vec4> Colorize <T> (this Signal <T, float> signal, ColorMap <Vec3> colorMap) { return(signal.Select(x => new Vec4(colorMap[x], 1f))); }
public ColorizeArgs(ColorMap <Vec4> colorMap) { Keys = ReadBuffer(colorMap.Keys().ToArray()); Colors = ReadBuffer(colorMap.Values().ToArray()); Count = Value(colorMap.Count); }