Write colortable file in FreeSurfer ASCII LUT format.
Source:R/write_fs_annot.R
write.fs.colortable.RdWrite the colortable to a text file in FreeSurfer ASCII colortable lookup table (LUT) format. An example file is FREESURFER_HOME/FreeSurferColorLUT.txt.
Arguments
- filepath,
string. Full path to the output colormap file.
- colortable
data.frame, a colortable as read by
read.fs.colortable. Must contain the following columns: '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. Can contain the following column: 'struct_index': integer, index of the struct entry. If this column does not exist, sequential indices starting at zero are created.
Value
the written dataframe, invisible. Note that this is will contain a column named 'struct_index', no matter whether the input colortable contained it or not.
See also
Other atlas functions:
colortable.from.annot(),
read.fs.annot(),
read.fs.colortable(),
write.fs.annot(),
write.fs.annot.gii()
Other colorLUT functions:
colortable.from.annot(),
read.fs.colortable()