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.GLImageObjectThe
GLRGBVolumeclass is used to render RGB(A)Imageoverlays. 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
Imageinstance.overlayList – The
OverlayListdisplayCtx – The
DisplayContextmanaging the scene.canvas – The canvas doing the drawing.
threedee – 2D or 3D rendering
- addListeners()[source]
Adds listeners to
DisplayandVolumeRGBOptsproperties 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
ImageTextureorImageTexture2Dto store the image data.
- _interpChanged(*a)[source]
Called when the
VolumeRGBOpts.interpolationchanges. Updates the image texture.
- __imageTextureChanged(*a)
Called when the
imageTexturechanges. 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
numpyarray 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'