require(["esri/layers/voxel/VoxelTransferFunctionStyle"], (VoxelTransferFunctionStyle) => { /* code goes here */ });
import VoxelTransferFunctionStyle from "@arcgis/core/layers/voxel/VoxelTransferFunctionStyle.js";
esri/layers/voxel/VoxelTransferFunctionStyle
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.
Constructors
-
Parameterproperties Objectoptional
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 |
---|---|---|---|
A collection of colors and normalized positions which describe how to colorize the data values that are within the stretchRange. | VoxelTransferFunctionStyle | ||
A collection of transparency values and normalized positions which describe how to apply transparency to the data values that are within the stretchRange. | VoxelTransferFunctionStyle | ||
Defines the data range which will be rendered. | VoxelTransferFunctionStyle | ||
The data range to apply the color and alpha stops to, specified as [minimum, maximum] in the units of the data. | VoxelTransferFunctionStyle |
Property Details
-
colorStops
colorStops Collection<VoxelColorStop>
-
A collection of colors and normalized positions which describe how to colorize the data values that are within the stretchRange.
-
opacityStops
opacityStops 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
rangeFilter VoxelRangeFilter
-
Defines the data range which will be rendered.
-
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. | VoxelTransferFunctionStyle | |
* | Creates a new instance of this class and initializes it with values from a JSON object generated from an ArcGIS product. | VoxelTransferFunctionStyle | |
Converts an instance of this class to its ArcGIS portal JSON representation. | VoxelTransferFunctionStyle |
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
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.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.
ReturnsType Description * Returns a new instance of this class.
-
toJSON
toJSON(){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
-
VoxelColorStop
VoxelColorStop Object
-
VoxelColorStop defines a color and a normalized position.
-
VoxelOpacityStop
VoxelOpacityStop Object
-
VoxelOpacityStop defines an opacity value and a normalized position.