fsleyes.gl.glrgbvolume
This module provides the GLRGBVolume
class, used for rendering
RGB(A) Image
overlays.
- class fsleyes.gl.glrgbvolume.GLRGBVolume(image, overlayList, displayCtx, canvas, threedee)[source]
Bases:
fsleyes.gl.glimageobject.GLImageObject
The
GLRGBVolume
class is used to render RGB(A)Image
overlays. The RGB(A) value at each voxel is directly used as the colour for that voxel.- __init__(image, overlayList, displayCtx, canvas, threedee)[source]
Create a
GLRGBVolume
.- Parameters
image – The
Image
instance.overlayList – The
OverlayList
displayCtx – The
DisplayContext
managing the scene.canvas – The canvas doing the drawing.
threedee – 2D or 3D rendering
- addListeners()[source]
Adds listeners to
Display
andVolumeRGBOpts
properties which should result in the display being refreshed.
- removeListeners()[source]
Removes the property listeners that were added in
addListeners()
.
- updateShaderState(*args, **kwargs)[source]
Calls
gl14.glrgbvolume_funcs.updateShaderState()
orgl12.glrgbvolume_funcs.updateShaderState()
.
- refreshImageTexture()[source]
(Re-)creates an
ImageTexture
orImageTexture2D
to store the image data.
- _interpChanged(*a)[source]
Called when the
VolumeRGBOpts.interpolation
changes. Updates the image texture.
- __imageTextureChanged(*a)
Called when the
imageTexture
changes. CallsupdateShaderState()
.
- generateVertices2D(zpos, axes, bbox=None)[source]
Overrides
GLImageObject.generateVertices2D()
.Appliies the
ImageTextureBase.texCoordXform()
to the texture coordinates - this is performed to support 2D images/textures.
- channelColours()[source]
Returns a
numpy
array of shape(3, 4)
, containing the colours to use for each of the three channels.
- draw2D(zpos, axes, xform=None, bbox=None)[source]
Calls
glrgbvolume_funcs.draw2D()
.
- drawAll(axes, zposes, xforms)[source]
Calls
glrgbvolume_funcs.drawAll()
.
- __annotations__ = {}
- __module__ = 'fsleyes.gl.glrgbvolume'