Skip to content

ScalarToRGBA ​

Introduction ​

vtkScalarToRGBA - map the scalars of an image to an RGBA image

vtkScalarToRGBA converts the point scalars of the input vtkImageData into a four-component unsigned char array, using the lookup table for the color and the piecewise function for the alpha channel. The output vtkImageData keeps the extent, spacing, origin and direction of the input.

Methods ​

extend ​

Method used to decorate a given object (publicAPI+model) with vtkScalarToRGBA characteristics.

ArgumentTypeRequiredDescription
publicAPIYesobject on which methods will be bounds (public)
modelYesobject on which data structure will be bounds (protected)
initialValuesIScalarToRGBAInitialValuesNo(default: {})

getLookupTable ​

Get the lookup table mapping the input scalars to RGB.

getPiecewiseFunction ​

Get the transfer function mapping the input scalars to opacity.

newInstance ​

Method used to create a new instance of vtkScalarToRGBA

ArgumentTypeRequiredDescription
initialValuesIScalarToRGBAInitialValuesNofor pre-setting some of its content

requestData ​

ArgumentTypeRequiredDescription
inDataYes
outDataYes

setLookupTable ​

Set the lookup table mapping the input scalars to RGB.

ArgumentTypeRequiredDescription
lookupTablevtkScalarsToColorsYes

setPiecewiseFunction ​

Set the transfer function mapping the input scalars to opacity.

ArgumentTypeRequiredDescription
piecewiseFunctionvtkPiecewiseFunctionYes