pygfx.materials.ImageBasicMaterial

class pygfx.materials.ImageBasicMaterial(clim=None, map=None, interpolation='nearest', map_interpolation='linear', **kwargs)

Bases: Material

Rasterized image material.

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

  • map (Texture) – The texture map to turn the image values into its final color. Optional.

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

  • map_interpolation (str) – The method to interpolate the color map. Either ‘nearest’ or ‘linear’. Default ‘linear’.

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

property map

The texture map to turn the image values into its final color. If None, the values themselves represents the color. The dimensionality of the texture map can be 1D, 2D or 3D, but should match the number of channels in the image.

property clim

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

property interpolation

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

property map_interpolation

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