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

The VoxelVolume exposes properties that describe the volume and methods to convert to and from voxel space.

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.

Properties

Any properties can be set, retrieved or listened to. See the Watch for changes topic.
PropertyTypeClass
declaredClass
readonly inherited
id
readonly
sizeInVoxels
readonly
volumeType
readonly

declaredClass

readonlyinherited Property
Type
string
Inherited from: Accessor

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

id

readonly Property
Type
number

The unique identifier for the volume.

Default value
0

sizeInVoxels

readonly Property
Type
[ number, number, number ]

A 3-component array containing the volume size in voxels. For XYZ and XYZT volumes the returned values are [x, y, z]. For XYT volumes the returned values are [x, y, t] where t represents the number of times in the volume which are represented along the z dimension.

volumeType

readonly Property
Type
VolumeType

Returns the type of the current variable's volume.

Methods

MethodSignatureClass
fromJSON
inherited static
fromJSON(json: any): any
computeLayerSpaceLocation(posInVoxelSpace: [ number, number, number ]): Point
computeVoxelSpaceLocation(pos: Point): [ number, number, number ]
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.

computeLayerSpaceLocation

Method
Signature
computeLayerSpaceLocation (posInVoxelSpace: [ number, number, number ]): Point

Convert a position in voxel space to the spatialReference of the layer.

Parameters
ParameterTypeDescriptionRequired
posInVoxelSpace

The voxel space position to convert to layer space as as [x, y, z].

Returns
Point

Returns a point in the layer's spatial reference. For XYT volumes returns an XY point and for XYZ and XYZT volumes returns an XYZ point.

computeVoxelSpaceLocation

Method
Signature
computeVoxelSpaceLocation (pos: Point): [ number, number, number ]

Convert a position from the layer's spatialReference to voxel space for XYZ or XYZT volumes.

Parameters
ParameterTypeDescriptionRequired
pos

The XYZ position in the voxel layer spatial reference to convert to voxel space.

Returns
[ number, number, number ]

Returns a 3-component array containing the position in voxel space as [x, y, z].

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.

Type definitions

VolumeType

Type definition
Type
"xyz" | "xyzt" | "xyt"