/** * This object contains helper methods for generating a single-band [stretch visualization](https://developers.arcgis.com/javascript/latest/references/core/renderers/RasterStretchRenderer/) for raster layers (i.e. [ImageryLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/ImageryLayer/), [ImageryTileLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/ImageryTileLayer/), or [WCSLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/WCSLayer/)). * * The [createRenderer()](https://developers.arcgis.com/javascript/latest/references/core/smartMapping/raster/renderers/stretch/#createRenderer) method in this module generates a renderer that may be applied directly to the input layer. * * @since 4.20 */ import type RasterStretchRenderer from "../../../renderers/RasterStretchRenderer.js"; import type AlgorithmicColorRamp from "../../../rest/support/AlgorithmicColorRamp.js"; import type MultipartColorRamp from "../../../rest/support/MultipartColorRamp.js"; import type { RasterStretchType } from "../../../renderers/support/raster/types.js"; import type { RasterRendererParameters } from "./types.js"; export interface RasterStretchColorrampRendererParameters extends RasterRendererParameters { /** A preferred stretch type can be provided. See [RasterStretchRenderer.stretchType](https://developers.arcgis.com/javascript/latest/references/core/renderers/RasterStretchRenderer/#stretchType) for more information. */ stretchType?: RasterStretchType; /** The 0-based index of a selected band. */ bandId?: number; /** The color ramp to apply to the renderer. */ colorRamp?: AlgorithmicColorRamp | MultipartColorRamp; /** * The gamma values to be used if `useGamma` is `true`. * Gamma refers to the degree of contrast between the mid-level gray values of a raster dataset. * It does not affect the black or white values in a raster dataset, only the middle values. * By applying a gamma correction, you can control the overall brightness of an [ImageryLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/ImageryLayer/). * Gamma stretching is only valid when `stretchType` is `none`, `standard-deviation`, or `min-max`. See [RasterStretchRenderer.gamma](https://developers.arcgis.com/javascript/latest/references/core/renderers/RasterStretchRenderer/#gamma) for more information. */ gamma?: number; /** Indicates whether the `gamma` values should be used. When `false`, the gamma is calculated from the statistics and histogram of the data. */ useGamma?: boolean; /** * When `true`, calculates the renderer's statistics based on the current * display extent and recalculates them as you zoom and pan around the image. */ dynamicRangeAdjustment?: boolean; /** * Useful in scenarios where an image service does not have statistics. When `true`, this function estimates * global statistics to keep a constant visual on pan and zoom, unlike `dynamicRangeAdjustment` which recalculates statistics on each extent change. */ estimateStatistics?: boolean; /** * Only applicable to multidimensional datasets where a raster layer can contain more than one variable * (such as temperature, humidity, wind speed) with different statistics. Indicate the variable name here. */ variableName?: string; } /** * The result object of the [createRenderer()](https://developers.arcgis.com/javascript/latest/references/core/smartMapping/raster/renderers/stretch/#createRenderer) method. See the table * below for details of each property. */ export interface RasterStretchColorrampResult { /** * The RasterStretchRenderer renderer to apply * to the input layer. */ renderer: RasterStretchRenderer; /** The zero-based index of the band represented by the renderer. */ bandId: number; } /** * Generates a [RasterStretchRenderer](https://developers.arcgis.com/javascript/latest/references/core/renderers/RasterStretchRenderer/) to render data from a single raster band. * * @param parameters - Input parameters for generating a single-band stretch visualization. The `colorRamp`, `gamma`, `useGamma`, `dynamicRangeAdjustment` parameters are not related to stretch type. Pass them in to preserve the existing renderer settings if desired. * @returns Resolves to an object containing a stretch renderer that can be set on the input renderer. */ export function createRenderer(parameters: RasterStretchColorrampRendererParameters): Promise;