Batch-Process Data Using Iterator Nodes

Use an Iterator node to batch-process multiple datasets or, in general, to loop through a group of elements. The output of an Iterator node will be executed as many times as the number of elements passed in, iterating through each of them one-by-one. Using an Iterator node is the same as using a FOR statement in IDL programming.

Examples

This example calibrates and runs QUAC atmospheric correction on four input files. It adds the results to the Data Manager:

The next example runs the Multiplicative Lee Adaptive Filter task four times, each using a different Window Size value. Four odd integers are specified in an Array of Values node. Each time the model runs, the Iterator node passes an integer to the Window Size parameter of the filter task. By passing the output images to a View node, you can visually compare the results to determine which Window Size value works best.

The ENVI Modeler does not support nested iterations (loops). This would be similar to adding a FOR loop within another FOR loop in IDL programming. If your model requires a sequence of iterations, close the first loop with an Aggregator node. Then pass the output of the Aggregator node to a second Iterator node to execute the second loop.

See the help topics below for more examples that use Iterator nodes.

Batch-Process Data on ENVI Servers

You can batch-process multiple datasets on different ENVI Servers. This is a good option if the ENVI Server computers have powerful system resources and you want to distribute the work among those computers. To do this, add an Iterator node to a model that processes multiple input datasets. Click the button in the Iterator node to display the Set ENVI Servers dialog. Use this dialog to select existing ENVI Servers or to add new ones. The Validate URLs now option is selected by default, which means the URLs will be validated when you click OK in the Set ENVI Servers dialog. If you already validated the URLs elsewhere, you can select Do not validate (faster), which will skip the validation step when the model runs.

See the ENVI Servers topic for more information.

 

If the Iterator node is connected directly to an Aggregator node, or connected by multiple tasks to an Aggregator node, the model cannot be run on an ENVI Server. In this case, you can write a program in the ENVI API (using the ENVIServer routine) to send a job to multiple server computers and collect the results for further processing.

See Also

Generate Filename Nodes, Specify Input Datasets and Task Parameters, Collect Items Using Aggregator Nodes, Apply Conditional Statements Using Filter Iterator Nodes, Specify Model Output, ENVI Servers