VoxelTransferFunctionStyle

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

The VoxelTransferFunctionStyle allows you to define how an individual continuous variable is rendered as a volume or as sections. The strechRange is the range in the data to apply the colorStops and opacityStops to. The rangeFilter defines which data values will draw. Values outside the strechRange, but within the range of the rangeFilter (if one is defined), will draw with the color and transparency assigned to either the minimum or maximum value in the stretchRange.

Constructors

new VoxelTransferFunctionStyle(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 transferFunction = new VoxelTransferFunctionStyle({
  stretchRange: [327.1, 2941.5],
  colorStops: [{
      color: [34, 44, 246, 255],
      position: 0
   }, {
      color: [68,166, 22, 255],
      position: 0.5
   }, {
       color: [252, 146, 251, 255],
       position: 1
   }],
  rangeFilter: {
	  range: [0, 3266]
 }
});

Property Overview

Name Type Summary Class
Collection<VoxelColorStop>

A collection of colors and normalized positions which describe how to colorize the data values that are within the stretchRange.

more details
VoxelTransferFunctionStyle
Collection<VoxelOpacityStop>

A collection of transparency values and normalized positions which describe how to apply transparency to the data values that are within the stretchRange.

more details
VoxelTransferFunctionStyle
VoxelRangeFilter

Defines the data range which will be rendered.

more details
VoxelTransferFunctionStyle
Number[]

The data range to apply the color and alpha stops to, specified as [minimum, maximum] in the units of the data.

more details
VoxelTransferFunctionStyle

Property Details

A collection of colors and normalized positions which describe how to colorize the data values that are within the stretchRange.

A collection of transparency values and normalized positions which describe how to apply transparency to the data values that are within the stretchRange.

rangeFilter VoxelRangeFilter

Defines the data range which will be rendered.

stretchRange Number[]

The data range to apply the color and alpha stops to, specified as [minimum, maximum] in the units of the data. Values outside this range, but within the rangeFilter (if there is one), will draw with the color assigned to either the minimum or maximum value in the stretchRange.

Method Overview

Name Return Type Summary Class
this

Creates a deep clone of this object.

more details
VoxelTransferFunctionStyle
*

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

more details
VoxelTransferFunctionStyle
Object

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

more details
VoxelTransferFunctionStyle

Method Details

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(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(){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

VoxelColorStop Object

VoxelColorStop defines a color and a normalized position.

Properties
color Color

The color to render data at this position with.

position Number

The normalized (i.e. 0 to 1) position.

VoxelOpacityStop Object

VoxelOpacityStop defines an opacity value and a normalized position.

Properties
opacity Number

The opacity value (0 = transparent, 1 = opaque) to apply to data at this position.

position Number

The normalized (i.e. 0 to 1) position.

VoxelRangeFilter Object

VoxelRangeFilter defines the data range which will be rendered.

Properties
enabled Boolean
optional
Default Value:false

Whether or not the filter is enabled.

range Number[]

The data range to render, specified as [minimum, maximum].

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