private void InitializeBuffer(WaterfallConfig config) { _width = config.Points / config.DownSample; _height = config.History * config.RefreshRate; _invalidateArea = new Int32Rect(0, 0, _width, _height); _blockSize = (uint)((_height * _width) - _width); _buffer = new WriteableBitmap(_width, _height, 300, 300, PixelFormats.Gray8, BitmapPalettes.Gray256); Spectrum.Source = _buffer; }
public void Begin(WaterfallConfig config) { InitializeBuffer(config); InitializeSampler(config); UpdateTimeLabel(config.History); UpdateFrequencyLabel(1, 0.5); UpdateLegendLabel(config); _initialized = true; }
private void InitializeSampler(WaterfallConfig config) { _frequencyDomain = config.MaxFrequency - config.MinFrequency; _windowStop = config.MaxFrequency; _windowStart = config.MinFrequency; _updateTimer = new Stopwatch(); _updateThreshold = 1000 / config.RefreshRate; _downSample = config.DownSample; _transform = new Transform(config.MinIntensity, config.MaxIntensity, 0, 255); _updateTimer.Start(); }
private void UpdateLegendLabel(WaterfallConfig config) { LegendMin.Content = config.MinIntensity; LegendMax.Content = config.MaxIntensity; }