The MatrixField to be displayed
The shape of the matrixField
The shape of tensors within the field
A list of properties that should be persisted when the app closes, and restored the next time it's launched.
A list of properties that should be persisted when the app closes, and restored the next time it's launched. A common example of a persistent is the zoom/magnification level of the viewer. Be sure to add any relevenant properties to this list in your Viewer subclasses!
Returns the XML representation of this viewer's properties, suitable for saving into a file.
Returns the XML representation of this viewer's properties, suitable for saving into a file.
Reset the visualization.
Reset the visualization. An optional operation; subclasses must override this method or else it does nothing.
Restore this object to the state described in the given XML node.
Restore this object to the state described in the given XML node.
Encode the state of this object into an XML node.
Encode the state of this object into an XML node.
Maps a float value to a (grayscale) shade based on the current values of min and max.
Maps a float value to a (grayscale) shade based on the current values of min and max. This respects the Invert image button which transposes black and white.
The (Cog4) fields this viewer is visualizing.
A sequence of components related to this viewer that belong in a panel other than the main display (usually a toolbar).
A sequence of components related to this viewer that belong in a panel other than the main display (usually a toolbar). These components may be controls (buttons, combo boxes, spinners etc.) or small labels/displays (e.g. min/max, color key).
Updates the visualization based on the contents of data
.
Updates the visualization based on the contents of data
.
Updates the visualization based on the contents of data
.
The src
argument was orignally meant to reference the
kernel/field/object that generated the data, in order to support
composite visualizations (that is, viewers that produce a visual based on
the data from several different sources), but launching such viewers in
the current UI is clunky at beset, so this feature isn't used. Viewers
that only visualize a single field's data can probably safely ignore this
arument (and indeed, most of the current ones do).
The field or object that generated the data
argument
New field data that needs to be rendered by this viewer
Parses the XML tag produced by the propertiesTag
method and restores
any saved valued to this Viewer.
Parses the XML tag produced by the propertiesTag
method and restores
any saved valued to this Viewer.
Increase zoom level by zDelta
.
Increase zoom level by zDelta
.
Default zoom increment.
Default zoom increment.
Decrease zoom level by zDelta
.
Decrease zoom level by zDelta
.
Controls how zDelta is applied to the current zoom level.
Controls how zDelta is applied to the current zoom level. In Additive, a delta is added to the current zoom level; in Multiplicative mode, the zoom level is multiplied by delta when zooming in, and by its reciprocal when zooming out.
Default zoom type is additive. If you change it to multiplicative, you should probably ensure that the default zDelta is something other than 1f, as multiplying by one probably won't do anything.
A panel for graphically displaying a Matrix field. Each Matrix is displayed as a grayscale image of size rows x columns, with one entry in the image for each element in the matrix.
The mapping of matrix element value to grayscale value depends on the current state of the "Floating Max" toggle button in this viewer's toolbar. When toggled off (the default state), the smallest value ever recorded by the viewer (absMin) is rendered as black, the largest value ever recored (absMax) is white, and intermediate data values display as gray proportionate to where they lie between absMin and absMax. If the toggle is on, the ends of the scale are determined by the values of the current step only (stepMin and stepMax).
The display also shows the grayscale encoding to help interpret the view, which looks roughly like this for a sequence of three output elements, each with two inputs: