VoxelVariableStyle

AMD: require(["esri/layers/voxel/VoxelVariableStyle"], (VoxelVariableStyle) => { /* code goes here */ });
ESM: import VoxelVariableStyle from "@arcgis/core/layers/voxel/VoxelVariableStyle.js";
Class: esri/layers/voxel/VoxelVariableStyle
Since: ArcGIS Maps SDK for JavaScript 4.25

The VoxelVariableStyle allows you to define how an individual variable is rendered. The transferFunction and isosurfaces properties apply to continuous variables, while the uniqueValues property applies to discrete variables.

Constructors

VoxelVariableStyle

Constructor
new VoxelVariableStyle(properties)
Parameter
properties Object
optional

See the properties for a list of all the properties that may be passed into the constructor.

Example
// Typical usage
let vxlVariableStyle = new VoxelVariableStyle({
  variableId: 0,
  transferFunction: {
    interpolation: "linear",
    stretchRange: [-803.3854370117188, 804.6875],
    colorStops: [
      {
        color: [23, 244, 247, 255],
        position: 0
      },
      {
        color: [87, 25, 244, 255],
        position: 0.5
      },
      {
        color: [255, 37, 245, 255],
        position: 1
      }
    ],
    rangeFilter: {
      range: [-1000, 1000]
    }
  },
  isosurfaces: [
    {
      color: [102, 136, 248, 255],
      value: -374.6990966796875,
      label: "f32 data -1000 to 1000"
   }
  ],
  label: "f32 data -1000 to 1000"
});

Property Overview

Name Type Summary Class

The collection of continuous variable isosurfaces.

VoxelVariableStyle

The variable label.

VoxelVariableStyle

The transferFunction describes how to render continuous variable volumes and sections.

VoxelVariableStyle

The collection of unique values describes how to render discrete variable volumes and sections.

VoxelVariableStyle

Id of the VoxelVariable that the style applies to.

VoxelVariableStyle

Property Details

isosurfaces

Property
isosurfaces Collection<VoxelIsosurface>

The collection of continuous variable isosurfaces.

label

Property
label String

The variable label.

transferFunction

Property
transferFunction VoxelTransferFunctionStyle

The transferFunction describes how to render continuous variable volumes and sections.

uniqueValues

Property
uniqueValues Collection<VoxelUniqueValue>

The collection of unique values describes how to render discrete variable volumes and sections.

variableId

Property
variableId Number

Id of the VoxelVariable that the style applies to.

Method Overview

Name Return Type Summary Class
this

Creates a deep clone of this object.

VoxelVariableStyle
*

Creates a new instance of this class and initializes it with values from a JSON object generated from an ArcGIS product.

VoxelVariableStyle

Converts an instance of this class to its ArcGIS portal JSON representation.

VoxelVariableStyle

Method Details

clone

Method
clone(){this}

Creates a deep clone of this object. Any properties that store values by reference will be assigned copies of the referenced values on the cloned instance.

Returns
Type Description
this A deep clone of the class instance that invoked this method.

fromJSON

Method
fromJSON(json){*}static

Creates a new instance of this class and initializes it with values from a JSON object generated from an ArcGIS product. The object passed into the input json parameter often comes from a response to a query operation in the REST API or a toJSON() method from another ArcGIS product. See the Using fromJSON() topic in the Guide for details and examples of when and how to use this function.

Parameter
json Object

A JSON representation of the instance in the ArcGIS format. See the ArcGIS REST API documentation for examples of the structure of various input JSON objects.

Returns
Type Description
* Returns a new instance of this class.

toJSON

Method
toJSON(){Object}

Converts an instance of this class to its ArcGIS portal JSON representation. See the Using fromJSON() guide topic for more information.

Returns
Type Description
Object The ArcGIS portal JSON representation of an instance of this class.

Type Definitions

VoxelIsosurface

Type Definition
VoxelIsosurface Object

VoxelIsosurface describes an isosurface value and how to render it. Isosurfaces draw when the renderMode is set to surfaces.

Properties
color Color

The color to render this isosurface with.

value Number

The data value for this isosurface.

enabled Boolean
optional
Default Value:true

Whether or not to render this isosurface.

label String
optional
Default Value:""

The label string for this isosurface.

colorLocked Boolean
optional
Default Value:true

Whether or not the isosurface color is automatically updated when the variable's transfer function's color stops change.

VoxelUniqueValue

Type Definition
VoxelUniqueValue Object

VoxelUniqueValue describes a particular voxel discrete value how to render it.

Properties
color Color

The color to render this value with.

value Number

The data value.

enabled Boolean
optional
Default Value:true

Whether or not to render data with this value.

label String
optional
Default Value:""

The label string for this value.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.