TOC PREV NEXT INDEX

Datamap

Synopsis

define the root object of the Datamap

DatamapTempl

group+Port DatamapTempl<NEcolor0=0xffff00> {
float+Port2+read dataMin;
float+Port2+read dataMax;
int numRanges;
DataRangeTempl+IPort2+read &ranges[];
ColorModel+IPort &colorModel;
ptr+nosave+nonotify localPtr<NEvisible=0>;
func+nosave getColors<NEvisible=0>;
func+nosave getARGBs<NEvisible=0>;
func+nosave getMinMax<NEvisible=0>;
};

ColorModels

group ColorModels {
int numColorModels => array_size(models);
ColorModel+Port2 &models[];
};

Datamap

DataRangeTempl DataRange {
numControlPoints => array_size(controlPoints);
/* Subobjects to control the min and max of the
range from the user interface.
*/
float DataMinValue;
float UIMinValue;
float DataMaxValue;
float UIMaxValue;
int selectValues;
DataValues MinValues {
dataVals => { DataMinValue, UIMinValue };
};
DataValues MaxValues {
dataVals => { DataMaxValue, UIMaxValue };
};
/* Subobjects to control if various UI widgets
are active for editing.
*/
int minActive;
int maxActive;
int sizeActive;
/* Subobjects to control the type of range of
each component from the user interface.
*/
LinearRange LinearRange;
StepRange StepRange;
int selectAlphaRange;
int selectColorRange;
RangeModels RangeModels {
models => { LinearRange, StepRange };
};
};

Description

Datamap is the root object of a datamap. Datamap consists of one or more data ranges and a color model.Each data range specifies the minimum and maximum values for the range, a size, and an array of control point values. The color model specifies if the control points in the data range are to be treated as RGB or HSV.

Input

dataMin dataMax

The minimum and maximum values of the scalar input data, typically obtained through connections to the object GDminmax. These values are read only and exist so dependencies among the GDminmax module, the datamap, and the Graphics Display Kit object that the datamap is attached to are established properly. This causes the modules to execute in the correct order when a change in the data occurs.

ranges

An array of data ranges.

colorModel

A color model for the datamap. The color model specifies how the values in the data range's control points are to be interpreted. Supported color models are RGB or HSV.

Parameters

numRanges

The size of the ranges array. This is automatically incremented or decremented as ranges are added or removed from the datamap.

getColors

A virtual function that gets an array of RGB float color values given an array of scalar data values.

getARGBs

A virtual function that gets an array of packed ARGB values given an array of scalar data values.

getMinMax

A virtual function that returns the minimum and maximum values of the datamap by looking at all the ranges in the datamap.User Interface ControlsThe following set of subobjects are used to control a portion of the user interface for the datamap. They provide the ability to select the color model for the datamap.

HSVcolorModel RGBcolorModel

An HSV and RGB color model.

currentColorModel

This parameter selects the color model for the datamap.

ColorModels

An array of color models that contains references to HSVcolorModel and RGB colorModel. The currentColorModel parameter indexes this array.

editable

This parameter controls if the datamap can be edited by the DatamapEditor. A value of 0 means the datamap is not editable. A value of 1 means the datamap is editable.

Output Port

dataMin dataMax

The minimum and maximum values of the scalar input data, typically obtained through connections to the object GDminmax. These values are normally connected to the minimum and maximum values in one of the data ranges. This allows the datamap to be scaled to the values of the node data or cell data.

Example

Libraries.Templates.DATAMAPS.DefaultLinear Libraries.Templates.DATAMAPS.HotMetal

File

v/dmap.v

See also related modules

Not Applicable.

TOC PREV NEXT INDEX