SeaDAS Banner Image

Load Graphics Function (load_graph)

Description:  General display program command mode procedure for overlaying graphics from a loaded band image data or a binary flat file or an SD contained in an HDF file.

The graphics data stored in the HDF SD or Flatfile must be 2D arrays containing SeaDAS graphics values 1 to 7 (zero denoting null).  The color associated with each graphics value is not contained within this file, but is controlled by the graphics portion of the user's color table.  Currently the graphics color values can only be  modified interactively.

[Command Mode]
[Interactive Mode - Band Data][Interactive Mode - Flat File]
[Interactive Mode - HDF File][Interactive Mode - Window]


Command mode:

Usage:  loading from HDF or Flat file

Usage:  loading from band image data Note:  The command mode procedure load must be run before load_graph.

Arguments/Keywords for Band Data Only:
iband The band number for the loaded image data and to be used to generate the bitmap graphics.
fbuf The seadisp display window number to load the graphics into.  (Default is the current window).
ftype A required parameter and must be FTYPE='BAND' for this command mode.
raw A keyword if set, or if the keyword geo is not set, the data values given in range are handled as raw data values.
geo A keyword if set, the data values given in range are handled as geophysical data values.
range Array of data ranges in raw or geophysical units to be used with the specified band image data for creating the bitmap graphics.  The order in the array decides the priority of the graphics to be created, if there are pixels matching multiple conditions.
bit Array of bit numbers to be checked with the specified band image data for creating the bitmap graphics.  The order in the array decides the priority of the graphics to be created, if there are pixels matching multiple conditions. Bit numbers range from 1 (ATMFAIL) to 32 (OCEAN).
color Array of graphics colors (1 to 7) to be assigned for each data range and/or bit number for creating the bitmap graphics.  The color will be cycled if there are more range and/or bit given.
comp Array of options to use the complement for the corresponding data range or bit mask.  If it is set (a value 1), and the pixels outside the corresponding data range selected or the bit mask selected are not on(0), will be assigned as graphics pixels.
inverse  A keyword if set, only pixels NOT defined in the data ranges or bit masks array, will be assigned as graphics pixels.  The first color in the color array will be used as the graphics color to be generated.
merge
     
  • 0 = replace all bitmap graphics with the new graphics
  • 1 = Overlay the new graphics on top of any existing bitmap graphics (default)
  • 2 = Underlay new graphics underneath any existing bitmap graphics
replac Same as merge=0 for any non-zero value
over Same as merge=1 for any non-zero value
under Same as merge=2 for any non-zero value

Arguments/Keywords for both Flat Files and HDF Files:
fname The filename of the flat file or HDF file to load the graphics from. (required)
fbuf The seadisp window number to load the graphics into. (default is the current window).
merge
 
  • 0 = replace all bitmap graphics with the new graphics
  • 1 = Overlay the new graphics on top of any existing bitmap graphics (default)
  • 2 = Underlay new graphics underneath any existing bitmap graphics
  • replace Same as merge=0 for any non-zero value
    over Same as merge=1 for any non-zero value
    under Same as merge=2 for any non-zero value
    dtype Data type of graphics data to load.
    • 1: BYTE (default)
    • 2: SHORT INTEGER
    • 3: LONG INTEGER
    • 4: SINGLE-PRECISION FLOATING-POINT
    • 5: DOUBLE-PRECISION FLOATING-POINT
    Note:  Data values must be within 0 to 255 range.

    Arguments/Keywords for Flat Files only:
    dims Dimensions of array stored in the flatfile [npoints, nlines].  If this parameter is missing, the dimensions will attempt to be automatically determined from the filename or set to the frame buffer size.
    byte_reverse Reverse byte ordering for Big Endian/Little Endian platform treatment. Default: no.
    skipbytes  Number of initial bytes to skip before reading the graphics data. (Default is 0).

    Arguments/Keywords for HDF Files only:
    sd Name(s) or number(s) of 2-D SD's of type dtype to load as graphics. The default is to load the first 2-D SD of type dtype.
    all Load all 2-D SDs of type dtype.
    xsample Subsample rate in x-dimension (Default is 1).
    ysample Subsample rate in y-dimension (Default is 1).

    Examples:

    1. Overlay graphics to the display window 1 using band 1 image data. Pixels that have bit number 2 (LAND), 10 (CLDICE), 1 (ATMFAIL), and 4 (HIGLINT) will be assigned the graphics colors 6, 7, 1, and 4 separately.
    2. load_graph, 1, fbuf=1, ftype='BAND', bit=[2,10,1,4], color=[6,7,1,4]
    3. Overlay graphics to the display window 1 using band 2 image data.  If the pixels that have geophysical values NOT within [0.1, 0.2] and [0.3, 0.5], they will be assigned with graphics colors 2.
    4. load_graph, 2, fbuf=1, ftype='BAND', range=[0.1,0.2,0.3,0.5], color=[2], /geo, $

                             /inverse
    5. Overlay graphics using the 1st 2D SD of type byte found in the HDF file.
    6. load_graph, 'test.hdf'
    7. Underlay existing graphics with SD named 'Blotch":
    8. load_graph, SD='Blotch', /UNDER
    9. Overlay 2nd and 3rd 2D type byte SDs found in this input HDF file:
    10. load_graph, 'test.hdf', SD=[2,3]
    11. Overlay this 30x100 flatfile graphics :
    12. load_graph, 'test_30x100.flat'
    13. Overlay this 30x100 flatfile graphics, skip 512 bytes:
    14. load_graph, 'test.flat', dims=[30,100], byte_reverse=1, skipbytes=512

    Curator: OceanColor Webmaster

    Authorized by: gene carl feldman

    NASA logo

    Privacy Policy and Important Notices

    Updated: 15 December 2008