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)¶ 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)¶ 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
-
destroy()¶ Must be called when this
GLRGBVolumeis no longer needed.
-
addListeners()¶ Adds listeners to
DisplayandVolumeRGBOptsproperties which should result in the display being refreshed.
-
removeListeners()¶ Removes the property listeners that were added in
addListeners().
-
ready()¶ Returns
Trueif thisGLRGBVolumeis ready to be used,Falseotherwise.
-
textureReady()¶ Returns
Trueif the image texture is ready to be used,Falseotherwise.
-
updateShaderState(*args, **kwargs)¶
-
refreshImageTexture()¶ (Re-)creates an
ImageTextureorImageTexture2Dto store the image data.
-
_interpChanged(*a)¶ Called when the
VolumeRGBOpts.interpolationchanges. Updates the image texture.
-
channelColours()¶ Returns a
numpyarray of shape(3, 4), containing the colours to use for each of the three channels.
-
preDraw(xform=None, bbox=None)¶ Called before a draw. Binds the image texture.
-
draw2D(zpos, axes, xform=None, bbox=None)¶ Calls
glrgbvolume_funcs.draw2D().
-
drawAll(axes, zposes, xforms)¶ Calls
glrgbvolume_funcs.drawAll().
-
draw3D(xform=None, bbox=None)¶ Does nothing.
-
postDraw(xform=None, bbox=None)¶ Called after a draw. Unbinds the image texture.
-
_GLRGBVolume__imageTextureChanged(*a)¶ Called when the
imageTexturechanges. CallsupdateShaderState().
-
__module__= 'fsleyes.gl.glrgbvolume'¶
-