ColorMappingComponent

This component handles settings for dynamic color mapping of data points based on the columns in a dataset. It is for example utilized by the RenderablePointCloud renderable type.

The option for the parameters will be initialized based on the dataset used for the specific renderable. The value range will be set based on the min and max values for the respective column in the dataset, but can be manually adjusted. Per default, all columns will be loaded, but this can also be adjusted.

In addition to specifying a color map (.cmap) file and changing the parameter used for determining the color, this component includes features such as:

  • Inverting the color map

  • Handling colors for missing data values (or hiding these data points)

  • Handling colors for values outside the provided range

  • Predefining which parameters to load from the dataset, and the range of values to use for color mapping

Members

Name

Documentation

Type

Description

Optional

File

The path to the color map file to use. Should be a .cmap file

File

Value of type ‘File’

No

AboveRangeColor

The color to use for items with values larger than the one in the provided data range, if enabled. This color can also be read from the color map, but setting this value overrides any value in the color map. If a color value for the above range values is provided, the UseAboveRangeColor property will automatically be set to true.

Color4

Value of type ‘Color4’

Yes

BelowRangeColor

The color to use for items with values smaller than the one in the provided data range, if enabled. This color can also be read from the color map, but setting this value overrides any value in the color map. If a color value for the below range values is provided, the UseBelowRangeColor property will automatically be set to true.

Color4

Value of type ‘Color4’

Yes

Enabled

Decides if the color mapping should be used or not.

Boolean

Value of type ‘Boolean’

Yes

HideValuesOutsideRange

If true, points with values outside the provided range for the coloring will be hidden, i.e. not rendered at all.

Boolean

Value of type ‘Boolean’

Yes

Invert

If true, the colors of the color map will be read in the inverse order.

Boolean

Value of type ‘Boolean’

Yes

NoDataColor

The color to use for items with values corresponding to missing data values, if enabled. This color can also be read from the color map, but setting this value overrides any value in the color map. If a color value for the below range values is provided, the ShowMissingData property will automatically be set to true.

Color4

Value of type ‘Color4’

Yes

Parameter

The default parameter to use for the color map. The options for this parameter are either loaded from the dataset or provided in the ParameterOptions list. This value can be changed dynamically in the user interface.

String

Value of type ‘String’

Yes

ParameterOptions

A list of options for parameters to use for color mapping that will appear as options in the drop-down menu in the user interface. Per default, the first option in the list is selected. Each option is a table in the form { Key = "dataColumn", Range = {min, max} }, where the Range is optional. The specified range (or the min/max values for this data column) will be used for color mapping when the option is selected.

Table

Table parameters

Yes

ShowMissingData

If true, use a separate color (see NoDataColor) for items with values corresponding to missing data values.

Boolean

Value of type ‘Boolean’

Yes

UseAboveRangeColor

If true, use a separate color (see AboveRangeColor) for items with values larger than the one in the provided data range. Otherwise, the values will be clamped to use the color at the upper limit of the color map. If a color is provided in the color map, this value will automatically be set to true.

Boolean

Value of type ‘Boolean’

Yes

UseBelowRangeColor

If true, use a separate color (see BelowRangeColor) for items with values smaller than the one in the provided data range. Otherwise, the values will be clamped to use the color at the lower limit of the color map. If a color is provided in the color map, this value will automatically be set to true.

Boolean

Value of type ‘Boolean’

Yes

ValueRange

The range of values to use in the color mapping. The lowest value will be mapped to the first color in the color map.

Vector2<double>

Value of type ‘Vector2

Yes

Table parameters for ParameterOptions

A list of options for parameters to use for color mapping that will appear as options in the drop-down menu in the user interface. Per default, the first option in the list is selected. Each option is a table in the form { Key = "dataColumn", Range = {min, max} }, where the Range is optional. The specified range (or the min/max values for this data column) will be used for color mapping when the option is selected.

  • Optional: Yes

Name

Documentation

Type

Description

Optional

*

Table

Table parameters

Yes

Table parameters for *

  • Optional: Yes

Name

Documentation

Type

Description

Optional

Key

The key for the data variable to use for color.

String

Value of type ‘String’

No

Range

An optional value range to use for coloring when this option is selected. If not included, the range will be set from the min and max value in the dataset.

Vector2<double>

Value of type ‘Vector2

Yes