DataRange

Synopsis

define a single range of a datamap

DataRangeTempl

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[];

DataValues

group DataValues {
int numValues => array_size(dataVals);
float+Port2 &dataVals[];
};

RangeValues

group RangeModels {
int numRangeModels => array_size(models);
DataRangeModel+Port2 &models[];
};

DataRange


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

minimum
maximum

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.

size

The number of discrete color steps from the specified minimum to maximum data values.

v1Model
v2Model
v3Model
v4Model

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.

controlPoints

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

numControlPoints

The number of control points.
User Interface Controls
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.

DataMinValue
DataMaxValue

Potential minimum and maximum values of the data range. These are normally derived from the actual minimum and maximum values in the data.

UIMinValue
UIMaxValue

Potential minimum and maximum values of the data range. These are normally connected to user interface widgets in the DatamapEditor.

selectValues

Selects if either the derived data or UI values are used as the minimum and maximum of the data range.

MinValues
MaxValues

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.

minActive
maxActive

These parameters control if the minimum and maximum data values are editable from the DatamapEditor's user interface.

sizeActive

This parameter controls if the size value is editable in the DatamapEditor's user interface.

LinearRange
StepRange

A linear range and a step range model. These are used to control the type of range of each control point component.

selectAlphaRange

Selects the range model type for the alpha component.

selectColorRange

Selects the range model type for the HSV or RGB control point components.

RangeModels

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

v/dmap.v

See also related modules

Not Applicable.