internal DefaultStatistics(StatisticsModel parent, ITexture texture, LayerMipmapRange lm) { Luminance = new DefaultStatisticsType(parent.LuminanceShader, texture, parent, lm); Average = new DefaultStatisticsType(parent.UniformShader, texture, parent, lm); Luma = new DefaultStatisticsType(parent.LumaShader, texture, parent, lm); Lightness = new DefaultStatisticsType(parent.LightnessShader, texture, parent, lm); Alpha = new DefaultStatisticsType(parent.AlphaShader, texture, parent, lm); }
/// empty model constructor internal DefaultStatistics() { Luminance = new DefaultStatisticsType(); Average = Luminance; Luma = Luminance; Lightness = Luminance; Alpha = Luminance; }
private float Get(DefaultStatisticsType type, Metrics metric) { switch (metric) { case Metrics.Min: return(type.Min); case Metrics.Max: return(type.Max); case Metrics.Avg: return(type.Avg); } return(0.0f); }