ROI Pixel Inclusion Background

When geometry-based ROIs are rasterized, ENVI uses rules to determine whether a pixel will be included in an ROI. Where the geometry lies in relation to the center line of a pixel determines whether that pixel is in or out of the ROI.

ROIs created in ENVI may not contain the same number of pixels as those created in ENVI Classic. ENVI Classic uses a different method for selecting pixels that is based on the POLYFILLV routine in IDL. The ENVI method for rasterizing geometry-based ROIs is described in this topic.

Before ENVI applies the pixel-inclusion rules, it adjusts the vertices from the geometry as follows:

Pixel inclusion is determined by the following:

Using a single pixel in the examples below, the geometry in the left image does not cross any center lines on the pixel; therefore, that pixel will not be included in the ROI. The center image has geometry that crosses the top center line of the pixel, so that pixel will be included in the ROI. The pixel in the right image will also be included, because it contains a vertex within the pixel extents:

Using the Region of Interest (ROI) Tool to illustrate, the image below shows a polygon drawn to define an ROI.

The next image shows the accepted polygon, and the pixels that were included in the ROI.

The final image shows the polygon overlaid on the ROI, to show how the rules were applied when ENVI determined the pixels to include.