pyvista.LookupTable.to_opacity_tf

pyvista.LookupTable.to_opacity_tf#

LookupTable.to_opacity_tf(
clamping: bool = True,
max_clip: float = 0.998,
) vtkPiecewiseFunction[source]#

Return the opacity transfer function of this table.

Parameters:
clampingbool, optional

When zero range clamping is False, values returns 0.0 when a value is requested outside of the points specified.

Added in version 0.44.

max_clipfloat, default: 0.998

The maximum value to clip the opacity to. This is useful for volume rendering to avoid the jarring effect of completely opaque values.

Added in version 0.45.

Returns:
vtk.vtkPiecewiseFunction

Piecewise function of the opacity of this color table.

Examples

>>> import pyvista as pv
>>> lut = pv.LookupTable()
>>> tf = lut.to_opacity_tf()
>>> tf
<vtkmodules.vtkCommonDataModel.vtkPiecewiseFunction(...) at ...>