Synopsis
define an editor for a Graphics Display Kit datamap
DatamapEditTempl
group DatamapEditTempl
{
DatamapNotifyTempl+IPort2 &dmap_in;
group *dmapLibrary;
int curDmapName;
int controlPointModel;
float+IPort2 &controlPointData[][];
int addRange;
int deleteRange;
omethod+notify_inst init_func = "DMAPeditor_init";
omethod+notify_val upd_func = "DMAPeditor";
};
DatamapEdit
DatamapEditTempl DatamapEdit
{
string dmapNames[];
int curRange;
};
Description
These templates define an editor for the Graphics Display Kit datamap. DatamapEditTemp define the elements that cause the datamap editor's methods to execute. DatamapEdit is the version you instance.
As an alternative to using DatamapEdit and having to define your own user interface for the editor, you can use DatamapEditor, an application component. DatamapEditor contains DatamapEdit and defines a user interface..
InputPorts
dmap_in
A datamap. The DatamapEdit module takes a datamap as input. Typically one from a DataObject.
controlPointData
A float array. This array must be n X 4. Each entry in the array is either ARGB or AHSV as specified by the controlPointModel.
When the data array changes, the values in the array are loaded array of data into the array of DatamapValues in the datamap. This input can be used to load any array of values into a datamap. In the DatamapEditor, this array is connected to an aray that is loaded from an AVS5 colormap.
Parameters
dmapLibrary
The library of datamaps. In Viewer3D, Viewer2D, and Viewer, this points to "Templates.DATAMAPS".
dmapNames
Array of strings. Lists the names of the datamaps in dmapLibrary. In the DatamapEditor, this list of strings is displayed in a list selection box to allow the user to choose a datamap to be loaded.
curDmapName
Integer. Used as in index into dmapNames. In the DatamapEditor, this is connected to the list selection box's selected item.
controlPointModel
Integer. Determines the format of the values in the controlPointData array. A value of 0 indicates AHSV -- the AVS 5 colormap format. A values of 1 indicates ARGB.
addRange
deleteRange
The addRange and deleteRange subobjects allow the user to either add or delete a range to the input datamap. The range added is after the last range. The range deleted is the current range.
curRange
Int. Current range. Used as a reference for either adding additional ranges or deleting the current range.
Examples
Libraries.Main.Viewer3D
Libraries.Main.Viewer2D
Libraries.Main.Viewer
File
v/dmap.v
See also
Related modules: