fsleyes.gl.glmip
The GLMIP class can be used to render
maximum-intensity-projections of an Image overlay onto a 2D canvas.
- class fsleyes.gl.glmip.GLMIP(image, overlayList, displayCtx, canvas, threedee)[source]
Bases:
fsleyes.gl.glimageobject.GLImageObjectThe
GLMIPclass is aGLImageObjectwhich can be used to render maximum-intensity-projections of anImageoverlay onto a 2D canvas.There is no support for rending a MIP onto a 3D canvas, as the
GLVolumecan be used to achieve a MIP-like effect.To use the
GLMIP, theDisplay.overlayTypeattribute for the image must be set to'mip'. See theMIPOptsclass for more details.The
GLMIPclass uses functions defined in thegl21.glmip_funcsmodule - there is currently no support for OpenGL 1.4.- __init__(image, overlayList, displayCtx, canvas, threedee)[source]
Create a
GLMIP.- Parameters
image – An
Imageobject.overlayList – The
OverlayListdisplayCtx – The
DisplayContextobject managing the scene.canvas – The canvas doing the drawing.
threedee – Set up for 2D or 3D rendering.
- addDisplayListeners()[source]
Adds a bunch of listeners to the
Displayobject, and the associatedMIPOptsinstance, which define how the image should be displayed.
- removeDisplayListeners()[source]
Removes all listeners added by
addDisplayListeners().
- refreshImageTexture()[source]
Makes sure that the
ImageTexture, used to store theImagedata, is up to date.
- refreshCmapTextures()[source]
Updates the colour map texture in line with the current
DisplayandMIPOptssettings.
- updateShaderState(*args, **kwargs)[source]
Calls
gl21.glmip_funcs.updateShaderState(), andNotifier.notify(). Usesidle.idleWhen()to ensure that they don’t get called untilready()returnsTrue.
- draw2D(zpos, axes, xform=None, bbox=None)[source]
Calls
gl21.glmip_funcs.draw2D().
- __volumeChanged(*a)
Called when the
NiftiOpts.volumeproperty changes. Updates the image texture accordingly.
- __interpChanged(*a)
Called when the
MIPOpts.interpolationchanges. Updates the image texture.
- __imageTextureChanged(*a)
Called when the image texture data has changed. Triggers a refresh.
- __imageSyncChanged(*a)
Called when the
NiftiOpts.volumeproperty is synchronised or un-synchronised. CallsrefreshImageTexture()andupdateShaderState().
- __annotations__ = {}
- __module__ = 'fsleyes.gl.glmip'