fsleyes.gl.gl14.gllinevector_funcs¶
This module provides functions which are used by the GLLineVector
class to render Image overlays as line vector images in an OpenGL 1.4
compatible manner.
This module uses functions in the gl14.glvector_funcs module, which
contains logic used for rendering both GLRGBVector and GLLineVector
instances.
A GLLineVertices instance is used to generate line vertices and
texture coordinates for each voxel in the image. A fragment shader (the same
as that used by the GLRGBVector class) is used to colour each line
according to the orientation of the underlying vector.
-
fsleyes.gl.gl14.gllinevector_funcs.init(self)[source]¶ Compiles and configures the vertex/fragment shader programs, generates line vertices, and adds some listeners to properties of the
LineVectorOptsinstance associated with the vectorImageoverlay. This involves calls to thecompileShaders(),updateShaderState(), andupdateVertices()functions.
-
fsleyes.gl.gl14.gllinevector_funcs.destroy(self)[source]¶ Destroys the vertex/fragment shader programs and the
GLLineVerticesinstance, and removes property listeners from theLineVectorOptsinstance.
-
fsleyes.gl.gl14.gllinevector_funcs.compileShaders(self)[source]¶ Compiles shader programs via the
gl14.glvector_funcs.compileShaders()function, and calls theupdateVertices()function.
-
fsleyes.gl.gl14.gllinevector_funcs.updateVertices(self)[source]¶ Creates/refreshes the
GLLineVerticesinstance which is used to generate line vertices and texture coordinates. If theGLLineVerticesinstance exists and is up to date (see theGLLineVertices.calculateHash()method), this function does nothing.
-
fsleyes.gl.gl14.gllinevector_funcs.updateShaderState(self)[source]¶ Updates all fragment/vertex shader program variables. The fragment shader is configured by the
gl21.glvector_funcs.updateFragmentShaderState()function.
-
fsleyes.gl.gl14.gllinevector_funcs.preDraw(self, xform=None, bbox=None)[source]¶ Initialises the GL state ready for drawing the
GLLineVector.
-
fsleyes.gl.gl14.gllinevector_funcs.draw2D(self, zpos, axes, xform=None, bbox=None)[source]¶ Draws the line vertices corresponding to a 2D plane located at the specified Z location.
-
fsleyes.gl.gl14.gllinevector_funcs.drawAll(self, axes, zposes, xforms)[source]¶ Draws line vertices corresponding to each Z location.
-
fsleyes.gl.gl14.gllinevector_funcs.postDraw(self, xform=None, bbox=None)[source]¶ Clears the GL state after drawing the
GLLineVector.