import VoxelVariableStyle from "@arcgis/core/layers/voxel/VoxelVariableStyle.js";
            const VoxelVariableStyle = await $arcgis.import("@arcgis/core/layers/voxel/VoxelVariableStyle.js");
            @arcgis/core/layers/voxel/VoxelVariableStyle
        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
- 
  
  
  
  
  
  
  
  
    Parameterproperties Objectoptional
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
Propertyisosurfaces Collection<VoxelIsosurface>autocast - 
  
    
The collection of continuous variable isosurfaces.
 
- 
  
  
label
Propertylabel String - 
  
    
The variable label.
 
- 
  
  
transferFunction
PropertytransferFunction VoxelTransferFunctionStyleautocast - 
  
    
The transferFunction describes how to render continuous variable volumes and sections.
 
- 
  
  
uniqueValues
PropertyuniqueValues Collection<VoxelUniqueValue>autocast - 
  
    
The collection of unique values describes how to render discrete variable volumes and sections.
 
- 
  
  
variableId
PropertyvariableId 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
- 
  
  
    
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.
ReturnsType Description this A deep clone of the class instance that invoked this method.  
- 
  
  
    
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
jsonparameter 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.Parameterjson ObjectA 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 
- 
  
  
toJSON
MethodtoJSON(){Object} - 
  
  
    
Converts an instance of this class to its ArcGIS portal JSON representation. See the Using fromJSON() guide topic for more information.
ReturnsType Description Object The ArcGIS portal JSON representation of an instance of this class.  
Type Definitions
- 
  
  
VoxelIsosurface
Type DefinitionVoxelIsosurface 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 NumberThe data value for this isosurface.
optionalenabled BooleanDefault Value:trueWhether or not to render this isosurface.
optionallabel StringDefault Value:""The label string for this isosurface.
optionalcolorLocked BooleanDefault Value:trueWhether or not the isosurface color is automatically updated when the variable's transfer function's color stops change.
 
 
- 
  
  
VoxelUniqueValue
Type DefinitionVoxelUniqueValue Object - 
  
    
VoxelUniqueValue describes a particular voxel discrete value how to render it.