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.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)[source]¶ 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.
-
addDisplayListeners
()[source]¶ Adds a bunch of listeners to the
Display
object, and the associatedMIPOpts
instance, 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 theImage
data, is up to date.
-
refreshCmapTextures
()[source]¶ Updates the colour map texture in line with the current
Display
andMIPOpts
settings.
-
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()
.
-
_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'¶
-