fsleyes.gl.gl14.glvolume_funcs
¶
This module provides functions which are used by the GLVolume
class to render Image
overlays in an OpenGL 1.4 compatible manner.
An ARBPShader
is used to manage the glvolume
vertex/fragment
programs.
-
fsleyes.gl.gl14.glvolume_funcs.
init
(self)¶ Calls
compileShaders()
andupdateShaderState()
.
-
fsleyes.gl.gl14.glvolume_funcs.
destroy
(self)¶ Deletes handles to the vertex/fragment programs.
-
fsleyes.gl.gl14.glvolume_funcs.
compileShaders
(self)¶ Creates a
ARBPShader
instance.
-
fsleyes.gl.gl14.glvolume_funcs.
updateShaderState
(self)¶ Sets all variables required by the vertex and fragment programs.
-
fsleyes.gl.gl14.glvolume_funcs.
preDraw
(self, xform=None, bbox=None)¶ Prepares to draw a slice from the given
GLVolume
instance.
-
fsleyes.gl.gl14.glvolume_funcs.
draw2D
(self, zpos, axes, xform=None, bbox=None)¶ Draws a 2D slice of the image at the given Z location.
-
fsleyes.gl.gl14.glvolume_funcs.
draw3D
(self, xform=None, bbox=None)¶ Draws the image in 3D on the canvas.
Parameters: - self – The
GLVolume
object which is managing the image to be drawn. - xform – A 4*4 transformation matrix to be applied to the vertex data.
- bbox – An optional bounding box.
- self – The
-
fsleyes.gl.gl14.glvolume_funcs.
drawAll
(self, axes, zposes, xforms)¶ Draws mutltiple slices of the given image at the given Z position, applying the corresponding transformation to each of the slices.