pygfx.materials.ImageBasicMaterial
- class pygfx.materials.ImageBasicMaterial(clim=None, map=None, gamma=1.0, interpolation='nearest', **kwargs)
Bases:
Material
Rasterized image material.
- Parameters:
clim (tuple) – The contrast limits to scale the data values with. Default (0, 1).
map (TextureMap | Texture) – The texture map to turn the image values into its final color. Optional.
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 ‘nearest’.
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.
Note: for scientific data, it is usually to set wrap mode to ‘clamp’.
- 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’.