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);