@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
68 lines (66 loc) • 4.91 kB
TypeScript
import type Collection from "../../core/Collection.js";
import type VoxelColorStop from "./VoxelColorStop.js";
import type VoxelOpacityStop from "./VoxelOpacityStop.js";
import type VoxelRangeFilter from "./VoxelRangeFilter.js";
import type { ClonableMixin } from "../../core/Clonable.js";
import type { JSONSupport } from "../../core/JSONSupport.js";
import type { VoxelColorStopProperties } from "./VoxelColorStop.js";
import type { ReadonlyArrayOrCollection } from "../../core/Collection.js";
import type { VoxelOpacityStopProperties } from "./VoxelOpacityStop.js";
import type { VoxelRangeFilterProperties } from "./VoxelRangeFilter.js";
export interface VoxelTransferFunctionStyleProperties extends Partial<Pick<VoxelTransferFunctionStyle, "stretchRange">> {
/** A collection of colors and normalized positions which describe how to colorize the data values that are within the [stretchRange](https://developers.arcgis.com/javascript/latest/references/core/layers/voxel/VoxelTransferFunctionStyle/#stretchRange). */
colorStops?: ReadonlyArrayOrCollection<VoxelColorStopProperties>;
/** A collection of transparency values and normalized positions which describe how to apply transparency to the data values that are within the [stretchRange](https://developers.arcgis.com/javascript/latest/references/core/layers/voxel/VoxelTransferFunctionStyle/#stretchRange). */
opacityStops?: ReadonlyArrayOrCollection<VoxelOpacityStopProperties>;
/** Defines the data range which will be rendered. */
rangeFilter?: VoxelRangeFilterProperties | null;
}
/**
* The VoxelTransferFunctionStyle allows you to define how an individual continuous variable is rendered as a volume or as sections.
* The [stretchRange](https://developers.arcgis.com/javascript/latest/references/core/layers/voxel/VoxelTransferFunctionStyle/#stretchRange) is the range in the data to apply the [colorStops](https://developers.arcgis.com/javascript/latest/references/core/layers/voxel/VoxelTransferFunctionStyle/#colorStops) and [opacityStops](https://developers.arcgis.com/javascript/latest/references/core/layers/voxel/VoxelTransferFunctionStyle/#opacityStops) to. The [rangeFilter](https://developers.arcgis.com/javascript/latest/references/core/layers/voxel/VoxelTransferFunctionStyle/#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.
*
* @since 4.25
* @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 VoxelTransferFunctionStyle extends VoxelTransferFunctionStyleSuperclass {
/**
* @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]
* }
* });
*/
constructor(properties?: VoxelTransferFunctionStyleProperties);
/** A collection of colors and normalized positions which describe how to colorize the data values that are within the [stretchRange](https://developers.arcgis.com/javascript/latest/references/core/layers/voxel/VoxelTransferFunctionStyle/#stretchRange). */
get colorStops(): Collection<VoxelColorStop>;
set colorStops(value: ReadonlyArrayOrCollection<VoxelColorStopProperties>);
/** A collection of transparency values and normalized positions which describe how to apply transparency to the data values that are within the [stretchRange](https://developers.arcgis.com/javascript/latest/references/core/layers/voxel/VoxelTransferFunctionStyle/#stretchRange). */
get opacityStops(): Collection<VoxelOpacityStop>;
set opacityStops(value: ReadonlyArrayOrCollection<VoxelOpacityStopProperties>);
/** Defines the data range which will be rendered. */
get rangeFilter(): VoxelRangeFilter | null | undefined;
set rangeFilter(value: VoxelRangeFilterProperties | null | undefined);
/** 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. */
accessor stretchRange: [
number,
number
];
}
declare const VoxelTransferFunctionStyleSuperclass: typeof JSONSupport & typeof ClonableMixin