LIVE_IMAGE

The LIVE_IMAGE procedure displays visualizations in an interactive environment. Double-click on the image to display a properties dialog. A set of buttons in the upper left corner of the image window allows you to print, undo the last operation, redo the last "undone" operation, copy, draw a line, draw a rectangle, or add text..

LIVE_IMAGE is actually a subset of the IDL Insight application. If you find that the LIVE_IMAGE graphical user interface does not provide the level of control you need, consider using Insight itself. You can start the Insight application by entering insight at the IDL command prompt.

You can control your LIVE window after it is created using any of several auxiliary routines. See LIVE_Tools for an explanation.

Calling Sequence

LIVE_IMAGE, Image

Argument

Image

A two- or three-dimensional array of image data. The three-dimensional array must be for the form [3,X,Y] or [X,3,Y] or [X,Y,3].

Keywords

BLUE

Set this keyword equal to a byte vector of blue values.

BUFFER

Set this keyword to bypass the creation of a LIVE window and send the visualization to an offscreen buffer. The WINDOW field of the reference structure returned by the REFERENCE_OUT keyword will contain the name of the buffer.

DIMENSIONS

Set this keyword to a two-element vector of the form [width, height] to specify the dimensions of the image in units specified by the UNITS keyword. The default is [1.0, 1.0].

DRAW_DIMENSIONS

Set this keyword to a two-element vector of the form [width, height] to specify the size of the LIVE tools draw widget (in pixels). The default is [452, 452].

ERROR

Set this keyword to a named variable to contain the returned error message (string). An empty string is returned if no errors occurred during the operation. By default, errors are reported via a GUI.

GREEN

Set this keyword equal to a byte vector of green values.

INDEXED_COLOR

If set, the indexed color mode will be used. The default is true color. (See Using IDL for more information on color modes.)

INSTANCING

Set this keyword to 1 to instance drawing on, or 0 to turn it off. The default (-1) is to use instancing if and only if the "software renderer" is being used (see RENDERER). For more information, see Hardware vs. Software Rendering in See Destination Objects the Objects and Object Graphics manual.

LOCATION

Set this keyword to a two-element, floating-point vector of the form [X, Y] specifying the location of the visualization (relative to the lower left hand corner within the visualization window) in normalized coordinates. The default is [0.0, 0.0].

MANAGE_STYLE

Set this keyword to have the passed in style item destroyed when the LIVE tool window is destroyed. This keyword will have no effect if the STYLE keyword is not set to a style item.

NAME

Set this keyword to a structure containing suggested names for the items to be created for this visualization. See the REPLACE keyword for details on how they will be used. The fields of the structure are as follows. (Any or all of the tags may be set.)

  • Fields of the NAME keyword.

Tag

Description

DATA

Dependent Data Name(s)

CT

Color Table Name

The default for a field is to use the given variable name. If the variable does not have a name (i.e., is an expression), a default name is automatically generated.

NO_DRAW

Set this keyword to inhibit the visualization window from drawing results of LIVE_CONTOUR. This is useful if multiple visualizations and/or annotations are being created via calls to other LIVE_Tools in order to reduce unwanted draws and help speed the display.

NO_STATUS

Set this keyword to prevent the creation of the status bar.

NO_TOOLBAR

Set this keyword to prevent the creation of the toolbar.

PARENT_BASE

Set this keyword to the widget ID of an existing base widget to bypass the creation of a LIVE window and create the visualization within the specified base widget.

RED

Set this keyword equal to a byte vector of red values.

REFERENCE_OUT

Set this keyword to a variable to return a structure defining the names of the created items. The fields of the structure are shown in the following table.

  • Fields of the LIVE_IMAGE Reference Structure
    (Note: The COLORBAR* field does not show
    up with true color images).

Tag

Description

WIN

Window Name

VIS

Visualization Name

GRAPHIC

Graphic Name

CT

Color Table Name

COLORBAR*

Colorbar Name

DATA

Data Name

RENDERER

Set this keyword to 1 to use the "software renderer", or 0 to use the `hardware renderer". The default (-1) is to use the setting in the IDE (IDL Development Environment) preferences; if the IDE is not running, however, the default is hardware rendering. For more information, see Hardware vs. Software Rendering in See Destination Objects the Objects and Object Graphics manual.

REPLACE

Set this keyword to a structure containing tags as listed for the NAME keyword, with scalar values corresponding to the replacement options listed below. (Any or all of the tags may be set.) The replacement settings are used to determine what action to take when an item (such as data) being input would have the same name as one already existing in the given window or buffer (WINDOW_IN).

  • REPLACE keyword Settings and Action Taken

Setting

Action Taken

0

New items will be given unique names.

1

Existing items will be replaced by new items (i.e., the old items will be deleted and new ones created).

2

User will be prompted for the action to take.

3

The values of existing items will be replaced. This will cause dynamic updating to occur for any current uses, e.g., a visualization would redraw to show the new value.

4

Default. Option 0 will be used for items that do not have names (e.g., data input as an expression rather than a named variable, with no name provided via the NAME keyword). Option 3 will be used for all named items.

STYLE

Set this keyword to either a string specifying a style name (or a style in the Insight template project), or to a style reference created from LIVE_STYLE .

TITLE

Set this keyword to a string specifying the title to give the main window. It must not already be in use. A default will be chosen if no title is specified.

TLB_LOCATION

Set this keyword to a two-element vector of the form [ Xoffset , Yoffset ] specifying the offset (in pixels) of the LIVE window from the upper left corner of the screen. This keyword has no effect if the PARENT_BASE keyword is set. The default is [0, 0].

WINDOW_IN

Set this keyword equal to a name (string, case-sensitive) of a LIVE tool or Insight window, or a LIVE tool buffer, in which to display the visualization. The WINDOW tag of the REFERENCE_OUT structure from the creation of the LIVE tool will provide the window or buffer name. Window names are also visible in visualization window titlebars. The default is to create a new window.

Example

LIVE_IMAGE, myImage

See Also

TV, TVSCL, Using IDL Insight