pygfx.materials.VolumeBasicMaterial

class pygfx.materials.VolumeBasicMaterial(clim=None, map=None, gamma=1.0, interpolation='linear', **kwargs)

Bases: Material

Basic volume material.

Parameters:
  • clim (tuple) – The contrast limits to scale the data values with. Default (0, 1).

  • map (TextureMap | Texture) – The colormap to turn the voxel values into their final color.

  • gamma (float) – The gamma correction to apply to the image data. Default 1.

  • interpolation (str) – The method to interpolate the image data. Either ‘nearest’ or ‘linear’. Default ‘linear’.

  • kwargs (Any) – Additional kwargs will be passed to the material base class.

property map

The colormap to turn the voxel values into their final color. If not given or None, the values themselves represents the color. The dimensionality of the map can be 1D, 2D or 3D, but should match the number of channels in the volume.

property clim

The contrast limits to scale the data values with. Default (0, 1).

property gamma

The gamma correction to apply to the image data. Default 1.

property interpolation

The method to interpolate the image data. Either ‘nearest’ or ‘linear’.