X

NV5 Geospatial Blog

Each month, NV5 Geospatial posts new blog content across a variety of categories. Browse our latest posts below to learn about important geospatial information or use the search bar to find a specific topic or author. Stay informed of the latest blog posts, events, and technologies by joining our email list!



Mapping Earthquake Deformation in Taiwan With ENVI

Mapping Earthquake Deformation in Taiwan With ENVI

12/15/2025

Unlocking Critical Insights With ENVI® Tools Taiwan sits at the junction of major tectonic plates and regularly experiences powerful earthquakes. Understanding how the ground moves during these events is essential for disaster preparedness, public safety, and building community resilience. But traditional approaches like field... Read More >

Comparing Amplitude and Coherence Time Series With ICEYE US GTR Data and ENVI SARscape

Comparing Amplitude and Coherence Time Series With ICEYE US GTR Data and ENVI SARscape

12/3/2025

Large commercial SAR satellite constellations have opened a new era for persistent Earth monitoring, giving analysts the ability to move beyond simple two-image comparisons into robust time series analysis. By acquiring SAR data with near-identical geometry every 24 hours, Ground Track Repeat (GTR) missions minimize geometric decorrelation,... Read More >

Empowering D&I Analysts to Maximize the Value of SAR

Empowering D&I Analysts to Maximize the Value of SAR

12/1/2025

Defense and intelligence (D&I) analysts rely on high-resolution imagery with frequent revisit times to effectively monitor operational areas. While optical imagery is valuable, it faces limitations from cloud cover, smoke, and in some cases, infrequent revisit times. These challenges can hinder timely and accurate data collection and... Read More >

Easily Share Workflows With the Analytics Repository

Easily Share Workflows With the Analytics Repository

10/27/2025

With the recent release of ENVI® 6.2 and the Analytics Repository, it’s now easier than ever to create and share image processing workflows across your organization. With that in mind, we wrote this blog to: Introduce the Analytics Repository Describe how you can use ENVI’s interactive workflows to... Read More >

Deploy, Share, Repeat: AI Meets the Analytics Repository

Deploy, Share, Repeat: AI Meets the Analytics Repository

10/13/2025

The upcoming release of ENVI® Deep Learning 4.0 makes it easier than ever to import, deploy, and share AI models, including industry-standard ONNX models, using the integrated Analytics Repository. Whether you're building deep learning models in PyTorch, TensorFlow, or using ENVI’s native model creation tools, ENVI... Read More >

1345678910Last
8380 Rate this article:
5.0

Coming Soon in ENVI 5.4: ENVITask Style Sheets

Anonym

Since the early days of ENVITasks in ENVI 5.2, there has been what we call the Dynamic UI.  Some of the toolbox items that wrap ENVITasks use it, but you can use it at any time to set some or all of the parameters of your task using the ENVIUI::SelectTaskParameters() method.  When you call this method, it will inspect the task to get the NAME, TYPE, and VALUE properties of each parameter, and construct a dialog with widgets for each.  If the VALUE is !NULL, then the widget will be empty, but if it has a valid value the widget will display that.  We have a set of heuristics that try to select the best widget to use for each TYPE, but it may not choose the widget you desire for a particular parameter.

To address this, we are introducing task style sheets in the upcoming release of ENVI 5.4.  The idea is borrowed from HTML and CSS, which separate content from presentation.  In the ENVITask context, the ENVITask template defines the content, and the style sheet defines the presentation logic.  These style sheets are nowhere as sophisticated as CSS can be, starting with the lack of cascading, but they don’t need to be for our purposes.  The style sheet is a JSON file or in-memory Hash that allows you to hide a couple of the widgets at the bottom of the dialog, and specify which widget to use for each parameter.  You don’t need to specify every parameter, those that are not in the style sheet will fall back to the heuristics.

Let’s make this concrete using the example from the help page:

  e = ENVI()
  Task = ENVITask('NNDiffusePanSharpening')
  ret = e.UI.SelectTaskParameters(Task)

The resulting pop-up dialog looks like this:

The “Pixel Size Ratio” parameter has to be an integer, so we used the edit widget with the increment/decrement buttons next to it.  But maybe you want to use a wheel instead; this is where a style sheet comes into play.

I can change the “Pixel Size Ratio” parameter to use a wheel widget, like  this:

  style = Hash("schema", "envitask_3.0", $
               "parameters", List(Hash("name", "pixel_size_ratio", $
                                       "type", "IDLWheel_UI")))
  ret = e.UI.SelectTaskParameters(Task, STYLE_SHEET=style)

One key point is that the “parameters” value must be a List of Hashes, even for a single parameter.  The equivalent JSON file is this:

{
    "schema": "envitask_3.0",
    "parameters": [
        {
            "name": "pixel_size_ratio",
            "type": "IDLWheel_UI"
        }
    ]
}

The dialog now looks like this:

All of the possible values for “type” are well documented, under the heading “User Interface Elements”.  Some of the widgets allow you to specify extra properties to customize the behavior.  The IDLWheel_UI class, for example, supports specification of MIN and MAX properties.  If the parameter has these properties set, they will be used, but as you can see in the case of NNDifusePanSharpening it doesn’t.  But we can specify them in the style sheet if we want to add them.  We do this by putting all these properties into a Hash under the key “keywords”:

  style = Hash("schema", "envitask_3.0", $
               "parameters", List(Hash("name", "pixel_size_ratio", $
                                       "type", "IDLWheel_UI", $
                                       "keywords", Hash("min", 1, $
                                                        "max", 9))))
  ret = e.UI.SelectTaskParameters(Task, STYLE_SHEET=style)

The equivalent JSON file is this:

{
    "schema": "envitask_3.0",
    "parameters": [
        {
            "name": "pixel_size_ratio",
            "type": "IDLWheel_UI",
            "keywords": {
                "max": 9,
                "min": 1
            }
        }
    ]
}

The dialog now looks like this:

In all the examples, I have manually specified the STYLE_SHEET keyword in the call to SelectTaskParameters().  If you want the style sheet to be automatically used any time you call this method with your task, then create the JSON file named <task name>.style and put it in the same folder as the .task file.

Please login or register to post comments.