vispy.visuals.image.
ImageVisual
Bases: vispy.visuals.visual.Visual
vispy.visuals.visual.Visual
Visual subclass displaying an image.
ImageVisual data. Can be shape (M, N), (M, N, 3), or (M, N, 4).
Selects method of rendering image in case of non-linear transforms. Each method produces similar results, but may trade efficiency and accuracy. If the transform is linear, this parameter is ignored and a single quad is drawn around the area of the image.
‘auto’: Automatically select ‘impostor’ if the image is drawn with a nonlinear transform; otherwise select ‘subdivide’. ‘subdivide’: ImageVisual is represented as a grid of triangles with texture coordinates linearly mapped. ‘impostor’: ImageVisual is represented as a quad covering the entire view, with texture coordinates determined by the transform. This produces the best transformation results, but may be slow.
‘auto’: Automatically select ‘impostor’ if the image is drawn with a nonlinear transform; otherwise select ‘subdivide’.
‘subdivide’: ImageVisual is represented as a grid of triangles with texture coordinates linearly mapped.
‘impostor’: ImageVisual is represented as a quad covering the entire view, with texture coordinates determined by the transform. This produces the best transformation results, but may be slow.
If method=’subdivide’, this tuple determines the number of rows and columns in the image grid.
Colormap to use for luminance images.
Limits to use for the colormap. Can be ‘auto’ to auto-set bounds to the min and max of the data.
Gamma to use during colormap lookup. Final color will be cmap(val**gamma). by default: 1.
Selects method of image interpolation. Makes use of the two Texture2D interpolation methods and the available interpolation methods defined in vispy/gloo/glsl/misc/spatial_filters.frag
‘nearest’: Default, uses ‘nearest’ with Texture2D interpolation. ‘bilinear’: uses ‘linear’ with Texture2D interpolation. ‘hanning’, ‘hamming’, ‘hermite’, ‘kaiser’, ‘quadric’, ‘bicubic’,‘catrom’, ‘mitchell’, ‘spline16’, ‘spline36’, ‘gaussian’, ‘bessel’, ‘sinc’, ‘lanczos’, ‘blackman’
‘nearest’: Default, uses ‘nearest’ with Texture2D interpolation.
‘bilinear’: uses ‘linear’ with Texture2D interpolation.
‘catrom’, ‘mitchell’, ‘spline16’, ‘spline36’, ‘gaussian’, ‘bessel’, ‘sinc’, ‘lanczos’, ‘blackman’
Keyword arguments to pass to Visual.
Notes
The colormap functionality through cmap and clim are only used if the data are 2D.
cmap
clim
clim_normalized
Normalize current clims between 0-1 based on last-used texture data range. In _build_texture(), the data is normalized (on the CPU) to 0-1 using clim. During rendering, the frag shader will apply the final contrast adjustment based on the current clim.
gamma
The gamma used when rendering the image.
interpolation
interpolation_functions
method
set_data
Set the data
The image data.
size
view
Return a new view of this visual.