ENVIUI::SelectTaskParameters

The SelectTaskParameters method displays a dialog in which the user can select parameters for a given ENVITask.

Example

; Launch the application

e = ENVI()

 

; Create an NNDiffuse pan sharpening ENVITask

; Get the task from the catalog of ENVITasks

Task = ENVITask('NNDiffusePanSharpening')

 

; Select task parameters from the dialog box

parameters = e.UI.SelectTaskParameters(Task)

 

; If user cancels the dialog, return

IF (parameters eq 'Cancel') THEN RETURN

 

; Run the task

Task.Execute

 

; Get the collection of data objects currently available in the Data Manager

DataColl = e.Data

 

; Add the output to the Data Manager

DataColl.Add, Task.Output_Raster

 

; Display the result

view = e.GetView()

layer = View.CreateLayer(Task.Output_Raster)

Syntax

Result = ENVIUI.SelectTaskParameters(Task [, Keywords=value])

Return Value

This method returns "OK" if the user accepted the setting from the dialog, or it returns "Cancel" if the user canceled from the dialog.

Arguments

Task

The ENVITask object

Keywords

Keywords are applied only during the initial creation of the object.

DIALOG_PARENT

Set this keyword to the widget ID to be used as the parent of this dialog. This will cause the dialog to be centered on the widget ID provided instead of the main ENVI window.

ERROR

Set this keyword to a named variable that will contain any error message issued during execution of this routine. If no error occurs, the ERROR variable will be set to a null string (''). If an error occurs and the routine is a function, then the function result will be undefined.

When this keyword is not set and an error occurs, ENVI returns to the caller and execution halts. In this case, the error message is contained within !ERROR_STATE and can be caught using IDL's CATCH routine. See IDL Help for more information on !ERROR_STATE and CATCH.

See Manage Errors for more information on error handling in ENVI programming.

STYLE_SHEET (optional)

Set this keyword to a filename or hash that contains a style sheet. A style sheet defines the user interface elements (for example, text boxes and color pickers) to include in the dialog. By specifying a style sheet, you have more flexibility in choosing UI elements for each input and output parameter for your custom task.

Version History

ENVI 5.2

Introduced

ENVI 5.4

Added STYLE_SHEET keyword

API Version

4.2

See Also

ENVIUI, ENVIUI::RunTask, ENVIUI::SelectInputData