Skip to content

ImageProperty ​

Introduction ​

vtkImageProperty provides 2D image display support for vtk. It can be associated with a vtkImageSlice prop and placed within a Renderer.

This class resolves coincident topology with the same methods as vtkMapper.

Methods ​

extend ​

Method use to decorate a given object (publicAPI+model) with vtkImageProperty characteristics.

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

getAmbient ​

Get the lighting coefficient.

getColorLevel ​

Get the level value for window/level.

getColorWindow ​

Get the window value for window/level.

getComponentWeight ​

ArgumentTypeRequiredDescription
indexNumberYes

getDiffuse ​

Get the diffuse lighting coefficient.

getIndependentComponents ​

getInterpolationType ​

Get the interpolation type

getInterpolationTypeAsString ​

Get the interpolation type as a string

getLabelOutlineOpacity ​

Get the 0 to 1 opacity of the label outline.

getLabelOutlineThickness ​

gets the label outline thickness

getLabelOutlineThicknessByReference ​

Get the label outline thickness array by reference. This returns the actual internal array, not a copy.

getOpacity ​

Get the opacity of the object.

getPiecewiseFunction ​

Get the component weighting function.

ArgumentTypeRequiredDescription
idxNumberNo

getRGBTransferFunction ​

Get the currently set RGB transfer function.

ArgumentTypeRequiredDescription
idxNumberNo

getScalarOpacity ​

Alias to get the piecewise function (backwards compatibility)

ArgumentTypeRequiredDescription
idxNumberNo

getUpdatedExtents ​

Retrieves the updated extents.

This array is cleared after every successful render.

getUseLabelOutline ​

Check if label outline rendering.

newInstance ​

Method use to create a new instance of vtkImageProperty

ArgumentTypeRequiredDescription
initialValuesIImagePropertyInitialValuesNofor pre-setting some of its content

setAmbient ​

Set the ambient lighting coefficient.

ArgumentTypeRequiredDescription
ambientNumberYesThe ambient lighting coefficient.

setColorLevel ​

Set the level value for window/level.

ArgumentTypeRequiredDescription
colorLevelNumberYesThe level value for window/level.

setColorWindow ​

Set the window value for window/level.

ArgumentTypeRequiredDescription
colorWindowNumberYesThe window value for window/level.

setComponentWeight ​

ArgumentTypeRequiredDescription
indexNumberYes
valueNumberYes

setDiffuse ​

Set the diffuse lighting coefficient.

ArgumentTypeRequiredDescription
diffuseNumberYesThe diffuse lighting coefficient.

setIndependentComponents ​

ArgumentTypeRequiredDescription
independentComponentsBooleanYes

setInterpolationType ​

Set the interpolation type.

ArgumentTypeRequiredDescription
interpolationTypeInterpolationTypeYesThe interpolation type.

setInterpolationTypeToLinear ​

Set interpolationType to InterpolationType.LINEAR.

setInterpolationTypeToNearest ​

Set interpolationType to InterpolationType.NEAREST.

setLabelOutlineOpacity ​

Set opacity of the label outline.

Opacity must be between 0 and 1. If the given opacity is a number, the opacity will apply to all outline segments. If the given opacity is an array of numbers, each opacity value will apply to the label equal to the opacity value's index + 1. (This is the same behavior as setLabelOutlineThickness).

ArgumentTypeRequiredDescription
opacityNumber or Array[Number]Yes

setLabelOutlineThickness ​

It will set the label outline thickness for the labelmaps. It can accept a single number or an array of numbers. If a single number is provided, it will be used for all the segments. If an array is provided, it indicates the thickness for each segment index. For instance if you have a labelmap with 3 segments (0: background 1: liver 2: tumor), you can set the thickness to [2,4] to have a thicker outline for the tumor (thickness 4). It should be noted that the thickness is in pixel and also the first array value will control the default thickness for all labels when 0 or not specified.

ArgumentTypeRequiredDescription
labelOutlineThicknessNumber or Array[Number]Yes

setOpacity ​

Set the opacity of the object

ArgumentTypeRequiredDescription
opacityNumberYesThe opacity value.

setPiecewiseFunction ​

Set the piecewise function

ArgumentTypeRequiredDescription
indexNumberYes
funcvtkPiecewiseFunctionYes

setRGBTransferFunction ​

Set the color of a volume to an RGB transfer function

ArgumentTypeRequiredDescription
indexNumberYes
funcvtkColorTransferFunctionYes

setScalarOpacity ​

Alias to set the piecewise function

ArgumentTypeRequiredDescription
indexNumberYes
funcvtkPiecewiseFunctionYes

setUpdatedExtents ​

Informs the mapper to only update the specified extents at the next render.

If there are zero extents, the mapper updates the entire volume texture. Otherwise, the mapper will only update the texture by the specified extents during the next render call.

This array is cleared after a successful render.

ArgumentTypeRequiredDescription
extentsYes

setUseLabelOutline ​

Enable label outline rendering.

ArgumentTypeRequiredDescription
useLabelOutlineBooleanYes

setUseLookupTableScalarRange ​

Use the range that is set on the lookup table, instead of setting the range from the ColorWindow/ColorLevel settings

ArgumentTypeRequiredDescription
useLookupTableScalarRangeBooleanYes