read.fs.colortable | R Documentation |
Read a colortable from a text file in FreeSurfer ASCII colortable lookup table (LUT) format. An example file is 'FREESURFER_HOME/FreeSurferColorLUT.txt'.
read.fs.colortable(filepath, compute_colorcode = FALSE)
filepath |
string. Full path to the output colormap file. |
compute_colorcode |
logical, indicates whether the unique color codes should be computed and added to the returned data.frame as an extra integer column named 'code'. Defaults to FALSE. |
the data.frame that was read from the LUT file. It contains the following columns that were read from the file: 'struct_index': integer, index of the struct entry. 'struct_name': character string, the label name. 'r': integer in range 0-255, the RGBA color value for the red channel. 'g': same for green channel. 'b': same for blue channel. 'a': same for alpha (transparency) channel. If 'compute_colorcode' is TRUE, it also contains the following columns which were computed from the color values: 'code': integer, unique color identifier computed from the RGBA values.
Other atlas functions:
colortable.from.annot()
,
read.fs.annot()
,
write.fs.annot.gii()
,
write.fs.annot()
,
write.fs.colortable()
Other colorLUT functions:
colortable.from.annot()
,
write.fs.colortable()
lutfile = system.file("extdata", "colorlut.txt", package = "freesurferformats", mustWork = TRUE);
colortable = read.fs.colortable(lutfile, compute_colorcode=TRUE);
head(colortable);
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.