Skip to content
import VoxelTransferFunctionStyle from "@arcgis/core/layers/voxel/VoxelTransferFunctionStyle.js";
Inheritance:
VoxelTransferFunctionStyleAccessor
Since
ArcGIS Maps SDK for JavaScript 4.25

The VoxelTransferFunctionStyle allows you to define how an individual continuous variable is rendered as a volume or as sections. The stretchRange is the range in the data to apply the colorStops and opacityStops to. The rangeFilter defines which data values will draw.

Values outside the stretchRange, 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.

See also

Constructors

Constructor

Constructor
Parameters
ParameterTypeDescriptionRequired
properties
See the properties table 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]
}
});

Properties

Any properties can be set, retrieved or listened to. See the Watch for changes topic.

colorStops

autocast Property
Type
Collection<VoxelColorStop>

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

declaredClass

readonlyinherited Property
Type
string
Inherited from: Accessor

The name of the class. The declared class name is formatted as esri.folder.className.

opacityStops

autocast Property
Type
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.

rangeFilter

autocast Property
Type
VoxelRangeFilter | null | undefined

Defines the data range which will be rendered.

stretchRange

Property
Type
[ number, 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.

Methods

MethodSignatureClass
fromJSON
inherited static
fromJSON(json: any): any
clone
inherited
clone(): this
toJSON
inherited
toJSON(): any

fromJSON

inheritedstatic Method
Signature
fromJSON (json: any): any
Inherited from: JSONSupportMixin

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.

Parameters
ParameterTypeDescriptionRequired
json
any

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
any

Returns a new instance of this class.

clone

inherited Method
Signature
clone (): this
Inherited from: ClonableMixin

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
this

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

toJSON

inherited Method
Signature
toJSON (): any
Inherited from: JSONSupportMixin

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

Returns
any

The ArcGIS portal JSON representation of an instance of this class.