ENVITask Template Definition
This section describes the standard schema used to define ENVITasks, including the properties and their expected formats.
Task Keys
The following table describes the parameters that provide an overview of the task.
|
Key |
Required |
Description |
|---|---|---|
|
|
Yes |
A string with name of the task, excluding the prefix |
|
|
Yes |
A string with a description of the task. |
|
|
Yes |
A string with the name of the class to use; the most common is ENVITaskFromProcedure. Use ENVIMetatask if you are creating a metatask. See Metatasks for details. Use ENVIAbortableTaskFromProcedure to allow your custom task to have a progress dialog with an option to cancel the process. See Messaging for details. You can also write your own base class to simplify the process of writing custom tasks that use a common set of parameters and application behavior. See Custom Base Classes for more information. |
|
|
Yes |
The routine that is called when |
|
|
No |
A string with the name of the task as it appears to the end user. Spaces and special characters are allowed. This key is used by tasks that display a dynamic user interface for entering parameters. See ENVIUI::SelectTaskParameters for details. |
|
|
Yes |
A string listing the version of ENVITask JSON schema that was used to write this task. The valid values are |
|
|
No |
A scalar string or an array of strings that help categorize the task. It can be empty with a value of !NULL. |
|
|
No |
A string with the semantic revision number of the task. Semantic versioning provides a quick way to extract information about a new task release using a convention of X.Y.Z, where:
The |
|
|
No |
A container of key/value pairs, described in the Parameter Keys section next. |
Parameter Keys
The following table describes the keys that belong to the parameters group in a task template. These are repeated for each parameter.
To learn about other properties listed in the return value of QueryProperty, see the descriptions under the IDLParameterType class, where Type is the TYPE property value.
|
Key |
Required |
Description |
|---|---|---|
|
|
Yes |
The name of the parameter as it appears to the end user. |
|
|
No |
The internal keyword that the parameter should map to. If it is the same as the NAME key, then you do not need to set |
|
|
No |
The name of the task as it appears to the end user. This key is used by tasks that display a dynamic user interface for entering parameters. See ENVIUI::SelectTaskParameters for details. |
|
|
Yes |
A scalar string with one of the following:
If a specified data type requires more than one scalar, use the |
|
|
No |
Specify the array dimensions if the
|
|
|
Yes |
Specify if the parameter is Note: Older versions of ENVI use a different task schema; for example: |
|
|
No |
Set this key to |
|
|
Yes |
A description of the parameter. |
|
|
No |
A string array that lists the possible values for the property. Any IDL data type is supported. You can also map from user-friendly strings to an internal lookup table of values if desired. This property is not present for all values of TYPE. Use QueryProperty to learn if it is available. |
|
|
No |
The default value of the parameter if the end user does not provide a value. |
|
|
No |
This property only applies when:
Set this property to a scalar string to use as a file extension for input ENVIURI parameters where VALUE=!NULL. When the parent ENVITask is executed, input ENVIURI parameters without a value can be populated by values generated by ENVI::GetTemporaryFilename. If this property is not set, or if it is set to !NULL, then no filenames will be generated and the task will likely fail. An empty string value will generate filenames without an extension. |
|
|
No |
This property only applies when:
Set this property to When the parent ENVITask is executed, input ENVIURI parameters that had VALUE=!NULL and had their values populated according to the |
|
|
No |
Set this property to |
|
|
No |
A value that is greater than or equal to the minimum value allowed for the parameter. This property is not present for all values of TYPE. Use QueryProperty to learn if it is available. |
|
|
No |
A value that is less than or equal to the maximum value allowed for the parameter. This property is not present for all values of TYPE. Use QueryProperty to learn if it is available. |
|
|
No |
Set this key to |
|
|
No |
This property only applies when:
Set this key to a parameter name (in the same task) that it is associated with. That other parameter must adhere to the following constraints:
For example, the { "name": "OUTPUT_RASTER", "display_name": "Output Raster", "type": "ENVIRASTER", "direction": "output", "required": true, "uri_param": "OUTPUT_URI", "description": "This is a reference to the output raster." }, { "name": "OUTPUT_URI", "display_name": "Output Raster URI", "type": "ENVIURI", "direction": "input", "required": false, "description": "Specify a string with the fully-qualified path and filename for OUTPUT_RASTER." "fold_case": true, "auto_extension": ".dat", "is_temporary": true } |
options
|
No |
A hash containing auxiliary key/value properties that certain clients may optionally act upon. Currently, this is used to specify constraints for parameters of type ENVIRaster, such as: To require a classification raster: "options": { "filter": ["classification"] }, or to have only one band: "options": { "filter": ["single-band"] }, |
Revision History
This template definition was introduced in ENVI 5.5.1.
- The
tagstask key was introduced in ENVI 5.5.1 - The
optionsparameter key was introduced in ENVI 6.2