vol.overlay.colors.from.colortable: Compute voxel colors based on colortable.

Description Usage Arguments Value

View source: R/vis_volume.R

Description

Use the intensity values of the voxels in volume and lookup the respective colors in a colortable.

Usage

1
2
3
4
5
6
vol.overlay.colors.from.colortable(
  volume,
  colortable,
  ignored_struct_indices = c(),
  ignored_struct_names = c("unknown", "Unknown")
)

Arguments

volume

numeric 3D array, the values should be integers present in the 'struct_index' column of the colortable. All other values will be assigned 'NA' as a color.

colortable

a colortable, as returned by read.fs.colortable.

ignored_struct_indices

integer vector, 'struct_index' entries in the colortable that should be ignored

ignored_struct_names

vector of character strings, 'struct_name' entries in the colortable that should be ignored. Can be combined with 'ignored_struct_indices'.

Value

character string 3D array, the colors. Voxels in the volume which were not matched by the colortable are set to 'NA' in it.


neuroconductor/fsbrain documentation built on Sept. 16, 2020, 2:30 p.m.