cogdebugger.ui.fieldvisualizations.vector
A FieldType describing the shape of the field and its vectors.
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.
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
.
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 display for VectorFields that breaks the vectors apart into their individual components and displays each set of components as a grayscale image - essentially, slicing each component out of the field as displaying it with a ScalarMemoryView.
Just as a vector is a linear collection of scalars, a VectorField can be thought of as a linear collection of ScalarFields, one for each component. This visualization treats the target VectorField just so, and essentially serves to translate the vector field into a multi-layer (3D) ScalarField and view it as such.
Each individual vector component is "sliced" out of the field to create a scalar field with the same dimensions as the original vector field. That scalar field is visually represented as a grayscale image, with a single pixel per field element. The default color mapping represents the minimum value for the vector component as black, the maximum as white, and intermediate values falling on a linear gradient between those two extremes. Thus, a vector field of n dimensions will be displayed as n grayscale images. Each image annotated with a title indicating the vector component it represents as well as a color key showing which colors correspond to the minimum and maximum values for that component, as well as the value of the minimum and maximums themselves.
As a rought example, a vector field with 50 rows and 100 columns containing two-dimensional vectors would look something like this: