Clone wiki

TuiView / Surrogate Color Tables

Background

This feature allows other 'surrogate' color tables to be written into a file and a column in the attribute table used to 'look' up the color to be used from one of these surrogate color tables.

Writing Surrogate Color Tables

Use the 'viewerwritetable' utility. You will need a file that contains the color table you wish to write. Use like this:

viewerwritetable --source=/path/to/source/file.img --dest=output.img --name=mycolors

This will write the color table contained in the file /path/to/source/file.img as a surrogate colour table into output.img and will call it 'mycolors'. This can be done multiple times if you want multiple surrogate color tables. Just make sure you give them unique names. To list the surrogate color tables, use the --print option:

viewerwritetable --print=output.img

To remove a surrogate color table, use the --remove option along with the --name option:

viewerwritetable --remove=output.img --name=mycolors

Using surrogate color table in Viewer

This only works with Thematic data. In the Query Window, decide on the column to use as a lookup (must be integer). Right click on the column and select 'Set column as Color Table Lookup'. If there is one surrogate colour table available, it will be used. Otherwise you will be asked to select which color table to use. Values that are non-zero in this column will be used as a lookup into the selected color table for display. If this column is edited, the lookup will happen again and the screen updated.

Updated