The voxel variable style defines how the voxel layer will render for a variable. A variable can be discrete (integer values) or continuous (float values).

Referenced by: Voxel Style

Properties

PropertyDetails
isosurfaces[]Array of styles for isosurfaces. (Only if variable.originalFormat.continuity = continuous). An isosurface represents a surface at a specific value. A voxel layer can have up to four isosurfaces.
labelLabel for the variable.
transferFunctionDefines the stretch rendering of the voxel layer. The transfer function maps voxel values to color and transparency. Scalar field only. (Only if variable.originalFormat.continuity = continuous).
uniqueValues[]Defines the unique value rendering as an array of unique value styles (Only if variable.originalFormat.continuity = discrete).
variableIdId of the variable. The variable styles will be defined for the variable with the given Id. If the variableId and the voxel style currentVariableId are identical the style will be shown.

Continuous Example

{
"variableId": 0,
"isosurfaces": [
{
"color": [
242,
203,
36,
255
],
"value": 1634.2
}
],
"transferFunction": {
"interpolation": "nearest",
"stretchRange": [
327.1315612792969,
2941.4609375
],
"colorStops": [
{
"color": [
0,
48,
246,
255
],
"position": 0
},
{
"color": [
0,
52,
243,
255
],
"position": 0.00392156862745098
},
{
"color": [
0,
56,
239,
255
],
"position": 0.00784313725490196
}
]
}
}

Discrete Example

{
"variableId": 0,
"uniqueValues": [
{
"color": [
32,
11,
243,
255
],
"value": 1
},
{
"color": [
58,
145,
250,
255
],
"value": 2
},
{
"color": [
254,
54,
10,
255
],
"value": 3
},
{
"color": [
16,
249,
10,
255
],
"value": 5
},
{
"color": [
61,
81,
24,
255
],
"value": 6
},
{
"color": [
251,
11,
172,
255
],
"value": 7
}
]
}