Skip to main content

Function: scaleRgbTransferFunction()

scaleRgbTransferFunction(rgbTransferFunction, scalingFactor): void

A utility that can be used to scale (in place) an RgbTransferFunction. We often use this to scale the transfer function based on a PET calculation.

Parameters

rgbTransferFunction: vtkColorTransferFunction

scalingFactor: number

Returns

void

Example

Grabbing a reference to the RGB Transfer function from the viewport:

const rgbTransferFunction = viewport
.getActor()
.getProperty()
.getRGBTransferFunction(0);

scaleRgbTransferFunction(rgbTransferFunction, 2);

See

ColorTransferFunction

Defined in

packages/core/src/utilities/scaleRgbTransferFunction.ts:22