Explore a VoxelLayer using dynamic section

This sample shows how to add and change a VoxelDynamicSection on a VoxelLayer.

A section is a plane which cuts through a voxel volume. Sections can reveal valuable information, such as soil composition and contamination across a subsurface profile. The VoxelDynamicSection allows you to define the properties of an individual dynamic section.

A VoxelDynamicSection can be added by defining a point, orientation and tilt. The point is a position on the slice plane specified as [x, y, z] in voxel space for both XYZ and XYZT volumes, and as [x, y, t] for XYT volumes. The properties of the voxel space are defined in VoxelVolume. sizeInVoxels contains the volume size in voxels and volumeType returns the type of the current volume.

Use dark colors for code blocksCopy
1
2
3
const vxlVolume = vxlLayer.getVolume(null);
const volSize = vxlVolume.sizeInVoxels;
const volType = vxlVolume.volumeType;

A horizontal section through the middle of the volume can be defined with a tilt and orientation of zero:

Use dark colors for code blocksCopy
1
2
3
4
5
let zValue = Math.floor(volSize[2] / 2);
let zSection = new VoxelDynamicSection({
    "orientation": 0,
    "tilt": 0,
    "point": [0, 0, zValue]});

Point, orientation and tilt can be modified with real-time rendering updates.

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