cortex.dataset.VertexRGB

class cortex.dataset.VertexRGB(red, green, blue, subject=None, alpha=None, description='', state=None, **kwargs)[source]

Contains RGB (or RGBA) colors for each vertex in a surface dataset. Includes information about the subject.

Each color channel is represented as a separate Vertex object (these can either be supplied explicitly as Vertex objects or implicitly as np arrays). The vmin for each Vertex will be mapped to the minimum value for that color channel, and the vmax will be mapped to the maximum value.

Parameters:
redndarray or Vertex

Array or Vertex that represents the red component of the color for each voxel. Can be a 1D or 3D array (see Vertex for details), or a Vertex.

greenndarray or Vertex

Array or Vertex that represents the green component of the color for each voxel. Can be a 1D or 3D array (see Vertex for details), or a Vertex.

bluendarray or Vertex

Array or Vertex that represents the blue component of the color for each voxel. Can be a 1D or 3D array (see Vertex for details), or a Vertex.

subjectstr, optional

Subject identifier. Must exist in the pycortex database. If not given, red must be a Vertex from which the subject can be extracted.

alphandarray or Vertex, optional

Array or Vertex that represents the alpha component of the color for each voxel. Can be a 1D or 3D array (see Vertex for details), or a Vertex. If None, all vertices will be assumed to have alpha=1.0.

descriptionstr, optional

String describing this dataset. Displayed in webgl viewer.

stateoptional

TODO: describe what this is

**kwargs

All additional arguments in kwargs are passed to the VertexData and Dataview.

Methods

__init__(red, green, blue[, subject, alpha, ...])

blend_curvature(alpha[, threshold, ...])

Blend the data with a curvature map depending on a transparency map.

copy(*args, **kwargs)

from_hdf(node[, subject])

get_cmapdict()

Returns a dictionary with cmap information.

to_json([simple])

uniques([collapse])

Attributes

alpha

Compute alpha transparency

left

name

priority

raw

right

vertices

3-dimensional volume (t, v, rgba) with data that has been mapped into 8-bit unsigned integers that correspond to colors.