DataRange
Synopsis
define a single range of a datamap
group+OPort DataRangeTempl {
double+IPort2+req minimum;
double+IPort2+req maximum;
int+IPort2 size;
DataRangeModel+IPort2 &v1Model;
DataRangeModel+IPort2 &v2Model;
DataRangeModel+IPort2 &v3Model;
DataRangeModel+IPort2 &v4Model;
int numControlPoints;
DatamapValue+IPort2 &controlPoints[];group DataValues {
int numValues => array_size(dataVals);
float+Port2 &dataVals[];
};group RangeModels {
int numRangeModels => array_size(models);
DataRangeModel+Port2 &models[];
};
DataRangeTempl DataRange {
numControlPoints => array_size(controlPoints);
/* 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 };
};
/* Control if various UI widgets are active for editing */
int minActive;
int maxActive;
int sizeActive;
/* 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
DataRange defines a single data range in a datamap. A data range is defined by the minimum and maximum values for the range, a size, and an array of control point values.
Input
The minimum and maximum data values of the data range. When the datamap has only one range, the range's minimum and maximum normally are the same as the minimum and maximum found in the data.
The data range model for each of the four components in the control points. Each of a color's four components (alpha and HSV or RGB) can have its own data range model. Linear and step models are supported.
The control points for the data range. Control points consist of an alpha component and either RGB or HSV color components as defined by the color model of the datamap.
Parameters
The following set of subobjects are used to control a portion of the user interface for the datamap. They provide the ability to constrain the range to values either derived from the data or from user interface widgets, enable or disable some of the user interface widgets, and select the data range model for the color and alpha components of the controls points associated with the data range.
Potential minimum and maximum values of the data range. These are normally derived from the actual minimum and maximum values in the data.
Potential minimum and maximum values of the data range. These are normally connected to user interface widgets in the DatamapEditor.
Selects if either the derived data or UI values are used as the minimum and maximum of the data range.
Two arrays that contain references to the derived data and UI minimum and maximum values. The selectValues parameter is used to index the array and choose a value.
These parameters control if the minimum and maximum data values are editable from the DatamapEditor's user interface.
A linear range and a step range model. These are used to control the type of range of each control point component.
An array of data range models containing references to LinearRange and StepRange. The selectAlphaRange and selectColorRange parameters are used to index this array.
Example
Libraries.Templates.DMAP.DefaultDatamap
File
See also related modules