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)¶ Bases:
fsleyes.gl.glimageobject.GLImageObject
The
GLMIP
class is aGLImageObject
which can be used to render maximum-intensity-projections of anImage
overlay onto a 2D canvas.There is no support for rending a MIP onto a 3D canvas, as the
GLVolume
can be used to achieve a MIP-like effect.To use the
GLMIP
, theDisplay.overlayType
attribute for the image must be set to'mip'
. See theMIPOpts
class for more details.The
GLMIP
class uses functions defined in thegl21.glmip_funcs
module - there is currently no support for OpenGL 1.4.-
__init__
(image, overlayList, displayCtx, canvas, threedee)¶ Create a
GLMIP
.- Parameters
image – An
Image
object.overlayList – The
OverlayList
displayCtx – The
DisplayContext
object managing the scene.canvas – The canvas doing the drawing.
threedee – Set up for 2D or 3D rendering.
-
destroy
()¶ Clears up resources used by the
GLMIP
.
-
addDisplayListeners
()¶ Adds a bunch of listeners to the
Display
object, and the associatedMIPOpts
instance, which define how the image should be displayed.
-
removeDisplayListeners
()¶ Removes all listeners added by
addDisplayListeners()
.
-
refreshImageTexture
()¶ Makes sure that the
ImageTexture
, used to store theImage
data, is up to date.
-
refreshCmapTextures
()¶ Updates the colour map texture in line with the current
Display
andMIPOpts
settings.
-
updateShaderState
(*args, **kwargs)¶ Calls
gl21.glmip_funcs.updateShaderState()
, andNotifier.notify()
. Usesidle.idleWhen()
to ensure that they don’t get called untilready()
returnsTrue
.
-
ready
()¶ Returns
True
if thisGLMIP
is ready to be drawn,False
otherwise.
-
textureReady
()¶ Returns
True
if theimageTexture
is ready to be used,False
otherwise.
-
preDraw
(xform=None, bbox=None)¶ Binds textures.
-
draw2D
(zpos, axes, xform=None, bbox=None)¶ Calls
gl21.glmip_funcs.draw2D()
.
-
draw3D
(xform=None, bbox=None)¶ Does nothing.
-
postDraw
(xform=None, bbox=None)¶ Unbinds textures.
-
_GLMIP__imageSyncChanged
(*a)¶ Called when the
NiftiOpts.volume
property is synchronised or un-synchronised. CallsrefreshImageTexture()
andupdateShaderState()
.
-
_GLMIP__imageTextureChanged
(*a)¶ Called when the image texture data has changed. Triggers a refresh.
-
_GLMIP__interpChanged
(*a)¶ Called when the
MIPOpts.interpolation
changes. Updates the image texture.
-
_GLMIP__volumeChanged
(*a)¶ Called when the
NiftiOpts.volume
property changes. Updates the image texture accordingly.
-
__module__
= 'fsleyes.gl.glmip'¶
-