211 Rate this article:

Building Custom Workflows Just Got Easier

Jason Wolfe

Have you ever had a great idea for a custom tool in ENVI but were put off by learning the ENVI API? Traditionally, this was the only way to chain together various tasks in a sequence, or to batch-process input files at once. The learning curve can be steep if you are not familiar with basic IDL and ENVI programming.

With the release of ENVI 5.5, building custom data-processing workflows in ENVI is much easier, thanks to the ENVI Modeler. This is a new visual programming tool that leverages the power of the ENVI API with a simple user interface to help you create and run workflows that you can deploy to desktop and enterprise environments. You can design simple or complex processes that combine different ENVI spectral tools, without having any knowledge of ENVI programming.

For example, suppose that you want to convert multiple red/green/blue (RGB) images to hue/saturation/intensity (HSI) color space and save the results to disk. If you write an ENVI API script to do this, you would have to manage input and output file references yourself. You may not know the task names to use, and you could spend a lot of time referring to the help for the correct names of parameters. You would need to know how to create a FOR loop (with the correct IDL syntax) to process multiple input files.

With the ENVI Modeler, you can connect building blocks called nodes to run a sequence of steps; for example:

This model uses a File node (shown in the blue box) to point to six RGB input files. The primary job of this model is to perform an RGB-to-HSI conversion, so it needs a Task node that will do this. To find an appropriate task, you can enter a keyword in the Search field of the Tasks list:

In this case, the "RGB to HSI Raster" Task node will perform the RGB-to-HSI image conversion. An Iterator node allows you to batch-process the input files. Finally, a Generate Filename node lets you indicate where to save the output files, along with prefixes and extensions for the filenames. Running the model will produce six HSI images on disk:

Here is another example of a model that runs through a full workflow for Linear Spectral Unmixing to determine the relative abundance of minerals in a hyperspectral image:

Once you have built a model, you can share it with others and deploy it in various ways:

  • Save a model as an extension that will be added to the ENVI Toolbox.
  • Create IDL or Python code from a model.
  • Create toolbox extensions for ArcMap and/or ArcPro.
  • Run a model on a Geospatial Services Framework (GSF) server.

Example models are available in the ENVI Help, to get you started. By having a visual programming tool available in ENVI, you can design workflows that contain any number of ENVI analytic tools. What will you create?

Please login or register to post comments.