pygfx.materials.VolumeBasicMaterial
- class pygfx.materials.VolumeBasicMaterial(maprange=None, clim=None, map=None, gamma=1.0, interpolation='linear', **kwargs)
Bases:
MaterialBasic volume material.
- Parameters:
maprange (tuple) – The range of the
geometry.texcoordsthat is projected onto the (color) map. Default (0, 1).clim (tuple) – The contrast limits. Alias for maprange.
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 maprange
The range of the
geometry.texcoordsthat is projected onto the (color) map.By default this value is (0.0, 1.0), but if the
texcoordsrepresents some domain-specific value, e.g. temperature, thenmaprangecan be set to e.g. (0, 100).
- property clim
Alias for maprange; for images, clim (contrast limits) is a common term.
- 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’.