X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 26 Oct 2020 02:43 PM by  Jason Wolfe
ENVI modeler specify stretch with Max and Min value
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

Morgan Bond



New Member


Posts:2
New Member


--
21 Oct 2020 03:39 PM
    I am trying to use ENVI modeler to speed up my raster stretch process for many images. However, one aspect that slows me down is that I would like to perform a square root stretch in envi modeler. To do this I need to first calculate statistics for each file, and add in the min and max values as a vector for each band (e.g. [12,74,160,619,42,138,1293]). Is there a way to speed this up by specifying that I just want the module to use the minimum and maximum values for each band (e.g. [min(band1), min(band2),.....]? I don't have access to IDL, so the modeler is my only option for automation.

    Similarly, I have a file that has a nodata value of 0, but when I calculate band statistics I get minimum values of 0, shouldn't those be ignored in calculating the statistics? I am using ENVI 5.6, Windows 10.

    Jason Wolfe



    New Member


    Posts:59
    New Member


    --
    26 Oct 2020 02:43 PM
    Hi,
    The model will need to have a Raster Statistics node between the file input and the Root Stretch Raster node. The latter node can't connect directly to the file input, nor can it determine min/max values automatically from the file input. It will need the Raster Statistics node in order to extract the min/max values of each band.

    However, you shouldn't have to manually enter vectors of mins/maxes. When you connect the Raster Statistics node to the Root Stretch Raster node, map the "Minimum" parameter of the former to the "Minimum" parameter of the latter. Same with the "Maximum" parameter. I wish I could show you a screen capture, but we can't attach images here.

    As far as the data ignore value, I just created a simple model similar to what you are creating, and tested it in ENVI 5.6. My sample image had the data ignore value set to 0. When I ran the model to produce the square root stretch raster, the result correctly honored the data ignore value. When I right-clicked on the result in the Data Manager and selected "Quick Stats," it gave the correct data minimums while ignoring values of 0. Can you provide a few more details on what you saw that was different?
    You are not authorized to post a reply.