helios.backends.fury.tools

VTK/FURY tools

Classes

class helios.backends.fury.tools.Uniform(name, uniform_type, value)[source]

This creates a uniform shader variable

It’s responsible to store the value of a given uniform variable and call the related vtk_program

Parameters
  • name (str) – name of the uniform variable

  • uniform_type (str) –

    Uniform variable type which will be used inside the shader. Any of this are valid: 1fv, 1iv, 2f, 2fv, 2i, 3f, 3fv,

    3uc, 4f, 4fv, 4uc, GroupUpdateTime, Matrix, Matrix3x3, Matrix4x4, Matrix4x4v, f, i value: float or ndarray

  • value (type(uniform_type)) – should be a value which represent’s the shader uniform variable. For example, if uniform_type is ‘f’ then value should be a float; if uniform_type is ‘3f’ then value should be a 1x3 array.

class helios.backends.fury.tools.Uniforms(uniforms)[source]

Creates an object which store and execute an uniform variable.

Parameters

uniforms (list) – List of Uniform objects.

Examples

```python uniforms = [

Uniform(name=’edgeWidth’, uniform_type=’f’, value=edgeWidth)…

] CustomUniforms = Uniforms(markerUniforms) add_shader_callback(

sq_actor, CustomUniforms)

sq_actor.CustomUniforms = CustomUniforms sq_actor.CustomUniforms.edgeWidth = 0.5 ```