public Image Paint(ObserverData data) { var dimensions = m_metadataReader.GetImageDimensions(data.Metadata, data.FloatData.Length); var image = new Bitmap(dimensions.Width, dimensions.Height); data.FloatData.EachWithIndex((index, value) => { float scaledValue = m_valueScaler.ScaleValue(value); image.SetPixel(index % dimensions.Width, index / dimensions.Width, GetPixelColor(scaledValue)); }); return(image); }
public void UpdatesUpperBound() { var scaledValue = m_autoScaler.ScaleValue(5.0f); Assert.Equal(5.0f, m_autoScaler.UpperBound, Precision); Assert.Equal(1.0f, scaledValue, Precision); }