Class WaveformScopeVisualizerBase
- Namespace
- OpenEphys.EphysVisualization.Design
- Assembly
- OpenEphys.EphysVisualization.Design.dll
Provides an abstract base class for type visualizers that show a WaveformScopeBuilder's data as a live multi-channel waveform viewer.
public abstract class WaveformScopeVisualizerBase : DialogTypeVisualizer
- Inheritance
-
WaveformScopeVisualizerBase
- Derived
- Inherited Members
Remarks
The base class owns the window, its pacing to the display, the waveform plot and the control strip. A derived class turns what the node receives into blocks of samples, in Visualize(IObservable<IObservable<object>>, IServiceProvider), and hands them over with PostData(Mat, int); anything else it needs done on the window's thread it hands over with Post(Action), in order with the data.
Each frame calls DrawFrame(), which by default draws the plot above a control strip of the StandardColumns. A derived class that shows more overrides it and arranges DrawPlot(Vector2) and DrawControlStrip(IEnumerable<ControlStripColumn>), with whichever columns it chooses, around its own content.
Properties
- Amplitude
Gets the value at the middle of a channel's row and the amplitude the row spans, as the plot draws them: zero and the range, or an expanded channel's zoom, so that what the owner draws of a channel's values can share the plot's axis.
- ChannelGroup
Gets or sets the function giving the group a channel takes its color from, or null, the default, for each row to take the next color of the palette. Channels sharing a group share a color, and a channel in a negative group, which is none, is drawn in a neutral grey.
- ControlStripHeight
Gets the height in pixels of the control strip as last drawn, for leaving room for it.
- ExpandedRow
Gets the channel drawn alone in the plot and where its row lay on screen, as of the last frame drawn, or null while no channel is expanded, so that what the owner draws of the channel can line up with it.
- FaultHint
Gets the line shown under a fault, saying how to put it right.
- Faulted
Gets a value indicating whether a fault has been reported, after which the viewer shows it in place of the plot until it is closed.
- HistoryBytes
Gets the memory, in bytes, given to the data retained behind the display. Read once, when the visualizer loads.
- Hotkeys
Gets the keys, besides the plot's own, that whatever a derived class draws answers while the pointer is over the window. Read once, when the visualizer loads.
- HoveredChannel
Gets or sets the channel hovered in the plot as of the last frame drawn, or -1 for none: the one under the pointer, or else the one set. A channel set is drawn as one under the pointer is, and not scrolled to.
- KeysElsewhere
Gets or sets whether the pointer is over a pane beside the plot that answers keys of its own, such as a probe, so the plot leaves its keys to it, all but Q, E and X, which act on the selected channel the pane can select too. Elsewhere in the window, the control strip included, the plot answers its keys.
- MaxRange
Gets the largest amplitude a channel's row may span, in Unit, such as the input range of the device recorded from, or positive infinity where there is no such limit. Read once, when the visualizer loads.
- Maximized
Gets a value indicating whether the plot is given the whole window, so that whatever else a frame draws is left out.
- MinRange
Gets the smallest amplitude a channel's row may span, in Unit, such as the smallest signal worth a row on the device recorded from, or by default a millionth of a unit, far below any range in use. Read once, when the visualizer loads.
- Order
Gets or sets the channel each row of the posted data shows, from the top, and where each row lies, or null for each row showing the channel of its own index, the rows evenly spaced.
- Paused
Gets a value indicating whether the display is paused.
- Scope
Gets the node whose data is shown and whose settings the viewer reads and writes.
- SelectedChannel
Gets or sets the channel selected in the plot, which the cursors read, or -1 for none. Setting it to a hidden channel, or one the data does not show, selects none.
- StandardColumns
Gets the control strip columns for the settings every waveform viewer has, for DrawControlStrip(IEnumerable<ControlStripColumn>).
- Unit
Gets the unit of the samples shown, or an empty string where they have none. Read once, when the visualizer loads.
Methods
- ChannelColor(int)
Returns the color the plot draws a channel in, under the palette or, with ChannelGroup set, its group's, so that what the owner draws for the channel matches its trace.
- DrawControlStrip(IEnumerable<ControlStripColumn>)
Draws a control strip of
columnsat the cursor, across the width left, with pause and the record length beside them.
- DrawFrame()
Draws the window's contents, once per frame, into the window the base class has opened. By default the plot fills the window above a control strip of the StandardColumns, which is left out while Maximized.
- DrawOffscreen()
Does off screen what a frame would, while the window paints nothing, as while it is minimized. By default it does nothing.
- DrawPlot(Vector2)
Draws the waveform plot at the cursor, or the fault in its place.
- Fail(string)
Reports a fault, from any thread, which the viewer shows in place of the plot with FaultHint under it.
- GroupColor(int)
Returns the color a group's channels are drawn in, so that what the owner draws for the group, such as a probe's contacts, matches its traces.
- Load(IServiceProvider)
Loads type visualizer resources using the specified service provider.
- Post(Action)
Runs
actionon the window's thread, in order with the data, from any thread.
- PostClipping(bool[])
Marks the rows set in
rowsas clipping now, from any thread, in order with the data.
- PostData(Mat, int)
Posts a block of samples to be shown, from any thread. Blocks are shown in the order they are posted.
- Reveal(int)
Brings a channel into view in the plot on the next frame drawn: centered, in its lane widened if that is shrunk to a strip, or expanded in place of the channel that is. Does nothing for a channel the data does not show.
- Show(object)
Updates the type visualizer to display the specified value object.
- ToggleExpanded()
Expands the plot's selected channel, or collapses the one expanded, on the next frame drawn, as X does.
- Unload()
Unloads all type visualizer resources.
- Visualize(IObservable<IObservable<object>>, IServiceProvider)
Creates an observable sequence used to visualize all notifications emitted by a workflow operator, using this type visualizer and the specified service provider.
- ZoomTo(IEnumerable<int>)
Fits channels to the plot's height, as a zoom box over them does: the rows from the highest of them to the lowest fill the plot, with no channel expanded and, where they span lanes, every lane widened. Hidden channels, and ones the data does not show, are left out.