cortex.dataset.VolumeRGB.color_voxels¶
- static VolumeRGB.color_voxels(channel1, channel2, channel3, channel1color, channel2color, channel3Color, value_max, saturation_max, common_range, common_min, common_max, alpha=None)[source]¶
Colors voxels in 3 color dimensions but not necessarily canonical red, green, and blue Parameters ———- channel1 : ndarray or Volume
voxel values for first channel
- channel2ndarray or Volume
voxel values for second channel
- channel3ndarray or Volume
voxel values for third channel
- channel1colortuple<uint8, uint8, uint8>
color in RGB for first channel
- channel2colortuple<uint8, uint8, uint8>
color in RGB for second channel
- channel3Colortuple<uint8, uint8, uint8>
color in RGB for third channel
- value_maxfloat, optional
Maximum HSV value for voxel colors. If not given, will be the value of the average of the three channel colors.
- saturation_maxfloat [0, 1]
Maximum HSV saturation for voxel colors.
- common_rangebool
Use the same vmin and vmax for all three color channels?
- common_minfloat, optional
Predetermined shared vmin. Does nothing if shared_range == False. If not given, will be the 1st percentile of all values across all three channels.
- common_maxfloat, optional
Predetermined shared vmax. Does nothing if shared_range == False. If not given, will be the 99th percentile of all values across all three channels
- alphandarray or Volume, optional
Alpha values for each voxel. If None, alpha is set to 1 for all voxels.
- Returns:
- redndarray of channel1.shape
uint8 array of red values
- greenndarray of channel1.shape
uint8 array of green values
- bluendarray of channel1.shape
uint8 array of blue values
- alphandarray
If alpha=None, uint8 array of alpha values with alpha=1 for every voxel. Otherwise, the same alpha values that were passed in. Additionally, voxels with NaNs will have an alpha value of 0.