Class SpectrogramMonitor
A reusable spectrogram visualization monitor: buffers incoming spectral frames in a
ring buffer and renders them to a scrolling bitmap with a colorbar legend. Lifecycle is
Pause() / Resume() / ResetData() / Dispose().
Inherited Members
Namespace: MOSAIC.Visualization.SpectrogramMonitor
Assembly: MOSAIC.dll
Syntax
public class SpectrogramMonitor : ObservableObject, INotifyPropertyChanged, INotifyPropertyChanging, IDisposable, IMonitor
Remarks
From a processing block:
_spectrogram.EnqueueSpectrum(magnitudeArray);
From XAML (via SpectrogramMonitorView):
<local:SpectrogramMonitorView Spectrogram="{Binding MySpectrogram}"/>
Colormaps use an SKColor[] palette. Call SetColormap(SKColor[], string?) directly, or use the extension methods in SpectrogramColormaps (UseViridis, UseInferno, …).
Constructors
SpectrogramMonitor(int)
Declaration
public SpectrogramMonitor(int maxDepth = 200)
Parameters
| Type | Name | Description |
|---|---|---|
| int | maxDepth | Maximum number of time slices (spectrogram width). |
Fields
_autoScale
When true, color scale min/max are computed from data with hysteresis.
Declaration
[ObservableProperty]
private bool _autoScale
Field Value
| Type | Description |
|---|---|
| bool |
_binCount
Number of frequency bins per frame.
Declaration
[ObservableProperty]
private int _binCount
Field Value
| Type | Description |
|---|---|
| int |
_bins
Declaration
private int _bins
Field Value
| Type | Description |
|---|---|
| int |
_bitmapHeight
Declaration
private int _bitmapHeight
Field Value
| Type | Description |
|---|---|
| int |
_bitmapWidth
Declaration
private int _bitmapWidth
Field Value
| Type | Description |
|---|---|
| int |
_buffer
Declaration
private double[][]? _buffer
Field Value
| Type | Description |
|---|---|
| double[][] |
_colorMax
Maximum value for color mapping (bright end).
Declaration
[ObservableProperty]
private double _colorMax
Field Value
| Type | Description |
|---|---|
| double |
_colorMin
Minimum value for color mapping (dark end).
Declaration
[ObservableProperty]
private double _colorMin
Field Value
| Type | Description |
|---|---|
| double |
_colorbarBitmap
Declaration
[ObservableProperty]
private Bitmap? _colorbarBitmap
Field Value
| Type | Description |
|---|---|
| Bitmap |
_colorbarCaption
Declaration
[ObservableProperty]
private string _colorbarCaption
Field Value
| Type | Description |
|---|---|
| string |
_colorbarMaxLabel
Declaration
[ObservableProperty]
private string _colorbarMaxLabel
Field Value
| Type | Description |
|---|---|
| string |
_colorbarMinLabel
Declaration
[ObservableProperty]
private string _colorbarMinLabel
Field Value
| Type | Description |
|---|---|
| string |
_colormap
Declaration
private SKColor[] _colormap
Field Value
| Type | Description |
|---|---|
| SKColor[] |
_colormapName
Declaration
private string? _colormapName
Field Value
| Type | Description |
|---|---|
| string |
_count
Declaration
private int _count
Field Value
| Type | Description |
|---|---|
| int |
_disposed
Declaration
private volatile bool _disposed
Field Value
| Type | Description |
|---|---|
| bool |
_flushScheduled
Declaration
private int _flushScheduled
Field Value
| Type | Description |
|---|---|
| int |
_frameCount
Number of time slices currently buffered.
Declaration
[ObservableProperty]
private int _frameCount
Field Value
| Type | Description |
|---|---|
| int |
_hasData
Whether any data has been received.
Declaration
[ObservableProperty]
private bool _hasData
Field Value
| Type | Description |
|---|---|
| bool |
_image
The rendered spectrogram bitmap. Bind to Image.Source.
Declaration
[ObservableProperty]
private Bitmap? _image
Field Value
| Type | Description |
|---|---|
| Bitmap |
_isActive
Declaration
private volatile bool _isActive
Field Value
| Type | Description |
|---|---|
| bool |
_isUpdating
Declaration
private volatile bool _isUpdating
Field Value
| Type | Description |
|---|---|
| bool |
_lastScaleUpdate
Declaration
private DateTime _lastScaleUpdate
Field Value
| Type | Description |
|---|---|
| DateTime |
_maxDepth
Declaration
private readonly int _maxDepth
Field Value
| Type | Description |
|---|---|
| int |
_maxFrequency
Maximum frequency (Hz) — top of spectrogram (Nyquist). Set by the FFT block.
Declaration
[ObservableProperty]
private double _maxFrequency
Field Value
| Type | Description |
|---|---|
| double |
_minFrequency
Minimum frequency (Hz) — bottom of spectrogram (DC). Set by the FFT block.
Declaration
[ObservableProperty]
private double _minFrequency
Field Value
| Type | Description |
|---|---|
| double |
_peakMax
Declaration
private double _peakMax
Field Value
| Type | Description |
|---|---|
| double |
_peakMin
Declaration
private double _peakMin
Field Value
| Type | Description |
|---|---|
| double |
_pendingBinCount
Declaration
private int _pendingBinCount
Field Value
| Type | Description |
|---|---|
| int |
_pixelBuffer
Declaration
private byte[]? _pixelBuffer
Field Value
| Type | Description |
|---|---|
| byte[] |
_pool
Declaration
private static readonly ArrayPool<double> _pool
Field Value
| Type | Description |
|---|---|
| ArrayPool<double> |
_queue
Declaration
private readonly ConcurrentQueue<double[]> _queue
Field Value
| Type | Description |
|---|---|
| ConcurrentQueue<double[]> |
_reconfigureScheduled
Declaration
private int _reconfigureScheduled
Field Value
| Type | Description |
|---|---|
| int |
_skBitmap
Declaration
private SKBitmap? _skBitmap
Field Value
| Type | Description |
|---|---|
| SKBitmap |
_tickRate
Declaration
private VisualizationTimer.TickRate _tickRate
Field Value
| Type | Description |
|---|---|
| VisualizationTimer.TickRate |
_timerCallback
Declaration
private readonly Action _timerCallback
Field Value
| Type | Description |
|---|---|
| Action |
_writeIndex
Declaration
private int _writeIndex
Field Value
| Type | Description |
|---|---|
| int |
Properties
AutoScale
When true, color scale min/max are computed from data with hysteresis.
Declaration
[ExcludeFromCodeCoverage]
public bool AutoScale { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
BinCount
Number of frequency bins per frame.
Declaration
[ExcludeFromCodeCoverage]
public int BinCount { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
ColorMax
Maximum value for color mapping (bright end).
Declaration
[ExcludeFromCodeCoverage]
public double ColorMax { get; set; }
Property Value
| Type | Description |
|---|---|
| double |
ColorMin
Minimum value for color mapping (dark end).
Declaration
[ExcludeFromCodeCoverage]
public double ColorMin { get; set; }
Property Value
| Type | Description |
|---|---|
| double |
ColorbarBitmap
Declaration
[ExcludeFromCodeCoverage]
public Bitmap? ColorbarBitmap { get; set; }
Property Value
| Type | Description |
|---|---|
| Bitmap |
ColorbarCaption
Declaration
[ExcludeFromCodeCoverage]
public string ColorbarCaption { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
ColorbarMaxLabel
Declaration
[ExcludeFromCodeCoverage]
public string ColorbarMaxLabel { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
ColorbarMinLabel
Declaration
[ExcludeFromCodeCoverage]
public string ColorbarMinLabel { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
ColormapName
Gets the current colormap name (for display in settings flyout).
Declaration
public string? ColormapName { get; }
Property Value
| Type | Description |
|---|---|
| string |
DecayHalfLife
Peak-hold decay half-life in seconds. Longer = more stable scale. Default 3s.
Declaration
public double DecayHalfLife { get; set; }
Property Value
| Type | Description |
|---|---|
| double |
ExpandAlpha
How fast the scale expands to capture new peaks (0..1). 1.0 = instant.
Declaration
public double ExpandAlpha { get; set; }
Property Value
| Type | Description |
|---|---|
| double |
FrameCount
Number of time slices currently buffered.
Declaration
[ExcludeFromCodeCoverage]
public int FrameCount { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
HasData
Whether any data has been received.
Declaration
[ExcludeFromCodeCoverage]
public bool HasData { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Image
The rendered spectrogram bitmap. Bind to Image.Source.
Declaration
[ExcludeFromCodeCoverage]
public Bitmap? Image { get; set; }
Property Value
| Type | Description |
|---|---|
| Bitmap |
MaxDepth
Maximum time slices in ring buffer (spectrogram width).
Declaration
public int MaxDepth { get; }
Property Value
| Type | Description |
|---|---|
| int |
MaxFrequency
Maximum frequency (Hz) — top of spectrogram (Nyquist). Set by the FFT block.
Declaration
[ExcludeFromCodeCoverage]
public double MaxFrequency { get; set; }
Property Value
| Type | Description |
|---|---|
| double |
MinFrequency
Minimum frequency (Hz) — bottom of spectrogram (DC). Set by the FFT block.
Declaration
[ExcludeFromCodeCoverage]
public double MinFrequency { get; set; }
Property Value
| Type | Description |
|---|---|
| double |
TickRate
Declaration
public VisualizationTimer.TickRate TickRate { get; set; }
Property Value
| Type | Description |
|---|---|
| VisualizationTimer.TickRate |
Methods
BuildInferno256()
Declaration
private static SKColor[] BuildInferno256()
Returns
| Type | Description |
|---|---|
| SKColor[] |
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
DrainQueue()
Declaration
private void DrainQueue()
EnqueueSpectrum(double[])
Enqueues a spectral frame from the processing thread. The array is copied via ArrayPool — caller can reuse their buffer immediately. Data is always accepted regardless of whether rendering is active, so frames are buffered and ready when the view attaches.
Declaration
public void EnqueueSpectrum(double[] spectrum)
Parameters
| Type | Name | Description |
|---|---|---|
| double[] | spectrum |
EnqueueSpectrum(ReadOnlySpan<double>)
Enqueues a spectrum from a ReadOnlySpan (zero-alloc path).
Declaration
public void EnqueueSpectrum(ReadOnlySpan<double> spectrum)
Parameters
| Type | Name | Description |
|---|---|---|
| ReadOnlySpan<double> | spectrum |
FlushAndRender()
Declaration
private void FlushAndRender()
FormatValue(double)
Declaration
private static string FormatValue(double v)
Parameters
| Type | Name | Description |
|---|---|---|
| double | v |
Returns
| Type | Description |
|---|---|
| string |
InitBuffer(int)
Declaration
private void InitBuffer(int bins)
Parameters
| Type | Name | Description |
|---|---|---|
| int | bins |
LerpColor(in SKColor, in SKColor, float)
Declaration
private static SKColor LerpColor(in SKColor c1, in SKColor c2, float t)
Parameters
| Type | Name | Description |
|---|---|---|
| SKColor | c1 | |
| SKColor | c2 | |
| float | t |
Returns
| Type | Description |
|---|---|
| SKColor |
OnAutoScaleChanged(bool)
Executes the logic for when AutoScale just changed.
Declaration
private void OnAutoScaleChanged(bool value)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | value | The new property value that was set. |
Remarks
This method is invoked right after the value of AutoScale is changed.
OnAutoScaleChanged(bool, bool)
Executes the logic for when AutoScale just changed.
Declaration
private void OnAutoScaleChanged(bool oldValue, bool newValue)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | oldValue | The previous property value that was replaced. |
| bool | newValue | The new property value that was set. |
Remarks
This method is invoked right after the value of AutoScale is changed.
OnAutoScaleChanging(bool)
Executes the logic for when AutoScale is changing.
Declaration
private void OnAutoScaleChanging(bool value)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | value | The new property value being set. |
Remarks
This method is invoked right before the value of AutoScale is changed.
OnAutoScaleChanging(bool, bool)
Executes the logic for when AutoScale is changing.
Declaration
private void OnAutoScaleChanging(bool oldValue, bool newValue)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | oldValue | The previous property value that is being replaced. |
| bool | newValue | The new property value being set. |
Remarks
This method is invoked right before the value of AutoScale is changed.
OnBinCountChanged(int)
Executes the logic for when BinCount just changed.
Declaration
private void OnBinCountChanged(int value)
Parameters
| Type | Name | Description |
|---|---|---|
| int | value | The new property value that was set. |
Remarks
This method is invoked right after the value of BinCount is changed.
OnBinCountChanged(int, int)
Executes the logic for when BinCount just changed.
Declaration
private void OnBinCountChanged(int oldValue, int newValue)
Parameters
| Type | Name | Description |
|---|---|---|
| int | oldValue | The previous property value that was replaced. |
| int | newValue | The new property value that was set. |
Remarks
This method is invoked right after the value of BinCount is changed.
OnBinCountChanging(int)
Executes the logic for when BinCount is changing.
Declaration
private void OnBinCountChanging(int value)
Parameters
| Type | Name | Description |
|---|---|---|
| int | value | The new property value being set. |
Remarks
This method is invoked right before the value of BinCount is changed.
OnBinCountChanging(int, int)
Executes the logic for when BinCount is changing.
Declaration
private void OnBinCountChanging(int oldValue, int newValue)
Parameters
| Type | Name | Description |
|---|---|---|
| int | oldValue | The previous property value that is being replaced. |
| int | newValue | The new property value being set. |
Remarks
This method is invoked right before the value of BinCount is changed.
OnColorMaxChanged(double)
Executes the logic for when ColorMax just changed.
Declaration
private void OnColorMaxChanged(double value)
Parameters
| Type | Name | Description |
|---|---|---|
| double | value | The new property value that was set. |
Remarks
This method is invoked right after the value of ColorMax is changed.
OnColorMaxChanged(double, double)
Executes the logic for when ColorMax just changed.
Declaration
private void OnColorMaxChanged(double oldValue, double newValue)
Parameters
| Type | Name | Description |
|---|---|---|
| double | oldValue | The previous property value that was replaced. |
| double | newValue | The new property value that was set. |
Remarks
This method is invoked right after the value of ColorMax is changed.
OnColorMaxChanging(double)
Executes the logic for when ColorMax is changing.
Declaration
private void OnColorMaxChanging(double value)
Parameters
| Type | Name | Description |
|---|---|---|
| double | value | The new property value being set. |
Remarks
This method is invoked right before the value of ColorMax is changed.
OnColorMaxChanging(double, double)
Executes the logic for when ColorMax is changing.
Declaration
private void OnColorMaxChanging(double oldValue, double newValue)
Parameters
| Type | Name | Description |
|---|---|---|
| double | oldValue | The previous property value that is being replaced. |
| double | newValue | The new property value being set. |
Remarks
This method is invoked right before the value of ColorMax is changed.
OnColorMinChanged(double)
Executes the logic for when ColorMin just changed.
Declaration
private void OnColorMinChanged(double value)
Parameters
| Type | Name | Description |
|---|---|---|
| double | value | The new property value that was set. |
Remarks
This method is invoked right after the value of ColorMin is changed.
OnColorMinChanged(double, double)
Executes the logic for when ColorMin just changed.
Declaration
private void OnColorMinChanged(double oldValue, double newValue)
Parameters
| Type | Name | Description |
|---|---|---|
| double | oldValue | The previous property value that was replaced. |
| double | newValue | The new property value that was set. |
Remarks
This method is invoked right after the value of ColorMin is changed.
OnColorMinChanging(double)
Executes the logic for when ColorMin is changing.
Declaration
private void OnColorMinChanging(double value)
Parameters
| Type | Name | Description |
|---|---|---|
| double | value | The new property value being set. |
Remarks
This method is invoked right before the value of ColorMin is changed.
OnColorMinChanging(double, double)
Executes the logic for when ColorMin is changing.
Declaration
private void OnColorMinChanging(double oldValue, double newValue)
Parameters
| Type | Name | Description |
|---|---|---|
| double | oldValue | The previous property value that is being replaced. |
| double | newValue | The new property value being set. |
Remarks
This method is invoked right before the value of ColorMin is changed.
OnColorbarBitmapChanged(Bitmap?)
Executes the logic for when ColorbarBitmap just changed.
Declaration
private void OnColorbarBitmapChanged(Bitmap? value)
Parameters
| Type | Name | Description |
|---|---|---|
| Bitmap | value | The new property value that was set. |
Remarks
This method is invoked right after the value of ColorbarBitmap is changed.
OnColorbarBitmapChanged(Bitmap?, Bitmap?)
Executes the logic for when ColorbarBitmap just changed.
Declaration
private void OnColorbarBitmapChanged(Bitmap? oldValue, Bitmap? newValue)
Parameters
| Type | Name | Description |
|---|---|---|
| Bitmap | oldValue | The previous property value that was replaced. |
| Bitmap | newValue | The new property value that was set. |
Remarks
This method is invoked right after the value of ColorbarBitmap is changed.
OnColorbarBitmapChanging(Bitmap?)
Executes the logic for when ColorbarBitmap is changing.
Declaration
private void OnColorbarBitmapChanging(Bitmap? value)
Parameters
| Type | Name | Description |
|---|---|---|
| Bitmap | value | The new property value being set. |
Remarks
This method is invoked right before the value of ColorbarBitmap is changed.
OnColorbarBitmapChanging(Bitmap?, Bitmap?)
Executes the logic for when ColorbarBitmap is changing.
Declaration
private void OnColorbarBitmapChanging(Bitmap? oldValue, Bitmap? newValue)
Parameters
| Type | Name | Description |
|---|---|---|
| Bitmap | oldValue | The previous property value that is being replaced. |
| Bitmap | newValue | The new property value being set. |
Remarks
This method is invoked right before the value of ColorbarBitmap is changed.
OnColorbarCaptionChanged(string)
Executes the logic for when ColorbarCaption just changed.
Declaration
private void OnColorbarCaptionChanged(string value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | value | The new property value that was set. |
Remarks
This method is invoked right after the value of ColorbarCaption is changed.
OnColorbarCaptionChanged(string?, string)
Executes the logic for when ColorbarCaption just changed.
Declaration
private void OnColorbarCaptionChanged(string? oldValue, string newValue)
Parameters
| Type | Name | Description |
|---|---|---|
| string | oldValue | The previous property value that was replaced. |
| string | newValue | The new property value that was set. |
Remarks
This method is invoked right after the value of ColorbarCaption is changed.
OnColorbarCaptionChanging(string)
Executes the logic for when ColorbarCaption is changing.
Declaration
private void OnColorbarCaptionChanging(string value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | value | The new property value being set. |
Remarks
This method is invoked right before the value of ColorbarCaption is changed.
OnColorbarCaptionChanging(string?, string)
Executes the logic for when ColorbarCaption is changing.
Declaration
private void OnColorbarCaptionChanging(string? oldValue, string newValue)
Parameters
| Type | Name | Description |
|---|---|---|
| string | oldValue | The previous property value that is being replaced. |
| string | newValue | The new property value being set. |
Remarks
This method is invoked right before the value of ColorbarCaption is changed.
OnColorbarMaxLabelChanged(string)
Executes the logic for when ColorbarMaxLabel just changed.
Declaration
private void OnColorbarMaxLabelChanged(string value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | value | The new property value that was set. |
Remarks
This method is invoked right after the value of ColorbarMaxLabel is changed.
OnColorbarMaxLabelChanged(string?, string)
Executes the logic for when ColorbarMaxLabel just changed.
Declaration
private void OnColorbarMaxLabelChanged(string? oldValue, string newValue)
Parameters
| Type | Name | Description |
|---|---|---|
| string | oldValue | The previous property value that was replaced. |
| string | newValue | The new property value that was set. |
Remarks
This method is invoked right after the value of ColorbarMaxLabel is changed.
OnColorbarMaxLabelChanging(string)
Executes the logic for when ColorbarMaxLabel is changing.
Declaration
private void OnColorbarMaxLabelChanging(string value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | value | The new property value being set. |
Remarks
This method is invoked right before the value of ColorbarMaxLabel is changed.
OnColorbarMaxLabelChanging(string?, string)
Executes the logic for when ColorbarMaxLabel is changing.
Declaration
private void OnColorbarMaxLabelChanging(string? oldValue, string newValue)
Parameters
| Type | Name | Description |
|---|---|---|
| string | oldValue | The previous property value that is being replaced. |
| string | newValue | The new property value being set. |
Remarks
This method is invoked right before the value of ColorbarMaxLabel is changed.
OnColorbarMinLabelChanged(string)
Executes the logic for when ColorbarMinLabel just changed.
Declaration
private void OnColorbarMinLabelChanged(string value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | value | The new property value that was set. |
Remarks
This method is invoked right after the value of ColorbarMinLabel is changed.
OnColorbarMinLabelChanged(string?, string)
Executes the logic for when ColorbarMinLabel just changed.
Declaration
private void OnColorbarMinLabelChanged(string? oldValue, string newValue)
Parameters
| Type | Name | Description |
|---|---|---|
| string | oldValue | The previous property value that was replaced. |
| string | newValue | The new property value that was set. |
Remarks
This method is invoked right after the value of ColorbarMinLabel is changed.
OnColorbarMinLabelChanging(string)
Executes the logic for when ColorbarMinLabel is changing.
Declaration
private void OnColorbarMinLabelChanging(string value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | value | The new property value being set. |
Remarks
This method is invoked right before the value of ColorbarMinLabel is changed.
OnColorbarMinLabelChanging(string?, string)
Executes the logic for when ColorbarMinLabel is changing.
Declaration
private void OnColorbarMinLabelChanging(string? oldValue, string newValue)
Parameters
| Type | Name | Description |
|---|---|---|
| string | oldValue | The previous property value that is being replaced. |
| string | newValue | The new property value being set. |
Remarks
This method is invoked right before the value of ColorbarMinLabel is changed.
OnFrameCountChanged(int)
Executes the logic for when FrameCount just changed.
Declaration
private void OnFrameCountChanged(int value)
Parameters
| Type | Name | Description |
|---|---|---|
| int | value | The new property value that was set. |
Remarks
This method is invoked right after the value of FrameCount is changed.
OnFrameCountChanged(int, int)
Executes the logic for when FrameCount just changed.
Declaration
private void OnFrameCountChanged(int oldValue, int newValue)
Parameters
| Type | Name | Description |
|---|---|---|
| int | oldValue | The previous property value that was replaced. |
| int | newValue | The new property value that was set. |
Remarks
This method is invoked right after the value of FrameCount is changed.
OnFrameCountChanging(int)
Executes the logic for when FrameCount is changing.
Declaration
private void OnFrameCountChanging(int value)
Parameters
| Type | Name | Description |
|---|---|---|
| int | value | The new property value being set. |
Remarks
This method is invoked right before the value of FrameCount is changed.
OnFrameCountChanging(int, int)
Executes the logic for when FrameCount is changing.
Declaration
private void OnFrameCountChanging(int oldValue, int newValue)
Parameters
| Type | Name | Description |
|---|---|---|
| int | oldValue | The previous property value that is being replaced. |
| int | newValue | The new property value being set. |
Remarks
This method is invoked right before the value of FrameCount is changed.
OnHasDataChanged(bool)
Executes the logic for when HasData just changed.
Declaration
private void OnHasDataChanged(bool value)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | value | The new property value that was set. |
Remarks
This method is invoked right after the value of HasData is changed.
OnHasDataChanged(bool, bool)
Executes the logic for when HasData just changed.
Declaration
private void OnHasDataChanged(bool oldValue, bool newValue)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | oldValue | The previous property value that was replaced. |
| bool | newValue | The new property value that was set. |
Remarks
This method is invoked right after the value of HasData is changed.
OnHasDataChanging(bool)
Executes the logic for when HasData is changing.
Declaration
private void OnHasDataChanging(bool value)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | value | The new property value being set. |
Remarks
This method is invoked right before the value of HasData is changed.
OnHasDataChanging(bool, bool)
Executes the logic for when HasData is changing.
Declaration
private void OnHasDataChanging(bool oldValue, bool newValue)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | oldValue | The previous property value that is being replaced. |
| bool | newValue | The new property value being set. |
Remarks
This method is invoked right before the value of HasData is changed.
OnImageChanged(Bitmap?)
Executes the logic for when Image just changed.
Declaration
private void OnImageChanged(Bitmap? value)
Parameters
| Type | Name | Description |
|---|---|---|
| Bitmap | value | The new property value that was set. |
Remarks
This method is invoked right after the value of Image is changed.
OnImageChanged(Bitmap?, Bitmap?)
Executes the logic for when Image just changed.
Declaration
private void OnImageChanged(Bitmap? oldValue, Bitmap? newValue)
Parameters
| Type | Name | Description |
|---|---|---|
| Bitmap | oldValue | The previous property value that was replaced. |
| Bitmap | newValue | The new property value that was set. |
Remarks
This method is invoked right after the value of Image is changed.
OnImageChanging(Bitmap?)
Executes the logic for when Image is changing.
Declaration
private void OnImageChanging(Bitmap? value)
Parameters
| Type | Name | Description |
|---|---|---|
| Bitmap | value | The new property value being set. |
Remarks
This method is invoked right before the value of Image is changed.
OnImageChanging(Bitmap?, Bitmap?)
Executes the logic for when Image is changing.
Declaration
private void OnImageChanging(Bitmap? oldValue, Bitmap? newValue)
Parameters
| Type | Name | Description |
|---|---|---|
| Bitmap | oldValue | The previous property value that is being replaced. |
| Bitmap | newValue | The new property value being set. |
Remarks
This method is invoked right before the value of Image is changed.
OnMaxFrequencyChanged(double)
Executes the logic for when MaxFrequency just changed.
Declaration
private void OnMaxFrequencyChanged(double value)
Parameters
| Type | Name | Description |
|---|---|---|
| double | value | The new property value that was set. |
Remarks
This method is invoked right after the value of MaxFrequency is changed.
OnMaxFrequencyChanged(double, double)
Executes the logic for when MaxFrequency just changed.
Declaration
private void OnMaxFrequencyChanged(double oldValue, double newValue)
Parameters
| Type | Name | Description |
|---|---|---|
| double | oldValue | The previous property value that was replaced. |
| double | newValue | The new property value that was set. |
Remarks
This method is invoked right after the value of MaxFrequency is changed.
OnMaxFrequencyChanging(double)
Executes the logic for when MaxFrequency is changing.
Declaration
private void OnMaxFrequencyChanging(double value)
Parameters
| Type | Name | Description |
|---|---|---|
| double | value | The new property value being set. |
Remarks
This method is invoked right before the value of MaxFrequency is changed.
OnMaxFrequencyChanging(double, double)
Executes the logic for when MaxFrequency is changing.
Declaration
private void OnMaxFrequencyChanging(double oldValue, double newValue)
Parameters
| Type | Name | Description |
|---|---|---|
| double | oldValue | The previous property value that is being replaced. |
| double | newValue | The new property value being set. |
Remarks
This method is invoked right before the value of MaxFrequency is changed.
OnMinFrequencyChanged(double)
Executes the logic for when MinFrequency just changed.
Declaration
private void OnMinFrequencyChanged(double value)
Parameters
| Type | Name | Description |
|---|---|---|
| double | value | The new property value that was set. |
Remarks
This method is invoked right after the value of MinFrequency is changed.
OnMinFrequencyChanged(double, double)
Executes the logic for when MinFrequency just changed.
Declaration
private void OnMinFrequencyChanged(double oldValue, double newValue)
Parameters
| Type | Name | Description |
|---|---|---|
| double | oldValue | The previous property value that was replaced. |
| double | newValue | The new property value that was set. |
Remarks
This method is invoked right after the value of MinFrequency is changed.
OnMinFrequencyChanging(double)
Executes the logic for when MinFrequency is changing.
Declaration
private void OnMinFrequencyChanging(double value)
Parameters
| Type | Name | Description |
|---|---|---|
| double | value | The new property value being set. |
Remarks
This method is invoked right before the value of MinFrequency is changed.
OnMinFrequencyChanging(double, double)
Executes the logic for when MinFrequency is changing.
Declaration
private void OnMinFrequencyChanging(double oldValue, double newValue)
Parameters
| Type | Name | Description |
|---|---|---|
| double | oldValue | The previous property value that is being replaced. |
| double | newValue | The new property value being set. |
Remarks
This method is invoked right before the value of MinFrequency is changed.
Pause()
Stops data flow and rendering updates.
Declaration
public void Pause()
PushToBuffer(double[])
Declaration
private void PushToBuffer(double[] frame)
Parameters
| Type | Name | Description |
|---|---|---|
| double[] | frame |
RebuildColorbar(int, int)
Declaration
public void RebuildColorbar(int width = 18, int height = 180)
Parameters
| Type | Name | Description |
|---|---|---|
| int | width | |
| int | height |
RenderBitmap()
Declaration
private void RenderBitmap()
RequestBinReconfigure(int)
Declaration
private void RequestBinReconfigure(int newBinCount)
Parameters
| Type | Name | Description |
|---|---|---|
| int | newBinCount |
RequestFlush()
Declaration
private void RequestFlush()
ResetData()
Clears buffered data and any accumulated display state.
Declaration
public void ResetData()
ResetDataCore()
Declaration
private void ResetDataCore()
Resume()
Resumes data flow and rendering updates.
Declaration
public void Resume()
SetColormap(SKColor[], string?)
Sets the colormap. Accepts an array of SKColor (same format as HeatMap).
Declaration
public void SetColormap(SKColor[] colors, string? name = null)
Parameters
| Type | Name | Description |
|---|---|---|
| SKColor[] | colors | |
| string | name |
UpdateAutoScale()
Declaration
private void UpdateAutoScale()
UpdateLegendLabels()
Declaration
private void UpdateLegendLabels()
UpdateThemeColors()
Re-applies theme-dependent colours to the monitor's paints.
Declaration
public void UpdateThemeColors()
UseAutoScale()
Enables auto-scaling (resets tracked range).
Declaration
public void UseAutoScale()
UseFixedScale(double, double)
Sets a fixed color scale range (disables auto-scaling).
Declaration
public void UseFixedScale(double min, double max)
Parameters
| Type | Name | Description |
|---|---|---|
| double | min | |
| double | max |