Class SupervisedUMAP
Base class for processing blocks in the MOSAIC pipeline.
JSON configuration
Use these block entries inside a pipeline configuration. Input names must match other blocks in that pipeline; device addresses and file paths must match your setup.
Block entry for a larger pipeline. Params: embedding components, neighbour count, minimum distance, random seed. Requires the Python UMAP environment. Capture labelled clusters and fit before interpreting transformed output.
{
"SupervisedUMAP": {
"Type": "umap",
"Inputs": ["Features"],
"Params": [3, 15, 0.1, 42]
}
}
How Type, Inputs and Params work · Block catalogue and parameter reference
Implements
Inherited Members
Namespace: MOSAIC.Models.Analytics
Assembly: MOSAIC.dll
Syntax
public class SupervisedUMAP : BaseBlock, INotifyPropertyChanged, INotifyPropertyChanging, ISubscriber, IPublisher, IBaseBlockProps, IJsonExportable, IDisposable, IAsyncDisposable
Remarks
A BaseBlock represents one node in a processing graph. Blocks are typically created and linked based on a JSON configuration (pipeline definition).
Two Rate Properties:
| Property | Purpose |
|---|---|
| DesiredRate | Emission / display rate in Hz. Determines how often a block publishes output. Modified by windowing blocks (e.g. SlidingWindow: input rows/s divided by stride). Used for status monitoring and tick rate display. |
| SignalRate | True sample rate of the underlying signal in Hz. Used for DSP coefficient design (filter cutoffs, FFT bins, spectral resolution). Passes through windowing blocks unchanged — a SlidingWindow with stride 100 at 2000 Hz input still outputs data whose samples are at 2000 Hz, even though the windows arrive at 20 Hz. |
Rate Inheritance: Both rates propagate downstream automatically via TryInheritRate(BaseBlock). Publication rates initially fill unset values; use UpdateAndPropagateRate(double, bool) for runtime changes. Sample rates refresh downstream unless a block declares that it derives its own rate.
Publishing: The Publish(object) method is thread-safe and non-blocking. If a publish call is already in progress, the new value is dropped and the block enters a "stumbling" state reflected in Status.
Automatic CSV Logging: Every successful Publish(object) call feeds
Dumper whenever one is open. A dumper opens either because the config named a
Path — BlockFactory calls
InitDumper(IServiceProvider, string?) for every block it builds — or because IsRecording was
switched on, which writes to the shared session folder instead. Either way the file is named by
DumpFilePrefix. A block whose Path means something other than a recording
folder overrides PathIsDumpFolder.
Constructors
SupervisedUMAP(string, double, int, int, double, int)
Declaration
public SupervisedUMAP(string name, double desiredRate = 0, int nComponents = 3, int nNeighbors = 15, double minDist = 0.1, int randomState = 42)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | |
| double | desiredRate | |
| int | nComponents | |
| int | nNeighbors | |
| double | minDist | |
| int | randomState |
Fields
_availableColors
Declaration
private readonly List<string> _availableColors
Field Value
| Type | Description |
|---|---|
| List<string> |
_colorIndex
Declaration
private int _colorIndex
Field Value
| Type | Description |
|---|---|
| int |
_currentCaptureCount
Declaration
[ObservableProperty]
private int _currentCaptureCount
Field Value
| Type | Description |
|---|---|
| int |
_currentLabel
Declaration
[ObservableProperty]
private string _currentLabel
Field Value
| Type | Description |
|---|---|
| string |
_inputDimension
Declaration
[ObservableProperty]
private int _inputDimension
Field Value
| Type | Description |
|---|---|
| int |
_isCapturing
Declaration
[ObservableProperty]
private bool _isCapturing
Field Value
| Type | Description |
|---|---|
| bool |
_isFitted
Declaration
[ObservableProperty]
private bool _isFitted
Field Value
| Type | Description |
|---|---|
| bool |
_isFitting
Declaration
[ObservableProperty]
private bool _isFitting
Field Value
| Type | Description |
|---|---|
| bool |
_metric
Declaration
[ObservableProperty]
private string _metric
Field Value
| Type | Description |
|---|---|
| string |
_minDist
Declaration
[ObservableProperty]
private double _minDist
Field Value
| Type | Description |
|---|---|
| double |
_nComponents
Declaration
[ObservableProperty]
private int _nComponents
Field Value
| Type | Description |
|---|---|
| int |
_nNeighbors
Declaration
[ObservableProperty]
private int _nNeighbors
Field Value
| Type | Description |
|---|---|
| int |
_np
Declaration
private dynamic? _np
Field Value
| Type | Description |
|---|---|
| dynamic |
_randomState
Declaration
[ObservableProperty]
private int _randomState
Field Value
| Type | Description |
|---|---|
| int |
_totalCalibrationSamples
Declaration
[ObservableProperty]
private int _totalCalibrationSamples
Field Value
| Type | Description |
|---|---|
| int |
_transformCount
Declaration
[ObservableProperty]
private long _transformCount
Field Value
| Type | Description |
|---|---|
| long |
_transformErrorReported
Latches the transform failure below, which recurs on every sample once Python throws, so it is reported once per fitted run. Cleared wherever the model becomes fitted.
Declaration
private bool _transformErrorReported
Field Value
| Type | Description |
|---|---|
| bool |
_umapModel
Declaration
private dynamic? _umapModel
Field Value
| Type | Description |
|---|---|
| dynamic |
Properties
CapturedFeatures
Declaration
public Dictionary<string, List<Vector<double>>> CapturedFeatures { get; }
Property Value
| Type | Description |
|---|---|
| Dictionary<string, List<Vector<double>>> |
ClusterColors
Declaration
public Dictionary<string, string> ClusterColors { get; }
Property Value
| Type | Description |
|---|---|
| Dictionary<string, string> |
CurrentCaptureCount
Declaration
[ExcludeFromCodeCoverage]
public int CurrentCaptureCount { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
CurrentLabel
Declaration
[ExcludeFromCodeCoverage]
public string CurrentLabel { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
DumpFilePrefix
Recordings from this block are named <block>_umap.csv.
Declaration
protected override string DumpFilePrefix { get; }
Property Value
| Type | Description |
|---|---|
| string |
Overrides
InputDimension
Declaration
[ExcludeFromCodeCoverage]
public int InputDimension { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
IsCapturing
Declaration
[ExcludeFromCodeCoverage]
public bool IsCapturing { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
IsFitted
Declaration
[ExcludeFromCodeCoverage]
public bool IsFitted { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
IsFitting
Declaration
[ExcludeFromCodeCoverage]
public bool IsFitting { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
JsonTypeName
Block type identifier for JSON serialization. Override for a custom name.
Declaration
protected override string JsonTypeName { get; }
Property Value
| Type | Description |
|---|---|
| string |
Overrides
Metric
Declaration
[ExcludeFromCodeCoverage]
public string Metric { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
MinDist
Declaration
[ExcludeFromCodeCoverage]
public double MinDist { get; set; }
Property Value
| Type | Description |
|---|---|
| double |
NComponents
Declaration
[ExcludeFromCodeCoverage]
public int NComponents { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
NNeighbors
Declaration
[ExcludeFromCodeCoverage]
public int NNeighbors { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
RandomState
Declaration
[ExcludeFromCodeCoverage]
public int RandomState { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
TotalCalibrationSamples
Declaration
[ExcludeFromCodeCoverage]
public int TotalCalibrationSamples { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
TransformCount
Declaration
[ExcludeFromCodeCoverage]
public long TransformCount { get; set; }
Property Value
| Type | Description |
|---|---|
| long |
TransformedClusters
Declaration
public Dictionary<string, List<Vector<double>>> TransformedClusters { get; }
Property Value
| Type | Description |
|---|---|
| Dictionary<string, List<Vector<double>>> |
Methods
ClearAllClusters()
Declaration
public void ClearAllClusters()
ClearCluster(string)
Declaration
public void ClearCluster(string label)
Parameters
| Type | Name | Description |
|---|---|---|
| string | label |
ConfigureInput(IServiceProvider, JsonModel)
Declaration
public static SupervisedUMAP ConfigureInput(IServiceProvider sp, JsonModel m)
Parameters
| Type | Name | Description |
|---|---|---|
| IServiceProvider | sp | |
| JsonModel | m |
Returns
| Type | Description |
|---|---|
| SupervisedUMAP |
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public override void Dispose()
Overrides
FitModel()
Declaration
public bool FitModel()
Returns
| Type | Description |
|---|---|
| bool |
GetJsonParams()
Block-specific parameters for JSON. Override to provide custom parameters.
Declaration
protected override IReadOnlyList<object>? GetJsonParams()
Returns
| Type | Description |
|---|---|
| IReadOnlyList<object> | The values for Params, in the order this block's |
Overrides
InitializePython()
Declaration
private void InitializePython()
LoadModel(string)
Declaration
public void LoadModel(string path)
Parameters
| Type | Name | Description |
|---|---|---|
| string | path |
OnCurrentCaptureCountChanged(int)
Executes the logic for when CurrentCaptureCount just changed.
Declaration
private void OnCurrentCaptureCountChanged(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 CurrentCaptureCount is changed.
OnCurrentCaptureCountChanged(int, int)
Executes the logic for when CurrentCaptureCount just changed.
Declaration
private void OnCurrentCaptureCountChanged(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 CurrentCaptureCount is changed.
OnCurrentCaptureCountChanging(int)
Executes the logic for when CurrentCaptureCount is changing.
Declaration
private void OnCurrentCaptureCountChanging(int value)
Parameters
| Type | Name | Description |
|---|---|---|
| int | value | The new property value being set. |
Remarks
This method is invoked right before the value of CurrentCaptureCount is changed.
OnCurrentCaptureCountChanging(int, int)
Executes the logic for when CurrentCaptureCount is changing.
Declaration
private void OnCurrentCaptureCountChanging(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 CurrentCaptureCount is changed.
OnCurrentLabelChanged(string)
Executes the logic for when CurrentLabel just changed.
Declaration
private void OnCurrentLabelChanged(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 CurrentLabel is changed.
OnCurrentLabelChanged(string?, string)
Executes the logic for when CurrentLabel just changed.
Declaration
private void OnCurrentLabelChanged(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 CurrentLabel is changed.
OnCurrentLabelChanging(string)
Executes the logic for when CurrentLabel is changing.
Declaration
private void OnCurrentLabelChanging(string value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | value | The new property value being set. |
Remarks
This method is invoked right before the value of CurrentLabel is changed.
OnCurrentLabelChanging(string?, string)
Executes the logic for when CurrentLabel is changing.
Declaration
private void OnCurrentLabelChanging(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 CurrentLabel is changed.
OnInputDimensionChanged(int)
Executes the logic for when InputDimension just changed.
Declaration
private void OnInputDimensionChanged(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 InputDimension is changed.
OnInputDimensionChanged(int, int)
Executes the logic for when InputDimension just changed.
Declaration
private void OnInputDimensionChanged(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 InputDimension is changed.
OnInputDimensionChanging(int)
Executes the logic for when InputDimension is changing.
Declaration
private void OnInputDimensionChanging(int value)
Parameters
| Type | Name | Description |
|---|---|---|
| int | value | The new property value being set. |
Remarks
This method is invoked right before the value of InputDimension is changed.
OnInputDimensionChanging(int, int)
Executes the logic for when InputDimension is changing.
Declaration
private void OnInputDimensionChanging(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 InputDimension is changed.
OnIsCapturingChanged(bool)
Executes the logic for when IsCapturing just changed.
Declaration
private void OnIsCapturingChanged(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 IsCapturing is changed.
OnIsCapturingChanged(bool, bool)
Executes the logic for when IsCapturing just changed.
Declaration
private void OnIsCapturingChanged(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 IsCapturing is changed.
OnIsCapturingChanging(bool)
Executes the logic for when IsCapturing is changing.
Declaration
private void OnIsCapturingChanging(bool value)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | value | The new property value being set. |
Remarks
This method is invoked right before the value of IsCapturing is changed.
OnIsCapturingChanging(bool, bool)
Executes the logic for when IsCapturing is changing.
Declaration
private void OnIsCapturingChanging(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 IsCapturing is changed.
OnIsFittedChanged(bool)
Executes the logic for when IsFitted just changed.
Declaration
private void OnIsFittedChanged(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 IsFitted is changed.
OnIsFittedChanged(bool, bool)
Executes the logic for when IsFitted just changed.
Declaration
private void OnIsFittedChanged(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 IsFitted is changed.
OnIsFittedChanging(bool)
Executes the logic for when IsFitted is changing.
Declaration
private void OnIsFittedChanging(bool value)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | value | The new property value being set. |
Remarks
This method is invoked right before the value of IsFitted is changed.
OnIsFittedChanging(bool, bool)
Executes the logic for when IsFitted is changing.
Declaration
private void OnIsFittedChanging(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 IsFitted is changed.
OnIsFittingChanged(bool)
Executes the logic for when IsFitting just changed.
Declaration
private void OnIsFittingChanged(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 IsFitting is changed.
OnIsFittingChanged(bool, bool)
Executes the logic for when IsFitting just changed.
Declaration
private void OnIsFittingChanged(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 IsFitting is changed.
OnIsFittingChanging(bool)
Executes the logic for when IsFitting is changing.
Declaration
private void OnIsFittingChanging(bool value)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | value | The new property value being set. |
Remarks
This method is invoked right before the value of IsFitting is changed.
OnIsFittingChanging(bool, bool)
Executes the logic for when IsFitting is changing.
Declaration
private void OnIsFittingChanging(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 IsFitting is changed.
OnMetricChanged(string)
Executes the logic for when Metric just changed.
Declaration
private void OnMetricChanged(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 Metric is changed.
OnMetricChanged(string?, string)
Executes the logic for when Metric just changed.
Declaration
private void OnMetricChanged(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 Metric is changed.
OnMetricChanging(string)
Executes the logic for when Metric is changing.
Declaration
private void OnMetricChanging(string value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | value | The new property value being set. |
Remarks
This method is invoked right before the value of Metric is changed.
OnMetricChanging(string?, string)
Executes the logic for when Metric is changing.
Declaration
private void OnMetricChanging(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 Metric is changed.
OnMinDistChanged(double)
Executes the logic for when MinDist just changed.
Declaration
private void OnMinDistChanged(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 MinDist is changed.
OnMinDistChanged(double, double)
Executes the logic for when MinDist just changed.
Declaration
private void OnMinDistChanged(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 MinDist is changed.
OnMinDistChanging(double)
Executes the logic for when MinDist is changing.
Declaration
private void OnMinDistChanging(double value)
Parameters
| Type | Name | Description |
|---|---|---|
| double | value | The new property value being set. |
Remarks
This method is invoked right before the value of MinDist is changed.
OnMinDistChanging(double, double)
Executes the logic for when MinDist is changing.
Declaration
private void OnMinDistChanging(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 MinDist is changed.
OnNComponentsChanged(int)
Executes the logic for when NComponents just changed.
Declaration
private void OnNComponentsChanged(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 NComponents is changed.
OnNComponentsChanged(int, int)
Executes the logic for when NComponents just changed.
Declaration
private void OnNComponentsChanged(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 NComponents is changed.
OnNComponentsChanging(int)
Executes the logic for when NComponents is changing.
Declaration
private void OnNComponentsChanging(int value)
Parameters
| Type | Name | Description |
|---|---|---|
| int | value | The new property value being set. |
Remarks
This method is invoked right before the value of NComponents is changed.
OnNComponentsChanging(int, int)
Executes the logic for when NComponents is changing.
Declaration
private void OnNComponentsChanging(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 NComponents is changed.
OnNNeighborsChanged(int)
Executes the logic for when NNeighbors just changed.
Declaration
private void OnNNeighborsChanged(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 NNeighbors is changed.
OnNNeighborsChanged(int, int)
Executes the logic for when NNeighbors just changed.
Declaration
private void OnNNeighborsChanged(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 NNeighbors is changed.
OnNNeighborsChanging(int)
Executes the logic for when NNeighbors is changing.
Declaration
private void OnNNeighborsChanging(int value)
Parameters
| Type | Name | Description |
|---|---|---|
| int | value | The new property value being set. |
Remarks
This method is invoked right before the value of NNeighbors is changed.
OnNNeighborsChanging(int, int)
Executes the logic for when NNeighbors is changing.
Declaration
private void OnNNeighborsChanging(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 NNeighbors is changed.
OnRandomStateChanged(int)
Executes the logic for when RandomState just changed.
Declaration
private void OnRandomStateChanged(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 RandomState is changed.
OnRandomStateChanged(int, int)
Executes the logic for when RandomState just changed.
Declaration
private void OnRandomStateChanged(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 RandomState is changed.
OnRandomStateChanging(int)
Executes the logic for when RandomState is changing.
Declaration
private void OnRandomStateChanging(int value)
Parameters
| Type | Name | Description |
|---|---|---|
| int | value | The new property value being set. |
Remarks
This method is invoked right before the value of RandomState is changed.
OnRandomStateChanging(int, int)
Executes the logic for when RandomState is changing.
Declaration
private void OnRandomStateChanging(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 RandomState is changed.
OnReceive(object, object)
Processes incoming data from an upstream block. Must be implemented by derived classes.
Declaration
protected override void OnReceive(object sender, object data)
Parameters
| Type | Name | Description |
|---|---|---|
| object | sender | The publishing block, or whatever else delivered the value. |
| object | data |
Overrides
Remarks
Called on the dispatching thread, not the UI thread.
OnTotalCalibrationSamplesChanged(int)
Executes the logic for when TotalCalibrationSamples just changed.
Declaration
private void OnTotalCalibrationSamplesChanged(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 TotalCalibrationSamples is changed.
OnTotalCalibrationSamplesChanged(int, int)
Executes the logic for when TotalCalibrationSamples just changed.
Declaration
private void OnTotalCalibrationSamplesChanged(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 TotalCalibrationSamples is changed.
OnTotalCalibrationSamplesChanging(int)
Executes the logic for when TotalCalibrationSamples is changing.
Declaration
private void OnTotalCalibrationSamplesChanging(int value)
Parameters
| Type | Name | Description |
|---|---|---|
| int | value | The new property value being set. |
Remarks
This method is invoked right before the value of TotalCalibrationSamples is changed.
OnTotalCalibrationSamplesChanging(int, int)
Executes the logic for when TotalCalibrationSamples is changing.
Declaration
private void OnTotalCalibrationSamplesChanging(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 TotalCalibrationSamples is changed.
OnTransformCountChanged(long)
Executes the logic for when TransformCount just changed.
Declaration
private void OnTransformCountChanged(long value)
Parameters
| Type | Name | Description |
|---|---|---|
| long | value | The new property value that was set. |
Remarks
This method is invoked right after the value of TransformCount is changed.
OnTransformCountChanged(long, long)
Executes the logic for when TransformCount just changed.
Declaration
private void OnTransformCountChanged(long oldValue, long newValue)
Parameters
| Type | Name | Description |
|---|---|---|
| long | oldValue | The previous property value that was replaced. |
| long | newValue | The new property value that was set. |
Remarks
This method is invoked right after the value of TransformCount is changed.
OnTransformCountChanging(long)
Executes the logic for when TransformCount is changing.
Declaration
private void OnTransformCountChanging(long value)
Parameters
| Type | Name | Description |
|---|---|---|
| long | value | The new property value being set. |
Remarks
This method is invoked right before the value of TransformCount is changed.
OnTransformCountChanging(long, long)
Executes the logic for when TransformCount is changing.
Declaration
private void OnTransformCountChanging(long oldValue, long newValue)
Parameters
| Type | Name | Description |
|---|---|---|
| long | oldValue | The previous property value that is being replaced. |
| long | newValue | The new property value being set. |
Remarks
This method is invoked right before the value of TransformCount is changed.
ProcessVector(Vector<double>)
Declaration
private void ProcessVector(Vector<double> input)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector<double> | input |
PublishProjection(Vector<double>)
Declaration
protected virtual void PublishProjection(Vector<double> projection)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector<double> | projection |
RecreateModel()
Declaration
public void RecreateModel()
Reset(bool)
Declaration
public void Reset(bool preserveCaptures = true)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | preserveCaptures |
SaveModel(string)
Declaration
public void SaveModel(string path)
Parameters
| Type | Name | Description |
|---|---|---|
| string | path |
StartCapture(string)
Declaration
public void StartCapture(string label)
Parameters
| Type | Name | Description |
|---|---|---|
| string | label |
StopCapture()
Declaration
public void StopCapture()
TryDouble(IReadOnlyList<object>?, int, double)
Declaration
private static double TryDouble(IReadOnlyList<object>? p, int idx, double def)
Parameters
| Type | Name | Description |
|---|---|---|
| IReadOnlyList<object> | p | |
| int | idx | |
| double | def |
Returns
| Type | Description |
|---|---|
| double |
TryInt(IReadOnlyList<object>?, int, int)
Declaration
private static int TryInt(IReadOnlyList<object>? p, int idx, int def)
Parameters
| Type | Name | Description |
|---|---|---|
| IReadOnlyList<object> | p | |
| int | idx | |
| int | def |
Returns
| Type | Description |
|---|---|
| int |
UpdateTotalCalibrationSamples()
Declaration
private void UpdateTotalCalibrationSamples()