SeaDAS Banner Image

Load Color Table (loadpal)

Description:  This program loads color tables from: SeaDAS color scheme:  SeaDAS sets aside 11 colors from the available colors for the current xsession: 7 for graphics and 4 for background, foreground, cursor and one work color. The rest of the available colors indices are reserved for data colors. This data color range can be split into multiple concurrent tables. Input color tables (256) are scaled to fit the range of the selected concurrent color table. The load color table function can handle loading fixed portions of an input color table without scaling. In this way, input color tables which contain fixed mask values will be preserved.

[Command Mode][Interactive Mode]


Command Mode: (loadpal)

Description:  The loadpal procedure allows loading of color palettes from:

  1. IDL predefined color tables
  2. HDF color palettes
  3. ASCII text file
  4. A bandlist item that was loaded with a color table
  5. RGB specified arrays
Usage:  loadpal, ifile, band_no=band_no, palnum=pn, file_idl =fi, ncolors=nc, bottom=bot, nsl=nsl, nsh=nsh, red=r, green=g, blue=b, /HDF, /IDL, /ASCII, /help

Required Input Arguments/Keywords:     (NOTE:  Either ifile, band_no or RED/GREEN/BLUE are required)
ifile HDF or ASCII filename, IDL table number/name.
red Array containing red component to load.
green Array containing blue component to load.
blue Array containing blue component to load.
band_no The band number of a band which was loaded with a color palette.

Optional Input Arguments/Keywords:
nlut Number of concurrent color tables to load into. If specified, then low. top and ncolors will be automatically determined.
low First color index to load into.  Default = 0 unless nlut is specified.
top Last color index to load into.  Default is end of first color table unless nlut is specified.
ncolors Number of index colors to load into. Automatically determined from low, top and/or nlut. If none of these are specified, then the default is the number of colors in the first color palette.
nsl Number of fixed input colors from the bottom to load without stretching (used for masks).  Default is 0.
nsh Number of fixed input colors from the top to load without stretching (used for masks).  Default is 0.
palnum  Palette number to load for HDF file.  (Default is first)
file_idl Alternate IDL color table file instead of "colors.tbl".
HDF Explicitly specify that the input is an HDF file.  (Not necessary if file ends in '.hdf')
ASCII Explicitly specify that the input is an ASCII color table name.  (Any non-HDF file will be assumed to be ASCII.) ASCII format is 3 columns x 256 rows, any integer format.  (See file $SDSDEMO/demo1.lut for an example of the ASCII input file format.)
IDL Explicitly specify that input is an IDL color name or number.
help Print help to screen.

Output Arguments/Keywords:
npals Number of color palettes found in file.
names Name list of IDL color palettes in IDL file. (for /IDL only)

Examples:

  1. loadpal,"test.asc" (Load ascii RGB file)
  2. loadpal,"test.hdf" (Load 1st palette of hdf file)
  3. loadpal,"test.hdf", palnum=2 (Load 2nd palette of hdf file)
  4. loadpal,15 (Load IDL palette 15)
  5. loadpal,"RAINBOW" (Load IDL palette "RAINBOW")
  6. loadpal, red=r, green=g, blue=b (Load R,G,B arrays specified)
  7. loadpal, band_no=5, nlut=2 (Load the color palette associated with band 5 into color table number 2)
  8. loadpal,"l2_gac1_brs.hdf",nsh=5 (Load browse color palette, last 5 color indices are masks)

Interactive Mode (sdsxloadct):
 

Load Color Table Widget:
The seadas color table widget can be accessed through many menus in the seadas package and by typing "sdsxloadct" at the command line. This widget is a modified version of IDL's loadct program.
Informational items :
Color bar The color bar shows the full color range allotted for the current xsession. The predefined graphics colors can be seen at the far right of the bar. The multiple concurrent color tables can be seen within the non-graphics portion of the bar.

