@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
96 lines (94 loc) • 4.61 kB
TypeScript
import type Collection from "../../core/Collection.js";
import type VoxelIsosurface from "./VoxelIsosurface.js";
import type VoxelTransferFunctionStyle from "./VoxelTransferFunctionStyle.js";
import type VoxelUniqueValue from "./VoxelUniqueValue.js";
import type { JSONSupport } from "../../core/JSONSupport.js";
import type { VoxelTransferFunctionStyleProperties } from "./VoxelTransferFunctionStyle.js";
import type { VoxelUniqueValueProperties } from "./VoxelUniqueValue.js";
import type { ReadonlyArrayOrCollection } from "../../core/Collection.js";
import type { VoxelIsosurfaceProperties } from "./VoxelIsosurface.js";
export interface VoxelVariableStyleProperties extends Partial<Pick<VoxelVariableStyle, "label" | "variableId">> {
/** The collection of continuous variable isosurfaces. */
isosurfaces?: ReadonlyArrayOrCollection<VoxelIsosurfaceProperties>;
/** The transferFunction describes how to render continuous variable volumes and sections. */
transferFunction?: VoxelTransferFunctionStyleProperties;
/** The collection of unique values describes how to render discrete variable volumes and sections. */
uniqueValues?: ReadonlyArrayOrCollection<VoxelUniqueValueProperties>;
}
/**
* The VoxelVariableStyle allows you to define how an individual variable is rendered. The [transferFunction](https://developers.arcgis.com/javascript/latest/references/core/layers/voxel/VoxelVariableStyle/#transferFunction) and [isosurfaces](https://developers.arcgis.com/javascript/latest/references/core/layers/voxel/VoxelVariableStyle/#isosurfaces) properties apply to continuous variables, while the [uniqueValues](https://developers.arcgis.com/javascript/latest/references/core/layers/voxel/VoxelVariableStyle/#uniqueValues)
* property applies to discrete variables.
*
* @since 4.25
* @see [Sample - VoxelLayer with discrete variable](https://developers.arcgis.com/javascript/latest/sample-code/layers-voxel-discrete-variable/)
* @see [Sample - Explore a VoxelLayer using isosurface](https://developers.arcgis.com/javascript/latest/sample-code/layers-voxel-isosurface/)
* @see [Sample - Modify the color scheme of a continuous variable](https://developers.arcgis.com/javascript/latest/sample-code/layers-voxel-color-stops/)
* @see [Sample - Modify the opacity of a continuous variable](https://developers.arcgis.com/javascript/latest/sample-code/layers-voxel-opacity-stops/)
*/
export default class VoxelVariableStyle extends JSONSupport {
/**
* @example
* // Typical usage
* let vxlVariableStyle = new VoxelVariableStyle({
* variableId: 0,
* transferFunction: {
* interpolation: "linear",
* stretchRange: [-803.3854370117188, 804.6875],
* colorStops: [
* {
* color: [23, 244, 247, 255],
* position: 0
* },
* {
* color: [87, 25, 244, 255],
* position: 0.5
* },
* {
* color: [255, 37, 245, 255],
* position: 1
* }
* ],
* rangeFilter: {
* range: [-1000, 1000]
* }
* },
* isosurfaces: [
* {
* color: [102, 136, 248, 255],
* value: -374.6990966796875,
* label: "f32 data -1000 to 1000"
* }
* ],
* label: "f32 data -1000 to 1000"
* });
*/
constructor(properties?: VoxelVariableStyleProperties);
/** The collection of continuous variable isosurfaces. */
get isosurfaces(): Collection<VoxelIsosurface>;
set isosurfaces(value: ReadonlyArrayOrCollection<VoxelIsosurfaceProperties>);
/**
* The variable label.
*
* @default ""
*/
accessor label: string;
/** The transferFunction describes how to render continuous variable volumes and sections. */
get transferFunction(): VoxelTransferFunctionStyle;
set transferFunction(value: VoxelTransferFunctionStyleProperties);
/** The collection of unique values describes how to render discrete variable volumes and sections. */
get uniqueValues(): Collection<VoxelUniqueValue>;
set uniqueValues(value: ReadonlyArrayOrCollection<VoxelUniqueValueProperties>);
/**
* Id of the [VoxelVariable](https://developers.arcgis.com/javascript/latest/references/core/layers/voxel/VoxelVariable/) that the style applies to.
*
* @default 0
*/
accessor variableId: number;
/**
* 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 A deep clone of the class instance that invoked this method.
*/
clone(): VoxelVariableStyle;
}