ngtools.shaders
Functions to generate NeuroGlancer shaders.
NeuroGlancer shaders must be snippets of GLSL code. This module contains functions that dynamically generate such code snippets.
GLSL = OpenGL Shading Language.
pycolormaps
Namespace for dynamic colormaps.
Functions in this class return python functions.
colormaps
Namespace for dynamic colormaps.
Functions in this class return shader code.
make_colormap
staticmethod
Generate GLSL code for a colormap.
make_listed
staticmethod
Generate GLSL code for a listed colormap.
shaders
Namespace for full-fledged shaders.
skeleton
Shaders for skeletons.
annotation
Shaders for annotations.
colormap
staticmethod
Generate a shader based on a known colormap.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cmap
|
|
Name of a colormap. Must be a valid attribute from the
|
required |
load_fs_lut
Load a FreeSurfer lookup table.
Returns a dictionary that maps integer labels to tuples that contains 1. the structure name, as a string 2. the structure RGBA color, as a 4-tuple of values between 0 and 1.