fsleyes.gl.gl21.glvolume_funcs¶
This module provides functions which are used by the GLVolume
class to render Image overlays in an OpenGL 2.1 compatible manner.
A GLSLShader is used to manage the glvolume vertex/fragment
shader programs.
-
fsleyes.gl.gl21.glvolume_funcs.init(self)¶ Calls
compileShaders()andupdateShaderState().
-
fsleyes.gl.gl21.glvolume_funcs.destroy(self)¶ Cleans up the shader programs.
-
fsleyes.gl.gl21.glvolume_funcs.compileShaders(self)¶ Loads the vertex/fragment shader source, and creates a
GLSLShader.
-
fsleyes.gl.gl21.glvolume_funcs.updateShaderState(self)¶ Updates the parameters used by the shader programs, reflecting the current display properties.
-
fsleyes.gl.gl21.glvolume_funcs.preDraw(self, xform=None, bbox=None)¶ Sets up the GL state to draw a slice from the given
GLVolumeinstance.
-
fsleyes.gl.gl21.glvolume_funcs.draw2D(self, zpos, axes, xform=None, bbox=None)¶ Draws the specified 2D slice from the specified image on the canvas.
Parameters: - self – The
GLVolumeobject which is managing the image to be drawn. - zpos – World Z position of slice to be drawn.
- axes – x, y, z axis indices.
- xform – A 4*4 transformation matrix to be applied to the vertex data.
- bbox – An optional bounding box.
- self – The
-
fsleyes.gl.gl21.glvolume_funcs.draw3D(self, xform=None, bbox=None)¶ Draws the image in 3D on the canvas.
Parameters: - self – The
GLVolumeobject 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.gl21.glvolume_funcs.drawAll(self, axes, zposes, xforms)¶ Draws all of the specified slices.