Categories | Alphabetical | Classes | All Contents | [ < ] | [ > ]

DIALOG_READ_IMAGE


Syntax | Return Value | Arguments | Keywords | Version History | See Also

The DIALOG_READ_IMAGE function is a graphical interface used for reading image files. The interface is created as a modal dialog with an optional parent widget.

Syntax

Result = DIALOG_READ_IMAGE ( [Filename] [, BLUE=variable] [, DIALOG_PARENT=widget_id] [, FILE=variable] [, FILTER_TYPE=string] [, /FIX_FILTER] [, GET_PATH=variable] [, GREEN=variable] [, IMAGE=variable] [, PATH=string] [, QUERY=variable] [, RED=variable] [ ,TITLE=string] )

Return Value

This function returns 1 if the "Open" button was clicked, and 0 if the "Cancel" button was clicked.

Arguments

Filename

An optional scalar string containing the full pathname of the file to be highlighted.

Keywords

BLUE

Set this keyword to a named variable that will contain the blue channel vector (if any).

DIALOG_PARENT

The widget ID of a widget that calls DIALOG_READ_IMAGE. When this ID is specified, a death of the caller results in the death of the DIALOG_READ_IMAGE dialog. If DIALOG_PARENT is not specified, then the interface is created as a modal, top-level widget.

FILE

Set this keyword to a named variable that will contain the selected filename with full path when the dialog is created.

FILTER_TYPE

Set this keyword to a scalar string containing the format type the dialog filter should begin with. The default is "Image Files". The user cannot modify the filter if the FIX_FILTER keyword is set. Valid values are obtained from the list of supported image types returned from QUERY_IMAGE. In addition, there is also the "All Files" type. If set to "All Files", queries will only happen on filename clicks, making the dialog much more efficient.

Example:

FILTER='.jpg, .tiff' 

FIX_FILTER

When this keyword is set, only files that satisfy the filter can be selected. The user has no ability to modify the filter.

GET_PATH

Set this keyword to a named variable in which the path of the selection is returned.

GREEN

Set this keyword to a named variable that will contain the green channel vector (if any).

IMAGE

Set this keyword to a named variable that will contain the image array read. If Cancel was clicked, no action is taken.

PATH

Set this keyword to a string that contains the initial path from which to select files. If this keyword is not set, the current working directory is used.

QUERY

Set this keyword to a named variable that will return the QUERY_IMAGE structure associated with the returned image. If the "Cancel" button was pressed, the variable set to this keyword is not changed. If an error occurred during the read, the FILENAME field of the structure will be a null string.

RED

Set this keyword to a named variable that will contain the red channel vector (if any).

TITLE

Set this keyword to a scalar string to be used for the dialog title. If it is not specified, the default title is "Select Image File".

Version History

Introduced: 5.3

See Also

DIALOG_WRITE_IMAGE


Categories | Alphabetical | Classes | All Contents | [ < ] | [ > ]