Clone wiki

TuiView / Command line interface

One of the features of TuiView is the ability to provide images, and specify display options from the command line. The command line options (available by typing tuiview --help) are:

  -h, --help            show this help message and exit
  -b BANDS, --bands=BANDS
                        comma seperated list of bands to display
  -c, --colortable      Apply color table to image
  -g, --greyscale       Display image in greyscale
  -r, --rgb             use 3 bands to create RGB image
  -n, --nostretch       do no stretch on data
  -l LINEAR, --linear=LINEAR
                        do a linear stretch between two values. Pass 'stats'
                        for statistics
  -s, --stddev          do a 2 standard deviation stretch
  --hist                do a histogram stretch
                        Load stretch and lookup table from text file
                        Load stretch and lookup table from GDAL file that
                        contains saved stretch and lookup table
  --noplugins           Don\'t load plugins
  --separate            load multiple files into separate windows
  --goto=GOTO           Zoom to a location. Format is:
                        'easting,northing,factor' where factor is meters per
                        window pixel.
  -v VECTORS, --vector=VECTORS
                        overlay vector file on top of rasters. Can be
                        specified multple times


To load bands 3, 4 and 2 of an image as an RGB composite, using a standard deviation stretch the following command may be used.

tuiview --rgb --bands 3,4,2 --stddev imageA.kea

To load only a single band the 'greyscale' option may be used instead:

tuiview --greyscale --bands 3 --stddev imageA.kea

A linear stretch may be used, with minimum and maximum values provided e.g.,

tuiview --greyscale --bands 1 --linear -20 -5 imageA_dB.kea

Multiple images can be specified, by default they will be loaded to the same window, separate windows may be requested using the 'separate option' e.g.,:

tuiview --greyscale --bands 3 --stddev --separate imageA.kea imageB.kea imageC.kea