cortex.dataset.VolumeRGB

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

Contains RGB (or RGBA) colors for each voxel in a volumetric dataset. Includes information about the subject and transform for the data.

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

Parameters
redndarray or Volume

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

greenndarray or Volume

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

bluendarray or Volume

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

subjectstr, optional

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

xfmnamestr, optional

Transform name. Must exist in the pycortex database. If not given, red must be a Volume from which the subject can be extracted.

alphandarray or Volume, optional

Array or Volume that represents the alpha component of the color for each voxel. Can be a 1D or 3D array (see Volume for details), or a Volume. If None, all voxels 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 VolumeData and Dataview.

Methods

__init__(self, red, green, blue[, subject, …])

Initialize self.

copy(self, \*args, \*\*kwargs)

from_hdf(node)

to_json(self[, simple])

uniques(self[, collapse])

Attributes

name

priority

raw

volume

5-dimensional volume (t, z, y, x, rgba) with data that has been mapped into 8-bit unsigned integers that correspond to colors.