Action items:
Color table Pull down to select which concurrent color table to work with. Currently, all programs outside of the general display program (seadisp) only use the first color table. To add, remove or change the index pointers of color tables, either (1) select Global Setup->Change Color Table Configuration option from the Main Menu, or (2) select Utility->setlut from the SeaDAS Main Menu.
Valid range The color index ranges over which to load the input color table. The default is the range assigned to the current color table specified in Color table. You can only specify a range within these limits.
Two occasions for using this option are:
  • When loading a new color table which does not contain embedded masks over a current displayed color palette which does contain mask values (for example a browse color palette). In this case, in order to display new color tables on the browse image without overwriting the original mask colors, you would reduce the max valid range by 5.
  • When using Options or Function on a browse file which contains masks. For example, decrement valid range max by 5 before using Options or Functions so that the functions will not be performed on the mask portions of your color table.
  • Flags bottom, top The number of colors to hold constant at the start and end of the input 256-element color table without scaling. This is used to load color palettes which contain masks. Currently SeaWiFS browse products will set these values automatically.
    Auto-Apply? & Apply LUT Determines whether to automatically update the display window when a new color LUT is selected. If auto-apply is set to No, selecting new LUTs will update only the Color Bar at the top of the window in order to give a preview of the selected color LUT. This avoids long waits for a new LUT to load on slow machines and/or large images. Setting auto-apply to yes or clicking the Apply LUT button will immediately apply the currently selected LUT.
    Refresh all windows? Determines whether to refresh only the display window that spawned the Load Color window or else to refresh all open display windows. Setting this option to No can avoid long waits for a new LUT to load in multiple windows on slow machines and/or large images.
    Color Tables Menu This menu toggles between "Standard Product Color Tables", "Custom Product Color Tables", and "IDL Color Tables". "Standard Product Color Tables" are the color LUTs normally used for ocean products distributed by the OBPG. All other LUTs that are not included with IDL are listed under the "Custom Product Color Tables" menu option. Users can easily create their own color LUTs and have them show up automatically in this list. (See the SeaDAS FAQ for instructions on how to do this.)
    Options (The Options portion of this documentation is IDL's documentation since the functionality has not been modified.)
     
    Stretch Bottom and Stretch Top Sliders These sliders control the "contrast" of the color tables, and are expressed in percentages of full intensity. The color table wedge is "stretched" so that values equal to or less than "Stretch Bottom" are set to the lowest color table entry, which is usually black. Values equal to or greater than "Stretch Top" are set to the last entry in the color table, usually white or some other bright color. Values between the bottom and top are linearly scaled to the color table. Making "Stretch Bottom" more than "Stretch Top" inverts the color table.
    Gamma Correction Slider This slider can be used to compensate for the characteristics of your monitor. Values larger than 1.0 have a steeper contrast curve at the top end of the ramp, while values less than 1.0 have a steeper contrast curve at the bottom end of the ramp. A value of 1.0 results in a linear ramp.
    Gang Sliders Connects the "Stretch Bottom" and "Stretch Top". Moving one slider moves the other. With the sliders ganged, movement of a slider causes the other slider to track keeping the width of the wedge constant, while moving it across the range of data values. Normally, the sliders are independent. The width of the wedge is fixed when this button is depressed.
    Top When set to CLIP, values larger than the Top are set to the largest color index. If set to CHOP, values larger than "Stretch Top" are set to color index 0.
    Stretch When set to the default of INDICES, manipulations affect the mapping between color indices and color table triples. When set to INTENSITY, the mapping controls the intensity of each color table entry. This is a useful when displaying quantized images, where the pixel value is arbitrary and does not represent an intensity. In this mode, the hue and saturation remain relatively constant for a given color index.
    Functions (The Functions portion of this documentation is IDL's documentation, since the functionality has not been modified).
    Selecting this mode allows interactive editing of the mapping of color table values to color indices by dragging control points on a plot of the map. Select and move a control point by clicking and dragging on its box. The first and last control points may only be moved in the vertical direction. Other control points may be moved anywhere within the plot as long as they are to the right of their predecessor and to the left of the next control point. You can add a control point, in the largest interval that contains no control points with the "Add Control Point" button. The "Remove Control Point" button removes the control central point in the smallest interval containing three control points. The "Reset Transfer Function" restores a linear one-to-one transfer function.
    Load LUT Pressing the Load LUT button will display all the input option types from which to load color tables.
     
    IDL Predefined Color Tables Selecting an item in the IDL color table list will cause it to load the color table into the color data area defined by Valid range.
    Load From Band This option will load a color table that was stored along with a band when it was read into memory. The user would have had to select the Load Palette option when initially loading the band. To access this color table, enter the band number and press Load.
    Load from ASCII LUT or HDF File The name of an HDF file which contains color palettes or a color palette in ASCII format. The ASCII file format is 3 columns x 256 rows, any integer format.  (See file $SDSDEMO/demo1.lut for an example of the ASCII input file format.)
     
    Select To interactively select an input HDF or ASCII file using the File Selection Widget. The file selected will be displayed in the field below.
    Load To load a file which was manually entered in the ASCII LUT or HDF file field.
    HDF Palette List  The list of palettes read from an external HDF file.
    Help Show help in HTML viewer.
    Quit Quit Load Color Table Widget.


    Curator: OceanColor Webmaster

    Authorized by: gene carl feldman

    NASA logo

    Privacy Policy and Important Notices

    Updated: Monday, 15-Dec-2008 16:03:13 EST