ENVI User`s Guide

ENVI User`s Guide

ENVI User’s

Guide

ENVI Version 4.1

September 2004 Edition

Copyright © Research Systems, Inc.

All Rights Reserved

0904ENV41USR

Restricted Rights Notice

The ENVI

®

, IDL

®

, ION Script™, and ION Java™ software programs and the accompanying procedures, functions, and documentation described herein are sold under license agreement. Their use, duplication, and disclosure are subject to the restrictions stated in the license agreement.

Research System, Inc., reserves the right to make changes to this document at any time and without notice.

Limitation of Warranty

Research Systems, Inc. makes no warranties, either express or implied, as to any matter not expressly set forth in the license agreement, including without limitation the condition of the software, merchantability, or fitness for any particular purpose.

Research Systems, Inc. shall not be liable for any direct, consequential, or other damages suffered by the Licensee or any others resulting from use of the ENVI, IDL, and ION software packages or their documentation.

Permission to Reproduce this Manual

If you are a licensed user of these products, Research Systems, Inc. grants you a limited, nontransferable license to reproduce this particular document provided such copies are for your use only and are not sold or distributed to third parties. All such copies must contain the title page and this notice page in their entirety.

Acknowledgments

ENVI

®

and IDL

®

are registered trademarks of Research Systems Inc., registered in the United States Patent and Trademark Office, for the computer program described herein.

ION™, ION Script™, ION Java™, Dancing Pixels, Pixel Purity Index, PPI, n-Dimensional Visualizer, Spectral Analyst, Spectral Feature Fitting, SFF, Mixture-Tuned Matched Filtering, MTMF, 3D SurfaceView, Band

Math, Spectral Math, ENVI Extension, Empirical Flat Field Optimal Reflectance Transformation (EFFORT), Virtual Mosaic, and

ENVI NITF Module are trademarks of Research Systems, Inc.

Numerical Recipes™ is a trademark of Numerical Recipes Software. Numerical Recipes routines are used by permission.

GRG2™ is a trademark of Windward Technologies, Inc. The GRG2 software for nonlinear optimization is used by permission.

NCSA Hierarchical Data Format (HDF) Software Library and Utilities

Copyright © 1988-1998 The Board of Trustees of the University of Illinois

All rights reserved.

NCSA HDF5 (Hierarchical Data Format 5) Software Library and Utilities

Copyright 1998, 1999, 2000, 2001, 2002 by the Board of Trustees of the University of Illinois. All rights reserved.

CDF Library

Copyright

©

1999 National Space Science Data Center, NASA/Goddard Space Flight Center

NetCDF Library

Copyright © 1993-1996 University Corporation for Atmospheric Research/Unidata

HDF EOS Library

Copyright © 1996 Hughes and Applied Research Corporation

This software is based in part on the work of the Independent JPEG Group.

Portions of this software are copyrighted by INTERSOLV, Inc., 1991-1998.

Use of this software for providing LZW capability for any purpose is not authorized unless user first enters into a license agreement with Unisys under U.S. Patent No. 4,558,302 and foreign counterparts. For information concerning licensing, please contact: Unisys

Corporation, Welch Licensing Department - C1SW19, Township Line & Union Meeting Roads, P.O. Box 500, Blue Bell, PA 19424.

Portions of this computer program are copyright © 1995-1999 LizardTech, Inc. All rights reserved. MrSID is protected by U.S. Patent

No. 5,710,835. Foreign Patents Pending.

This product includes software developed by the Apache Software Foundation (http://www.apache.org/)

Portions of ENVI were developed using Unisearch’s Kakadu software, for which RSI has a commercial license. Kakadu Software.

Copyright © 2001. The University of New South Wales, UNSW, Sydney NSW 2052, Australia, and Unisearch Ltd, Australia.

MODTRAN is licensed from the United States of America under U.S. Patent No. 5,315,513 and U.S. Patent No. 5,884,226.

FLAASH is licensed from Spectral Sciences, Inc. under a U.S. Patent Pending.

Other trademarks and registered trademarks are the property of the respective trademark holders.

Contents

Chapter 1:

Getting Started with ENVI

..................................................................... 13

Introduction to ENVI ....................................................................................................... 14

ENVI, ENVI RT, and IDL

.............................................................................................. 15

General Review of ENVI Functionality

.......................................................................... 16

Starting ENVI .................................................................................................................. 19

ENVI Graphical User Interface (GUI)

............................................................................ 21

General Image Display Concepts .................................................................................... 23

Data Management ............................................................................................................ 28

Memory Management ..................................................................................................... 31

ENVI Basics .................................................................................................................... 32

ENVI File Formats .......................................................................................................... 46

ENVI Supported Input File Formats ............................................................................... 50

ENVI Supported Output File Formats ............................................................................. 54

ENVI User’s Guide

3

4

Reporting Problems ......................................................................................................... 55

Can We Be of Service?

.................................................................................................... 57

Chapter 2:

File Management

.................................................................................. 59

The File Menu

.................................................................................................................. 60

Opening Image Files ........................................................................................................ 61

Opening Vector Files ....................................................................................................... 63

Opening External Files .................................................................................................... 66

Opening Previous Files

.................................................................................................. 103

Editing ENVI Headers ................................................................................................... 104

Generating Test Data ..................................................................................................... 122

Using the Data Viewer ................................................................................................... 125

Saving Files .................................................................................................................... 127

Importing IDL Variables ................................................................................................ 135

Exporting to IDL Variables

........................................................................................... 136

Compiling IDL Code ..................................................................................................... 137

IDL CPU Parameters ..................................................................................................... 138

Tape Utilities .................................................................................................................. 141

The Scan Directory List ................................................................................................. 166

Working With Files and Scripts ..................................................................................... 170

Using the ENVI Queue Manager ................................................................................... 172

Logging Processing Information .................................................................................... 173

Setting ENVI Preferences .............................................................................................. 174

Chapter 3:

Display Management

.......................................................................... 181

The Window Menu ........................................................................................................ 182

Using the Window Finder

.............................................................................................. 183

Starting New Displays

................................................................................................... 184

Starting New Vector Windows ...................................................................................... 184

Starting New Plot Windows ........................................................................................... 184

The Available Files List

................................................................................................. 185

The Available Bands List ............................................................................................... 189

ENVI Image Display Windows ..................................................................................... 199

The Available Vectors List

............................................................................................ 212

Contents

ENVI User’s Guide

5

ENVI Vector Windows ................................................................................................. 220

Tools for Maintaining Your Display

............................................................................. 224

Chapter 4:

Interactive Display Functions

............................................................ 229

The Display Menu Bar .................................................................................................. 230

Display Functions .......................................................................................................... 232

Creating Vector Layers

................................................................................................. 233

Saving Display Groups .................................................................................................. 234

Setting Display Preferences ........................................................................................... 235

Overlays ......................................................................................................................... 238

Annotating Images ........................................................................................................ 240

Overlaying Classes

........................................................................................................ 265

Plotting Contour Lines .................................................................................................. 272

Interactive Density Slicing ............................................................................................ 279

Grid Lines

...................................................................................................................... 284

Defining Regions of Interest

......................................................................................... 289

Creating QuickMaps ...................................................................................................... 320

Overlaying Vectors

........................................................................................................ 325

Contrast Stretching and Quick Filtering ........................................................................ 354

Applying Display Filters

............................................................................................... 355

Applying Default (Quick) Stretches

.............................................................................. 356

Matching Histograms .................................................................................................... 358

Using Interactive Stretching .......................................................................................... 359

Interactive Analysis Tools ............................................................................................. 371

Display Linking and Dynamic Overlays ....................................................................... 372

Interactive Profiles and Spectral Plots ........................................................................... 377

Using Interactive Plot Functions ................................................................................... 387

Extracting Polarization Signatures ................................................................................ 403

Color Mapping

.............................................................................................................. 404

Using the Pixel Locator ................................................................................................. 410

Collecting Points ........................................................................................................... 412

Building Masks .............................................................................................................. 415

Measurement Tool

......................................................................................................... 415

Using the Line of Sight Calculator ................................................................................ 416

Using the Spatial Pixel Editor

....................................................................................... 418

ENVI User’s Guide

Contents

6

Contents

Using the Spectral Pixel Editor ...................................................................................... 421

Creating Animations ...................................................................................................... 422

Using Two-Dimensional Scatter Plots ........................................................................... 427

Three-Dimensional Surface Views ................................................................................ 438

Managing Displays ........................................................................................................ 439

Display Output Options ................................................................................................. 446

Chapter 5:

Basic Tools

.......................................................................................... 457

The Basic Tools Menu

................................................................................................... 458

Resizing Data (Spatial/Spectral) .................................................................................... 459

Subsetting Data via ROIs ............................................................................................... 467

Rotating Images ............................................................................................................. 468

Layer Stacking ............................................................................................................... 470

Converting Data (BSQ, BIL, BIP) ................................................................................. 472

Stretching Data ............................................................................................................... 474

Statistics ......................................................................................................................... 476

Change Detection Analysis ............................................................................................ 487

Using the Measurement Tool

......................................................................................... 497

Band Math

...................................................................................................................... 500

Spectral Math ................................................................................................................. 517

Segmenting Images ........................................................................................................ 518

Regions of Interest ......................................................................................................... 520

Mosaicking Images

........................................................................................................ 526

Masking

.......................................................................................................................... 527

Calibration Utilities ........................................................................................................ 534

General Purpose Utilities

............................................................................................... 551

Data-Specific Utilities .................................................................................................... 558

Chapter 6:

Classification

...................................................................................... 575

The Classification Menu ................................................................................................ 576

Collecting Endmember Spectra ..................................................................................... 577

Supervised Classification ............................................................................................... 594

Unsupervised Classification ........................................................................................... 611

Decision Tree Classifier ................................................................................................. 617

ENVI User’s Guide

7

Creating Class Images from ROIs ................................................................................. 627

Post Classification ......................................................................................................... 628

Chapter 7:

Transforms

........................................................................................... 663

The Transforms Menu ................................................................................................... 664

Image Sharpening .......................................................................................................... 665

Calculating Band Ratios

................................................................................................ 672

Principal Component Analysis ...................................................................................... 675

Minimum Noise Fraction Transform ............................................................................ 682

Color Transforms

.......................................................................................................... 695

Applying Decorrelation Stretch ..................................................................................... 701

Applying Photographic Stretch ..................................................................................... 702

Applying Saturation Stretch

.......................................................................................... 703

Creating Synthetic Color Images

.................................................................................. 704

Calculating Vegetation Indices ..................................................................................... 706

Chapter 8:

Filters

................................................................................................... 711

The Filter Menu ............................................................................................................. 712

Convolution Filters ........................................................................................................ 713

Morphology Filters ........................................................................................................ 718

Using Texture Filters ..................................................................................................... 723

Using Adaptive Filters ................................................................................................... 728

Using Frequency Filters (FFTs)

.................................................................................... 737

Chapter 9:

Spectral Tools

...................................................................................... 743

The Spectral Menu ........................................................................................................ 744

Spectral Libraries

.......................................................................................................... 746

Spectral Slices ............................................................................................................... 754

MNF Rotations .............................................................................................................. 757

Pixel Purity Index .......................................................................................................... 758

The n-Dimensional Visualizer

....................................................................................... 763

Mapping Methods .......................................................................................................... 777

Finding Targets with BandMax ..................................................................................... 795

Spectral Hourglass Wizard

............................................................................................ 809

ENVI User’s Guide

Contents

8

Spectral Analyst ............................................................................................................. 820

Multi Range SFF ............................................................................................................ 826

Extracting Endmembers with SMACC .......................................................................... 828

Spectral Math ................................................................................................................. 833

Resampling Spectral Data Files ..................................................................................... 840

Gram-Schmidt Spectral Sharpening .............................................................................. 840

PC Spectral Sharpening ................................................................................................. 841

CN Spectral Sharpening ................................................................................................. 841

EFFORT Polishing

......................................................................................................... 842

Generating Image Cubes

................................................................................................ 847

Spectral Tools References

.............................................................................................. 849

Chapter 10:

Map Tools

............................................................................................ 853

The Map Menu

............................................................................................................... 854

Registration .................................................................................................................... 855

Orthorectification ........................................................................................................... 875

Image Mosaicking .......................................................................................................... 888

Georeferencing from Input Geometry

........................................................................... 904

Georeferencing SPOT Data

........................................................................................... 912

Georeferencing SeaWiFS Data ...................................................................................... 914

Georeference AVHRR Data .......................................................................................... 917

Georeference ENVISAT ................................................................................................ 920

Georeference MODIS 1B .............................................................................................. 921

Selecting Map Projection Types

.................................................................................... 922

Building Customized Map Projections .......................................................................... 923

Converting Map Projections

.......................................................................................... 927

Layer Stacking ............................................................................................................... 929

Converting Map Coordinates ......................................................................................... 930

Converting ASCII Coordinates ...................................................................................... 932

Merging Old Projection Files

......................................................................................... 934

Using GPS-Link ............................................................................................................. 935

Contents

ENVI User’s Guide

9

Chapter 11:

Vector Tools

......................................................................................... 939

The Vector Menu ........................................................................................................... 940

Opening Vector Files ..................................................................................................... 941

The Available Vectors List

............................................................................................ 942

Working with the Vector Window ................................................................................ 943

Creating Vector Layers

................................................................................................. 966

Creating World Boundary Layers

................................................................................. 968

Converting Raster Images ............................................................................................. 969

Converting Classification Images

................................................................................. 970

Rasterizing Point Data

................................................................................................... 971

Converting ROIs to DXF Files

...................................................................................... 973

Converting Annotation Files to DXF Files ................................................................... 974

Converting EVFs to DXF Files

..................................................................................... 975

Chapter 12:

Topographic Tools

.............................................................................. 977

The Topographic Menu

................................................................................................. 978

Opening Topographic Files ........................................................................................... 979

Using Topographic Modeling ....................................................................................... 979

Extracting Topographic Features .................................................................................. 983

Creating Hill Shade Images ........................................................................................... 986

Replacing Bad Values ................................................................................................... 989

Rasterizing Point Data

................................................................................................... 990

Converting Vector Topo Maps into Raster DEMs

........................................................ 991

Using 3D SurfaceView .................................................................................................. 993

Chapter 13:

Radar Tools

........................................................................................ 1013

The Radar Menu

.......................................................................................................... 1014

Opening Radar Files .................................................................................................... 1015

Calibrating Radar Files ................................................................................................ 1019

Removing Antenna Gain Variations

........................................................................... 1021

Resampling to Ground Ranges

.................................................................................... 1023

Generating Incidence Angle Images

........................................................................... 1025

Adaptive Filters

........................................................................................................... 1026

Texture Filters ............................................................................................................. 1026

ENVI User’s Guide

Contents

10

Contents

Creating Synthetic Color Images

................................................................................. 1026

Using Polarimetric Tools

............................................................................................. 1027

Using TOPSAR Tools .................................................................................................. 1053

Appendix A:

Installing and Customizing ENVI

.................................................... 1055

ENVI Hardware Requirements .................................................................................... 1056

Installing and Starting ENVI ....................................................................................... 1057

Platform Dependencies ................................................................................................ 1058

Managing Important ENVI Interactions ...................................................................... 1060

Customizing ENVI

....................................................................................................... 1061

The ENVI Configuration File ...................................................................................... 1063

The ENVI Main Menu Definition File ........................................................................ 1071

The ENVI Display Menu Definition File

.................................................................... 1072

ENVI Startup Script ..................................................................................................... 1073

Additional Caching Information .................................................................................. 1074

Appendix B:

ENVI File Formats

............................................................................. 1075

ENVI Header Format

................................................................................................... 1077

ENVI Graphic Colors File ........................................................................................... 1082

ENVI File Type File (filetype.txt)

............................................................................... 1083

ENVI Sensor File (sensor.txt)

...................................................................................... 1084

ENVI Map Projections File

......................................................................................... 1085

ENVI Ellipsoid File (ellipse.txt) .................................................................................. 1086

ENVI Datum File (datum.txt) ...................................................................................... 1087

ENVI State Plane Projection Files ............................................................................... 1088

ENVI Spectral Library Files ........................................................................................ 1089

ENVI Previous Files List

............................................................................................. 1090

Other ENVI ASCII Files .............................................................................................. 1091

Appendix C:

ENVI Spectral Libraries

.................................................................... 1097

General Information ..................................................................................................... 1098

USGS Spectral Library (Minerals) .............................................................................. 1099

USGS Spectral Library (Vegetation) ........................................................................... 1100

Additional Vegetation Libraries

.................................................................................. 1101

ENVI User’s Guide

11

JPL Spectral Library .................................................................................................... 1102

IGCP264 Spectral Library ........................................................................................... 1103

JHU Spectral Library ................................................................................................... 1105

Appendix D:

ENVI Map Projections

....................................................................... 1109

Introduction ................................................................................................................. 1110

Map Projections ........................................................................................................... 1111

Index

................................................................................................... 1119

ENVI User’s Guide

Contents

12

Contents

ENVI User’s Guide

Chapter 1

Getting Started with

ENVI

This chapter covers the following topics:

Introduction to ENVI . . . . . . . . . . . . . . . . . . 14

ENVI, ENVI RT, and IDL . . . . . . . . . . . . . . 15

General Review of ENVI Functionality . . . 16

Starting ENVI . . . . . . . . . . . . . . . . . . . . . . . 19

ENVI Graphical User Interface (GUI) . . . . 21

General Image Display Concepts . . . . . . . . 23

Data Management . . . . . . . . . . . . . . . . . . . . 28

Memory Management . . . . . . . . . . . . . . . . 31

ENVI Basics . . . . . . . . . . . . . . . . . . . . . . . . 32

ENVI File Formats . . . . . . . . . . . . . . . . . . . 46

ENVI Supported Input File Formats . . . . . 50

ENVI Supported Output File Formats . . . . 54

Reporting Problems . . . . . . . . . . . . . . . . . . 55

Can We Be of Service?

. . . . . . . . . . . . . . . . 57

ENVI User’s Guide

13

14

Chapter 1 Getting Started with ENVI

Introduction to ENVI

ENVI

®

(the Enviroment for Visualizing Images) is a revolutionary image processing system. From its inception, ENVI was designed to address the numerous and specific needs of those who regularly use satellite and aircraft remote sensing data. ENVI provides comprehensive data visualization and analysis for images of any size and any type—all from within an innovative and user-friendly environment.

Advantages of ENVI

One of ENVI’s strengths lies in its unique approach to image processing—it combines file-based and band-based techniques with interactive functions. When a data input file is opened, its bands are stored in a list, where they can be accessed by all system functions. If multiple files are opened, bands of disparate data types can be processed as a group. ENVI displays these bands in 8- or 24- bit displays windows.

ENVI’s display window groups consist of a main Image window, a Zoom window, and a Scroll window, all of which are re-sizeable. ENVI provides its users with many unique interactive analysis capabilities, accessed from within these windows. ENVI’s multiple dynamic overlay capabilities allow easy comparison of images in multiple displays. Real-time extraction and linked spatial/spectral profiling from multiband and hyperspectral data give users new ways of looking at high-dimensional data.

ENVI also provides interactive tools to view and analyze vectors and GIS attributes.

Standard capabilities such as contrast stretching and two-dimensional scatter plots are just a few of the interactive functions available to ENVI users.

ENVI’s strong visual interface is complemented by its comprehensive library of processing algorithms. ENVI includes all the basic image processing functions within a friendly, interactive point-and-click graphical user interface (GUI). Because of

ENVI’s GUI, many basic processing functions are easier to use. Some of these functions include data transforms, filtering, classification, registration and geometric corrections, spectral analysis tools, and radar tools. ENVI does not impose limitations on the number of spectral bands that can be processed, so multi-spectral or hyperspectral data sets can be used. ENVI also includes many advanced functions that allow for analysis of radar data sets.

ENVI addresses common image processing problem areas such as input of nonstandard data types, viewing and analysis of large images, and simple extension of analysis capabilities by users (plug-in functions). The software includes essential tools required for image processing across multiple disciplines, and has the flexibility to allow the user to implement his or her own analysis strategies.

Introduction to ENVI

ENVI User’s Guide

Chapter 1 Getting Started with ENVI

15

ENVI, ENVI RT, and IDL

ENVI is written in Interactive Data Language (IDL

®

), a powerful structured programming language that offers integrated image processing. IDL is required to run

ENVI and the flexibility of ENVI is due largely to IDL’s capabilities. There are two types of ENVI licenses, ENVI with a full version of IDL, and ENVI RT which includes a runtime version of IDL. ENVI users can utilize IDL’s strengths by customizing their own command-line functions. Advanced ENVI users should find the flexibility offered by IDL’s interactive features helpful for their dynamic image analyses. ENVI RT provides complete ENVI functionality, but custom routines cannot be written.

More information on IDL can be found in Using IDL, IDL Reference Guide, and other IDL documentation.

ENVI User’s Guide

ENVI, ENVI RT, and IDL

16

Chapter 1 Getting Started with ENVI

General Review of ENVI Functionality

ENVI simplifies comprehensive interactive processing of large multiband data sets, screen-sized images, spectral plots and libraries, and image regions-of-interest, all while providing flexible display capabilities and geographic-based image browsing.

ENVI provides a multitude of interactive functions, including X, Y, Z profiling; image transects; linear and non-linear histogramming and contrast stretching; color tables, density slicing and classification color mapping; quick filter preview; and

Region of Interest definition and processing. Simple methods are provided for locating specific pixels, and for interactive spatial/spectral pixel editing. ENVI also offers interactive scatter plot functions, including two-dimensional Dancing Pixels™ and n-Dimensional Visualization™. With ENVI, images can be linked together and dynamic overlays created interactively. Comprehensive vector overlays with GIS attributes can be created, and map and pixel grids as well as annotations can be added to images. Other ENVI interactive functions include three-dimensional (perspective) viewing, surface shading, image draping, image animation (movies), and geometric rectification and mosaicking.

ENVI’s strengths are not limited to its interactive mode: ENVI functions work with full data files and subsets. We provide the user with a complete set of tools to process panchromatic images, AVHRR, Landsat MSS data, Landsat TM data, and other multispectral and hyperspectral images as well as data from today’s and tomorrow’s advanced SAR systems. AVHRR tools allow display of ephemeris data, data calibration, geometric rectification, and calculation of sea-surface temperature.

Landsat tools include functions for de-skewing and correcting aspect ratios for pre-

1979 MSS data, destriping and correcting for atmospheric interference, and calibrating to reflectance using pre-launch gains and offsets. Tools for calibrating thermal infrared data to emissivity using three methods are also included in ENVI.

General-purpose image processing functions include data transformations such as principal components transformations, band ratios transformations, hue-saturationvalue (HSV), decorrelation stretching, and generation of vegetation indices. Filtering functions include convolution kernels for low pass, high pass, median, directional, and edge detection. ENVI supports user-defined convolution kernels up to M x N; all kernels can be interactively edited. Other specific filter types such as Sobel, Roberts, dilation, and erosion are also provided, along with adaptive filters such as Lee, Frost,

Gamma, and Kuan. Texture filters, including measures for data range, mean, variance, entropy, skewness, variance, homogeneity, contrast, dissimilarity, entropy, and correlation are provided. With ENVI, frequency-domain filtering (FFT filtering) functions such as forward FFT transformations, interactive frequency domain filtering, and inverse FFT computations are easily performed.

General Review of ENVI Functionality

ENVI User’s Guide

Chapter 1 Getting Started with ENVI

17

ENVI provides KMEANS and Isodata unsupervised classification methods.

Supervised classification in ENVI uses standardized training-set collection methodologies to simplify parallelepiped, minimum distance, maximum likelihood, and mahalanobis distance classifiers. ENVI also provides the Binary Encoding,

Neural Net, and Spectral Angle Mapper (SAM) spectral classifiers. Postclassification processing includes clump, sieve, combine classes, and an interactive classification display tool, which allow generalization of image-maps prior to export to GIS vector files. ENVI’s confusion matrix/Kappa Coefficient statistics allow assessment of classification accuracy. Generation of ROC Curves can be used to visualize a classifier’s performance in order to select a decision threshold.

ENVI provides a full suite of tools for processing hyperspectral data, including special mapping tools that use either image or library endmembers for linear spectral unmixing and matched filtering. ENVI routines can be used to access spectral libraries and compare library spectra to image spectra. The Pixel Purity Index™

(PPI™) allows users to find the most spectrally pure pixels in an image to determine spectral endmembers. The unique n-Dimensional visualizer in ENVI performs interactive animation of scatter plots in n-dimensions, providing a dynamic view of the data that allows determinative selection of endmember materials and their corresponding spectra. Spectral Feature Fitting™ of hyperspectral data to library spectra aids in identifying rocks, minerals, vegetation, and other materials. The linear spectral unmixing function allows determination of relative spectral abundances using multispectral and hyperspectral data. ENVI also provides the Spectral

Analyst™ to identify materials based on comparison to spectral libraries. Flexible

Band Math™ and Spectral Math™ functions allow users to enter complex mathematical expressions, functions, and procedures that access IDL’s powerful array-processing functions.

ENVI also contains comprehensive SAR processing capabilities. All standard ENVI processing routines are inherently SAR-capable. In addition, a full suite of SARspecific analysis methods is provided, including ingest of standard SAR formats such as Radarsat and ERS-1; review and reading of header information from CEOS-format data; antenna pattern correction, slant-to-ground range correction and generation of incidence angle images. Other SAR functions include adaptive and texture filters, creating a synthetic color image, and a broad range of polarimetric data analysis methods.

ENVI User’s Guide

General Review of ENVI Functionality

18

Chapter 1 Getting Started with ENVI

Finally, ENVI provides tools to take image data to final map form. These include both image-to-image and image-to-map registration, basic orthorectification, image mosaicking, and map composition utilities. An integrated set of vector GIS import, export, and analysis tools provide the capability to bring industry-standard GIS data into ENVI, view and analyze vectors and GIS attributes (as image overlays as well as in a separate vector analysis window), modify existing vectors, query attributes, utilize vector layers for raster analysis or generate new vector GIS layers from raster image processing results, and create standard GIS export-format files.

ENVI provides all of these capabilities and more in one tightly integrated image analysis package.

General Review of ENVI Functionality

ENVI User’s Guide

Chapter 1 Getting Started with ENVI

Starting ENVI

Before starting ENVI, ensure that it is properly installed as described in the installation guide. The installation guide is included with the ENVI CDs.

To start ENVI in UNIX

• For ENVI, enter envi

at the UNIX command line.

• For ENVI RT, enter envi_rt

at the UNIX command line.

To start ENVI from a Macintosh system

1. Navigate to the OroborOSX installation folder.

2. Double-click the OroborOSX icon. OroborOSX launches XDarwin and displays a UNIX X-Windows command line in an OS X window.

3. Do either of the following:

• For ENVI, enter envi

at the OroborOSX command prompt.

• For ENVI RT, enter

envi_rt at the OroborOSX command prompt.

To start ENVI from a Windows system

Select Start

Programs ENVI 4.1ENVI.

The main ENVI menu bar appears when the program has successfully loaded and executed.

19

ENVI User’s Guide

Starting ENVI

20

Chapter 1 Getting Started with ENVI

Command Line Options for Starting ENVI

You can alter the way in which ENVI and IDL are started by supplying command line switches along with the command.

ENVI for UNIX Switches

The following command line switches are available for ENVI on the UNIX platform:

-32

Start IDL in 32-bit mode, otherwise IDL starts in 64-bit mode by default for those platforms that support 64-bit. If you have not installed the 64-bit version, the 32-bit version will automatically be started. If you have not installed the 32-bit version, this flag will not work. For example:

%eniv -32

Starting ENVI

ENVI User’s Guide

Chapter 1 Getting Started with ENVI

21

ENVI Graphical User Interface (GUI)

To effectively use ENVI, you must be familiar with the concept of a Graphical User Interface (GUI). A GUI provides a graphical means (buttons, menus, dialog boxes, etc.) of interacting with software and data. You make selections by pointing and clicking or clicking and dragging using a mouse or other pointing device.

This guide assumes that you are familiar with these concepts.

In ENVI, activities are initiated by using the main ENVI menu bar menus, which may be oriented horizontally as shown above, or vertically as shown on the right. The default arrangement

depends on user-selected configuration parameters (see “The

ENVI Configuration File” in Appendix A).

Tip

To change the orientation of the ENVI menu bar, simply grab a corner of the menu bar with the mouse and drag.

Emulating a Three-Button Mouse

To use all of ENVI’s functions, you need a three-button mouse or a way to emulate a three-button mouse. Systems that do not have a mouse with at least three buttons (or a way to emulate three buttons) and the appropriate mouse driver software will not be able to run portions of ENVI that require the third mouse button. A three-button emulation is included with ENVI for Windows and ENVI for Macintosh.

Windows Platform Hardware

On a two button mouse, the left button is the mouse button 1, the right button is mouse button 3, and you emulate the middle button (mouse button 2) by simultaneously pressing the Ctrl key and the left mouse button.

ENVI User’s Guide

ENVI Graphical User Interface (GUI)

22

Chapter 1 Getting Started with ENVI

Macintosh Platform Hardware

For Mac OS X with the single-button mouse: use the mouse as the left mouse button

(mouse button 1); use Option + mouse to emulate the right mouse button (mouse button 3); and use Command + mouse to emulate the middle mouse button (mouse button 2).

ENVI Graphical User Interface (GUI)

ENVI User’s Guide

Chapter 1 Getting Started with ENVI

General Image Display Concepts

23

An image display group in ENVI consists of three different image windows: a Main

Image window, a Zoom window, and a Scroll window. An example of an ENVI image display group is shown in the following figure. The individual image windows of a display group can be re-sized, moved to anywhere on the screen, and the display style (which combination of three windows will appear) can be selected. For more

information on setting display preferences, see “Setting ENVI Preferences” in

Chapter 2. Multiple image display groups can be used to display many images at one

time.

ENVI User’s Guide

Figure 1-1: ENVI Display Group

General Image Display Concepts

24

Chapter 1 Getting Started with ENVI

The Main Image Window

The Main Image window consists of a portion of an image displayed at full resolution. This window is automatically displayed the first time you load an image.

The initial size of the window is controlled by parameters set in the envi.cfg

configuration file (see

“The ENVI Configuration File” in Appendix A). It can also be

dynamically resized (see

“Resizing Windows” on page 25). ENVI allows loading

multiple Main Image windows and their associated Scroll and Zoom windows.

The Display Menu in the Main Image Window

In the Main Image window (or Zoom window if alternative display window styles are used), the Display menu bar contains five pull-down menus that control all of the

ENVI interactive display functions including image linking and dynamic overlays; spatial and spectral profiles; contrast stretching; color mapping; interactive features such as ROI definition, cursor location and value, scatter plots and surface plots; overlays such as annotation, grids, image contouring, and vector layers; animation; file management tools such as saving and printing images; and display controls such

as viewing display information and opening displays. See Chapter 4, “Interactive

Display Functions” for more information and step-by-step procedures.

The Scroll Window

The Scroll window is a small image display window that appears when an image is larger than can be displayed in the Main Image window at full resolution. The image in the Scroll window is displayed at subsampled resolution. The Scroll window controls what portion of the image is displayed in the Main Image window. The

Scroll window location and size are initially set in the envi.cfg

file and can be modified. You may dynamically resize it to any size up to the screen dimensions (see

“Resizing Windows” on page 25). Multiple Scroll windows may be present—one for

each Main Image window loaded.

General Image Display Concepts

ENVI User’s Guide

Chapter 1 Getting Started with ENVI

25

The Zoom Window

The Zoom window is a small image display window that displays a portion of the

Main Image window at a user-defined zoom factor based on pixel replication or interpolation. The zoom window size, location and the default zoom factor are initially set in the envi.cfg

file and can be modified. The Zoom window provides unlimited zoom capabilities, and the zoom factor is displayed as a number in parentheses in the window’s title bar. The Zoom window can be dynamically resized up to the available screen dimensions (see

“Resizing Windows” on page 25). If

alternative display window styles are used, the Display menu bar described above will appear in the Zoom window. Multiple Zoom windows may be present—one for each Main Display window loaded.

Resizing Windows

Most ENVI windows and dialogs, including all image display windows, can be dynamically resized up to the full screen dimensions.

1. Place the mouse cursor on the edge or corner of the dialog or window until the cursor becomes a two-way arrow (see the following figure).

2. Click with the left mouse button and drag the window to the desired size and shape.

ENVI User’s Guide

Figure 1-2: ENVI Display Window Resized

General Image Display Concepts

26

Chapter 1 Getting Started with ENVI

Tip

When you resize a Scroll window, the resampling factor is automatically changed to take advantage of the new image size. The resampling factor appears in parentheses in the Scroll window’s title bar. If you resize the Main image window so that it is large enough to contain the entire image, the scroll window will disappear. It will reappear if the image window is made smaller.

The Active Display

At any given time, only one image display group (Main Image, Scroll, and Zoom windows) can be active. The active display is the display group into which the next image will be loaded.

Supplemental Windows

ENVI image displays may have a large number of associated supplemental windows.

Supplemental windows are typically started from the Display menu (see “The

Display Menu Bar” in Chapter 4), and may include X, Y, Z, and arbitrary profiles,

histograms, scatter plots, and animation windows. Each supplemental window is associated with a specific image display group. Multiple displays can have independent groups of supplemental windows.

Vector Display Groups

When vectors are displayed separately from any image display, they appear in a single window with a Vector menu at the top as shown in the following figure. When vectors are overlaid onto an image display, the items from the Vector menu appear in a separate Vector Parameters dialog.

General Image Display Concepts

ENVI User’s Guide

Chapter 1 Getting Started with ENVI

27

Like image display windows, vector windows can be re-sized and placed anywhere on the screen (see

“Overlaying Vectors” in Chapter 4).

ENVI User’s Guide

Figure 1-3: ENVI Vector Display

General Image Display Concepts

28

Data Management

Chapter 1 Getting Started with ENVI

ENVI provides a number of tools for managing images, vector data, dialogs, and individual windows. These tools are introduced in the following sections, but are covered more completely in

Chapter 3, “Display Management”

as well as in

Chapter

2, “File Management” .

The Available Bands List

The Available Bands List is the main control panel for accessing ENVI image files and the individual image bands within those files. The Available Bands List appears in its own dialog whenever an image file is opened, contains a list of all of the available image bands for all of the open files and any memory items (calculations performed in memory but not saved), and shows map information for registered images. If multiple files are open, all of the bands for all of the files are listed sequentially with the bands of the most recently opened file at the top of the list. Use the Available Bands List to load both grayscale and color images into the active display, to open and close files, or to delete individual bands from memory (see

“The

Available Bands List” in Chapter 3).

The Available Vectors List

The Available Vectors List contains a list of all vector files that are available in memory for display in either image display windows or in a vector display window.

Once loaded, all of the vector layers read into memory are listed sequentially with the most recently read vectors at the top of the list. Use the Available Vectors List to start

vector displays and to delete vector layers from memory (see “The Available Vectors

List” in Chapter 3).

Scan Directory List and Geo-Browser

The Scan Directory List lists all the ENVI files in a selected directory or directories, prints file information, allows opening of selected files, and starts the Geo-Browser file display. The Geo-Browser marks the location of all geocoded data with a red flag

on a world map (see “The Scan Directory List” in Chapter 2).

Data Management

ENVI User’s Guide

Chapter 1 Getting Started with ENVI

29

The Available Files List

The Available Files List is a tool for managing ENVI image files. It lists the names of all currently open files and memory items. Selecting one of the file names lists all of the available information about the selected file. This includes parameters such as the full path and image name; the number of lines, samples, and bands; the header size; the file type; the data type; the interleave; the byte order of the data; and whether or not the data is georeferenced and if any wavelengths are associated with the bands.

Options include removal of memory items, closing or deletion of individual files, and writing of memory calculations to disk files. These actions allow optimized use of system memory (see

“The Available Files List” in Chapter 3).

The ENVI Window Finder

The ENVI Window Finder lists all open major ENVI windows. This includes the

Main Image, Scroll, and Zoom windows, all of the supplemental windows, and many other windows and dialogs used by ENVI’s interactive functions. Use the Window

Finder to call any window or dialog to the foreground (see

“Using the Window

Finder” in Chapter 3).

ENVI User’s Guide

Data Management

30

Chapter 1 Getting Started with ENVI

ENVI Processing Status Window

Most ENVI functions report processing status as calculations proceed. A standard status window appears immediately after the function is started. The window title matches the function being executed and indicates whether the results are being placed in memory or an output file. A % Complete progress bar is updated periodically as data are processed. A text box indicates the size of each data increment processed, based on the tile size (see

“Tiling Operations” on page 31). The

function automatically determines the size of the processing increment. For example, the value of 8.3% shown in the following figure indicates that the data is being processed in several tiles, each of which contains 8.3% of the total data.

Figure 1-4: Processing Status Window

Note

Use the Cancel button to terminate processing if the increment is less than 100%. If the increment is equal to 100%, interruption of the function is not possible.

Data Management

ENVI User’s Guide

Chapter 1 Getting Started with ENVI

Memory Management

31

ENVI allows processing of large data sets by tailoring to system memory resources.

ENVI uses tiling to break data sets into manageable pieces and allows you to set the size of a tile in the ENVI configuration file.

Tiling Operations

ENVI uses tiling to allow the processing of large images and to control system memory usage. A tile is a piece of data read from the disk or from memory in one piece. The size of an individual tile in ENVI is controlled by setting the desired value

in the ENVI configuration file (see “The ENVI Configuration File” in Appendix A).

For images stored as BSQ (Band Sequential), each tile is a spatial subset of an individual band. For images stored sequentially in BIL (Band Interleaved by Line) format, each tile is a single image line of all bands. For BIP (Band Interleaved by

Pixel) format, each tile is all of the pixels in an image line for all bands. Tiling is generally transparent to you as the user and is used by ENVI to insure that hardware memory limitations do not impose processing limitations (see

“Configuration File

Details” and

“Additional Caching Information” in Appendix A).

File vs. Memory

For systems with large amounts of random access memory (RAM), efficient image processing without repeated storage of intermediate processing results in disk files is possible. For most functions, ENVI offers the option of either writing image processing results to a disk file or of keeping the results in system memory.

Note

If you elect to use the memory option, save your results to disk files periodically.

ENVI User’s Guide

Memory Management

32

ENVI Basics

Chapter 1 Getting Started with ENVI

This section describes standard ENVI file opening procedures and options and other standard ENVI functions that are common in many ENVI windows and dialogs.

Selecting Files in ENVI

Before you apply any of ENVI’s functions to a specific data set, you must first select the file containing the data. To ensure consistency, nearly every ENVI image processing function uses a standard input file selection dialog. In the input selection dialog you can select an input file or a single band, perform a spatial or spectral subset, and in some cases, mask the input data.

The title bar of the input file selection dialog changes to reflect the current function and/or input file type. For example, the title bars in the following two figures specify whether the input selection is by band or by file (respectively). (This was accomplished using the ENVI_SELECT procedure with the TITLE keyword.)

ENVI Basics

Figure 1-5: Input Selection by Band

ENVI User’s Guide

Chapter 1 Getting Started with ENVI

33

Figure 1-6: Input Selection by File

Selecting Bands or Files for Processing

1. Use the Select By arrow-toggle button to select File or Band input.

2. Click on the desired file or band name in the column labeled Select Input File or Select Input Band. When you are selecting by Band, data sets appear in an unfolded state by default. The names of unfolded data sets appear in this format:

– filename.ext

Band

Band

3. To fold a data set, single-click on the minus symbol (–) next to the filename, or double-click on the filename of the data set. All of the bands of the data set are compressed and the data set appears in the list in this format:

+ filename.ext

4. To unfold a data set and make it available for processing, single-click on the plus symbol (+) next to the filename, or simply double-click on the filename.

ENVI User’s Guide

ENVI Basics

34

Chapter 1 Getting Started with ENVI

5. Select the input band or file by clicking on the name.

Note

If the Select By toggle in the dialog is set to File, you can select a subset by clicking the Spatial Subset or Spectral Subset buttons and then use the standard subsetting procedures (see

“Selecting a Spatial Subset” on page 35

or “Selecting a Spectral Subset” on page 40).

Note

To automatically start the selected function without selecting any subsetting, double-click on the file or band name.

6. Click OK.

Opening Files for Processing

The Open drop-down menu contains selections enabling you to open a new image file, a previously opened file, a spectral library, an ROI file, or an EVF file.

Opening New Files

Follow these steps to open a new file for processing.

1. In the Input Selection dialog, click the Open drop-down button, and select

New File

… from the drop-down menu. A file selection dialog opens.

2. When the file selection dialog appears, select the desired file name.

3. Click Open.

Previously Opened Files

To open a previously opened file, click the Open drop-down button, and select

Previous File from the drop-down menu to reveal the last 20 files and subsets used in previous ENVI sessions. Selecting a file from the list opens the file.

Opening a Spectral Library

Follow these steps to open a spectral library for processing.

1. In the Input Selection dialog, click the Open drop-down button, and select

Spectral Library

… from the drop-down menu. A file selection dialog opens.

2. When the file selection dialog appears, select the desired spectral library.

3. Click Open.

ENVI Basics

ENVI User’s Guide

Chapter 1 Getting Started with ENVI

35

Opening a Region of Interest

Follow these steps to open an ROI file to use when subsetting the selected image.

1. In the Input Selection dialog, click the Open drop-down button, and select

ROI File

… from the drop-down menu. An ROI file selection dialog opens.

2. When the file selection dialog appears, navigate to the desired ROI file.

3. Click Open.

Opening an EVF File

Follow these steps to open an EVF file to use when subsetting the selected image.

1. In the Input Selection dialog, click the Open drop-down button, and select

EVF File

… from the drop-down menu. A vector filename selection dialog opens.

2. When the file selection dialog appears, select the desired ENVI vector file.

3. Click Open.

To exit the Input Selection dialog without loading any files, click Cancel.

For detailed information about how to apply the selected function to only a portion of the entire file or band, see

“Selecting a Spatial Subset” or

“Selecting a Spectral

Subset” on page 40.

Selecting a Spatial Subset

Use spatial subsetting to limit application of a function to a spatial subset of the image. Spatial subsets can be selected using the following methods: entering samples and line values, selecting interactively from the image, entering map coordinates, using the same spatial subset that was previously used on another file, using the

image shown in the meta scroll window (see “Scroll Window Meta Zoom” on page 209), or by using the bounding box around a region of interest.

For subsetting by spectral bands instead of by spatial regions, see

“Selecting a

Spectral Subset” on page 40.

1. In the file selection dialog, click the Spatial Subset button.

The Spatial Subset dialog appears. Its appearance varies depending on whether the current data is sample-line-based or georeferenced.

2. Select a subset using one of the methods described in the following sections.

3. Click OK to enter the selected subset into the Spatial Subset dialog.

ENVI User’s Guide

ENVI Basics

36

Chapter 1 Getting Started with ENVI

4. Click OK to return to the file selection dialog.

ENVI Basics

Figure 1-7: Spatial Subset Dialog for a Georeferenced Image

Subsetting by Samples/Lines

To select by starting and ending values of the subset, enter the starting and ending values of the samples and/or lines into the appropriate text boxes, or enter the desired number of lines or pixels in the boxes labeled NS or NL respectively.

The size of the original data set and the size of the currently-selected subset appear below the text boxes.

Subsetting by Images

To select the spatial subset interactively from the image:

1. In the Select Spatial Subset dialog, click on the Image button.

ENVI User’s Guide

Chapter 1 Getting Started with ENVI

The Subset Function dialog appears. A subsampled version of the selected image band is displayed. A box on the image outlines the currently selected subset.

37

Figure 1-8: Subset Function Window

2. To change the subset size or location, select from the following options:

• In the Subset Function Dialog, click and grab on one of the corners of the box and drag to the desired location.

• To move the box around the image, click on the box and drag it to the desired location.

• Change the values in the Samples or Lines text boxes.

3. Click OK.

The starting and ending sample and line coordinates appear in the text boxes labeled

Samples and Lines.

Subsetting by Map Coordinates

For georeferenced images, you may select the subset by map coordinates or latitude/longitude coordinates:

1. In the Select Spatial Subset dialog, click on the Map button. The Spatial

Subset By Map Coordinates dialog appears. It is divided into two sections: one for the upper left map coordinate and the other for the lower right coordinate.

2. Enter the upper left coordinate and lower right coordinate (the corners) of the subset into the corresponding text boxes.

ENVI User’s Guide

ENVI Basics

38

Chapter 1 Getting Started with ENVI

Note

The default values displayed are the upper left and lower right coordinates of the full image.

3. Use the arrow toggle buttons to select the subset by latitude and longitude values for each coordinate.

Note

To change the map projection of the coordinates, click on the corresponding

Change Proj button and follow the instructions in

“Selecting Map Projection

Types” in Chapter 10.

4. Click OK.

ENVI Basics

Figure 1-9: Spatial Subset by Map Coordinates Dialog

Subsetting Using Another File’s Subset

There are two options for subsetting a file based on the subset area of a previously subset image: use the first option to subset your image based on a subset of an image that was originally the same size as the one you are subsetting; use the second to subset your image based on an image of the same or smaller size that was previously subset by map or pixel values.

ENVI User’s Guide

Chapter 1 Getting Started with ENVI

39

Using the Subset of an Image of the Same Size

To use the same spatial subset previously entered for a file with the same spatial size, click the Previous button in the File Selection dialog or the Select Spatial Subset dialog.

Using the Subset of an Image of the Same or Smaller Size

1. In the Select Spatial Subset dialog, click the File button.

2. In the file selection dialog, select the previously subsetted file (which must have originally been the same size as or smaller than the file you are currently subsetting).

The input file will be subset based on the subset parameters of the file you select.

Subsetting Using ROIs

To subset a file using the bounding box (i.e., the area encompassing) an ROI or group of ROIs, follow these steps:

1. In the Select Spatial Subset dialog, click the ROI button.

Figure 1-10: Subset Image by ROI Extent Dialog

Note

To make previously saved ROIs available for selection in the Subset Image by ROI Extent dialog, click the Restore ROIs button in the Select Spatial

Subset dialog and select the ROI file in the subsequent file selection dialog.

2. In the Subset Image by ROI Extent dialog, select the ROI(s) and click OK. The file will be subset to the area encompassing the selected ROI(s).

ENVI User’s Guide

ENVI Basics

40

Chapter 1 Getting Started with ENVI

Subsetting by Scroll Window

To subset a file based on the image currently shown in the meta zoomed scroll window for the selected file, click the Scroll button in the Select Spatial Subset dialog. The starting and ending values will be set to include only the scroll window subset.

Note

This option is only available if the scroll window displaying the selected file has been meta zoomed (for further information, see

“Scroll Window Meta Zoom” on page 209). If the file is displayed in multiple meta zoomed Scroll windows, the

subset of the first window is used.

Selecting a Spectral Subset

Use spectral subsetting to limit application of a function to selected bands of an image. For subsetting by spatial regions instead of spectral bands, see

“Selecting a

Spatial Subset” on page 35.

1. From within the file selection dialog, click the Spectral Subset button. The

File Spectral Subset dialog appears. The appearance of this dialog varies depending on whether the image has a bad bands list. A bad band will not be included in the processing. A list of bands available for selection appear in the center of the dialog.

ENVI Basics

Figure 1-11: Spectral Subset Dialog with Three Selected Bands

ENVI User’s Guide

Chapter 1 Getting Started with ENVI

41

2. Select a spectral subset using one of the following methods:

• Use the mouse to select a series of bands by left-clicking and dragging across the desired bands. Select multiple, non-adjacent bands by leftclicking on individual bands while depressing the Ctrl key.

• Enter the min and max band numbers in the text fields to the left of the

Add Range button to select a series of bands. The series will be selected when you click the Add Range button.

Note

For images with a Bad Bands list, click on the Apply BBL button to apply the Bad Bands List (see

“Editing Ancillary Header Information” on page 107). ENVI automatically deselects individual bands that are marked

Bad. Bad bands do not appear in the output image.

3. Click OK to return to the file selection dialog.

Using Previous Subsets

To select the same spectral subset previously used for a file with the same number of spectral bands, click the Open drop-down button. Select Previous File from the drop-down menu to reveal the last 20 files and subsets used in previous ENVI sessions. Selecting a file from the list opens the file.

Subsetting by Ranges

When selecting a range of bands to subset, the dialog default initially shows all bands selected. To select a specific range of bands instead of the default:

1. In the File Spectral Subset dialog, select Clear to reset the default setting.

2. Enter the starting and ending band numbers into the two text boxes next to the

Add Range button.

3. Click Add Range.

Subsetting from ASCII

Spectral subsetting from an ASCII file is useful if you have defined several specialuse spectral subsets for a file with a large number of bands. To spectrally subset your data using an ASCII file:

1. In the File Spectral Subset dialog, click Import ASCII.

2. When the Enter ASCII Filename dialog appears, select the ASCII file.

ENVI User’s Guide

ENVI Basics

42

Chapter 1 Getting Started with ENVI

Note

The format of the ASCII file must have the same number of lines in the file as the number of bands in the image.

3. Columns in the ASCII file define possible spectral subsets. Multiple columns can be entered to allow different band selections to be specified. For each column in the ASCII file a 0 indicates the band is not selected and a 1 indicates the band is selected.

For instance, a 5-band AVHRR file could use an ASCII file with the following data:

0 1 1

0 0 1

0 1 1

1 0 0

1 1 0

Selecting column 1 deselects bands 1, 2 and 3, and selects bands 4 and 5.

Selecting column 2 selects bands 1, 3 and 5, and deselects bands 2 and 4.

Selecting column 3 selects bands 1, 2 and 3, and deselects bands 4 and 5.

Regardless of the number of rows in the ASCII file, only the top 5 bands are shown in the Input ASCII File dialog box.

Selecting a Mask

When you select a file to be processed you can apply a spatial mask. When a mask is used, ENVI does not apply the selected function to the masked portion of the image.

A mask must be previously defined using Basic Tools

MaskingBuild Mask.

You can build a spatial mask from data ranges, Regions of Interest, and other types of input. See

“Masking” in Chapter 5 for more details about building masks.

Note

Only certain ENVI functions allow spatial masking before processing. These functions include statistics, classification, un-mixing, matched filtering, continuum removal, and spectral feature fitting.

To apply a previously built spatial mask to your image:

1. In the file selection dialog, click Select Mask Band. The Select Mask Input

Band dialog appears with a list of all bands that are the same spatial size as the input image.

ENVI Basics

ENVI User’s Guide

Chapter 1 Getting Started with ENVI

2. Select the band containing the mask.

Note

To remove the mask, click Clear Mask Band.

43

Selecting Multiple Items in Lists

When using ENVI, you often have to select from a list of items. Some lists in ENVI allow you to select more than one item. The following describes the different ways to select multiple items in a list.

Figure 1-12: Selecting Individual and Multiple Items in a Dialog

Selecting Items

• To select a group of files that are listed consecutively, click on the first file in the group, press and hold the Shift key, and click the last file in the group. Or, click and drag the cursor over the group of items with the left mouse button.

The items are selected when they are highlighted.

• To select multiple files that are not listed consecutively, press and hold the Ctrl key on your keyboard and click on each desired file.

• If the dialog you’re working in displays a Select All Items button, click the button to select all of the items in the list.

ENVI User’s Guide

ENVI Basics

44

Chapter 1 Getting Started with ENVI

Note

You cannot select multiple items from the Available Bands List or the Available

Vectors List.

De-Selecting Items

• To de-select a single item, hold the Ctrl key down and click on the item.

• If the dialog you’re working in displays a Clear All Items or Clear button, click it to de-select all of the items in the list.

Selecting File or Memory Output

You are given the option to save your images and data to File or Memory. Saving an image to memory saves it in your computer’s system memory and allows the image to be displayed from the Available Bands List or the Available Vectors List. When you close ENVI, the image is deleted. Saving an image to a file saves the image to your hard drive. When you close ENVI, the item is not deleted. For more information, see

“File vs. Memory” on page 31.

1. In any dialog where you are given the option to select output to File or

Memory, click the File or Memory toggle button.

2. If you select output to File, enter the desired output filename in the Enter

Output Filename text box or click the Choose button to select an output filename.

Figure 1-13: Output to File or Memory (left) and Output Filename (right) Dialogs

ENVI Basics

ENVI User’s Guide

Chapter 1 Getting Started with ENVI

45

Placing Un-executed Functions in Queue

Use the Queue button to save the parameters that you’ve set for a particular function

(without executing the function) so that you can execute the function later. To execute the function later, use the ENVI Queue Manager (see

“Using the ENVI Queue

Manager” on page 172).

1. Start an ENVI function (for example, Basic Tools

Stretch Data).

2. In the file selection dialog, select the input file.

3. Enter the parameters for the function (for example, enter the stretch parameters in the Data Stretching dialog).

4. Instead of clicking OK to execute the function, click the Queue button.

The dialog closes, the parameters are saved, and the function can be executed later from the ENVI Queue Manager.

Note

If you exit ENVI without executing the queued functions, a warning will appear.

Compressing Output

Use the Compress check box to compress your output. ENVI applies a lossless GZIP format compression to the output file. When a compressed file is opened in ENVI,

ENVI reads the file and un-compresses it on-the-fly.

Warning

Be aware that ENVI cannot read compressed files that are larger than two gigabytes.

If you compress a large file and it remains larger than two gigabytes when compressed, you will not be able to read it with ENVI.

To output a file in compressed format:

• In any dialog where the Compress check box appears, select the Compress check box before clicking OK.

Note

Compressed files are slower to output and input than un-compressed files; the

Compress check box is only available in functions that output files sequentially.

ENVI User’s Guide

ENVI Basics

46

ENVI File Formats

Chapter 1 Getting Started with ENVI

ENVI supports several image file formats, which are described in this section. Also discussed in this section are ENVI header files, file naming conventions, and crossplatform portability issues.

ENVI Image Files

ENVI uses a generalized raster data format consisting of a simple flat binary file and a small associated ASCII (text) header file. This approach permits ENVI’s flexible use of nearly any image format, including those with embedded header information.

All data types are supported in their native formats (byte, signed and unsigned integer, long integer, floating point, double precision, 64-bit integer, unsigned 64-bit integer

, complex, or double complex). The generalized raster data is stored as a binary stream of bytes either in BSQ, BIP, or BIL formats (see

“ENVI File Formats” in Appendix B).

BSQ (Band Sequential Format)

In its simplest form, the data is in BSQ format, with each line of the data followed immediately by the next line in the same spectral band. This format is optimal for spatial (X, Y) access of any part of a single spectral band.

BIP (Band Interleaved by Pixel Format)

Images stored in BIP format have the first pixel for all bands in sequential order, followed by the second pixel for all bands, followed by the third pixel for all bands, etc., interleaved up to the number of pixels. This format provides optimum performance for spectral (Z) access of the image data.

BIL (Band Interleaved by Line Format)

Images stored in BIL format have the first line of the first band followed by the first line of the second band, followed by the first line of the third band, interleaved up to the number of bands. Subsequent lines for each band are interleaved in similar fashion. This format provides a compromise in performance between spatial and spectral processing and is the recommended file format for most ENVI processing tasks.

ENVI File Formats

ENVI User’s Guide

Chapter 1 Getting Started with ENVI

File Type

ENVI Bad Lines List

ENVI Band Math or Spectral Math Expression

ENVI Calibration Factors

ENVI Contour Levels File

ENVI Density Slice Range File

ENVI Display Group

ENVI Filter Kernels

ENVI GCP file

ENVI Grid File

ENVI Header File

ENVI Image

ENVI Look Up Table

Table 1-1: ENVI File Types

47

ENVI Header Files

The ENVI header file contains information used to read an image data file and is normally created the first time a data file is accessed by ENVI. The separate ENVI text header file provides information to ENVI about the dimensions of the image, the imbedded header if present, the data format, and other pertinent information. The required information is entered interactively or is automatically created with file ingest, and can be edited and changed later. You can generate an ENVI header outside

ENVI by using a text editor (see

“ENVI Header Format” in Appendix B).

ENVI File Naming Conventions

ENVI’s file handling routines were designed to be extremely flexible. ENVI does not impose any constraints on the way that files are named with the exception of the use of the

.hdr

extension used for header files. Some ENVI functions do pre-load lists of files with specific extensions for ease of use. These are listed in the following table and should be used consistently when running ENVI to maximize file handling efficiency. This does not preclude you from using different file names if desired.

Extension

.bll

.exp

.cff

.lev

.dsr

.grp

.ker

.pts

.grd

.hdr

None defined

.lut

ENVI User’s Guide

ENVI File Formats

48

Chapter 1 Getting Started with ENVI

File Type Extension

ENVI Map Key

ENVI Mosaic Template File

ENVI n-D Visualizer State

ENVI PPI Count File

ENVI Region of Interest

ENVI Spectral Library

ENVI Statistics File

ENVI Statistics Report

.key

.mos

.ndv

.cnt

.roi

.sli

.sta

.txt

ENVI Surface View Path File

ENVI Tape Script

ENVI Vector File

ENVI Vector Template File

.pat

.fmt

.evf

.vec

JPL AIRSAR Compressed Stokes Matrix Radar Data

.stk

SIR-C Compressed Data Product

.cdp

Table 1-1: ENVI File Types (Continued)

ENVI File Formats

ENVI User’s Guide

Chapter 1 Getting Started with ENVI

49

Cross-Platform File Portability

One additional factor to consider when naming files used with ENVI is crossplatform portability. The filenames on UNIX systems have a

.hdr appended to the file name. On Windows systems the

.hdr

replaces the current extension. This is particularly important for preserving the relation between image files and their corresponding header (

.hdr

) files. For example, a UNIX image file with the name image_1.img

would have image_1.img.hdr

. as its corresponding header file. A

Windows image file named image_1.img

would have image_1.hdr

. as its corresponding header file. In Windows, the two images, image_1.img

and image_1.dat

, would have the same header file name of image_1.hdr

and ENVI would have problems if the two images were of different sizes and characteristics.

Under UNIX, the same two files would have the corresponding header file names of image_1.img.hdr

and image_1.dat.hdr

and no confusion would occur. If cross platform portability of images is an issue, then the easiest solution is to name image files without an extension. Thus the image file image_1

has the same header file name ( image_1.hdr

) under both UNIX and Windows. Alternatively, images and header files can be renamed to the Windows convention before moving the images from UNIX to Windows systems.

ENVI User’s Guide

ENVI File Formats

50

Chapter 1 Getting Started with ENVI

ENVI Supported Input File Formats

The input file formats supported by ENVI are listed below. More information about

these formats are found in “Opening Image Files” ,

“Opening External Files” , and

“Opening Vector Files” in Chapter 2. ENVI supports numerous input file formats:

Flat Binary Files

• BSQ (Band Sequential)

• BIL (Band Interleaved by Line)

• BIP (Band Interleaved by Pixel)

Landsat Files

• MRLC

• ACRES CCRS

• ESA CEOS

• FAST

• GeoTIFF

• HDF

• NLAPS

SPOT Files

• SPOT

• GEOSPOT

• DIMAP

IKONOS Files

• GeoTIFF

• NITF

QuickBird Files

• ACRES SPOT

• Vegetation

• GeoTIFF

• NITF

ENVI Supported Input File Formats

ENVI User’s Guide

Chapter 1 Getting Started with ENVI

OrbView Files

• GeoTIFF

• NITF

IRS Files

• Fast

• SuperStructured

AVHRR

• KLM/Level 1b

• SHARP

SeaWiFS Files

• HDF

• CEOS

EOS Files

• ASTER 1A/1B

• MODIS 1B

EROS A Files

• Level 1A

• Level 1B (GeoTIFF)

ENVISAT Files

• AATSR

• MERIS

• ASAR

ENVI User’s Guide

51

ENVI Supported Input File Formats

52

Chapter 1 Getting Started with ENVI

Radar Files

• RADARSAT

• ERS

• AIRSAR

Military Files

• JERS

• TOPSAR

• ASAR

• ADRG

• CADRG

Thermal Files

• CIB

• NITF

• TIMS

• MASTER

• AATSR

• ASTER

USGS and Digital Elevation Files

• USGS DRG

• USGS DOQ

Miscellaneous Formats

• USGS DEM

• SDTS DEM

• ATSR

• DMSP (NOAA)

Image Processing Software Formats

• ArcView Raster (.bil)

• ECW

• ERDAS 7.5 (.lan)

• ERDAS 8.x (.img)

• ER Mapper

• PCI (.pix)

• DTED

• SRTM DEM

ENVI Supported Input File Formats

ENVI User’s Guide

Chapter 1 Getting Started with ENVI

Generic Formats

53

• ASCII

• BMP

• HDF

• JPEG

• JPEG2000

• MrSID

• PDS

• PICT

• PNG

• SRF

• TIFF/GeoTIFF

• TIFF world files (

• XWD

.tfw

)

Note

ENVI supports the following input TIFF compression formats: CCITT Group 3 & 4 algorithms, Macintosh PackBits algorithm, THunderScan 4-bit RLE algorithm,

NeXT 2-bit RLE algorithm, and LogLuv high dynamic range encoding.

Vector Files

• ARC/INFO Interchange Format

• ArcView Shape File

• DXF

• ENVI Vector File (.evf)

• MapInfo Interchange

• Microstation DGN

• USGS DLG

• USGS DLG in SDTS Format

ENVI User’s Guide

ENVI Supported Input File Formats

54

Chapter 1 Getting Started with ENVI

ENVI Supported Output File Formats

The output file formats supported by ENVI are listed below. More information about these formats are found in

“Saving Files” in Chapter 2, and

“Display Output Options”

and

“Working with Vector Layers” in Chapter 4.

ENVI Flat Binary Files:

• BSQ (Band Sequential)

• BIL (Band Interleaved by Line)

• BIP (Band Interleaved by Pixel)

Generic Image Formats

• ASCII

• BMP

• HDF

• JPEG

• JPEG2000

Image Processing Formats

• PICT

• SRF

• TIFF (GeoTIFF)

• TIFF world files (.

tfw

)

• XWD

• ArcView Raster (

• ERDAS 7.5 (

• PCI (

.pix

)

Vector Formats

.bil

.lan

)

) • ER Mapper

• NITF 02.00/02.10

• ArcView Shape File

• ENVI Vector File (.evf)

• DXF

ENVI Supported Output File Formats

ENVI User’s Guide

Chapter 1 Getting Started with ENVI

Reporting Problems

55

When you encounter a problem with ENVI, please report them as quickly as possible so we can fix it. This section is intended to help you report problems in a way that will help us correct the problem rapidly.

Background Information

When a bug is reported and verified, we correct it in a later release. Sometimes, a bug only occurs when running on a certain machine, operating system, or graphics device.

For these reasons, we need to know the following facts when you report a bug:

• Your ENVI installation number.

• The version of ENVI you are running.

• The type of machine it is running on.

• The operating system version it is running under.

• The type and version of your windowing system.

• The graphics device, if the problem involves graphics.

The installation number is assigned by us when you purchase ENVI. The ENVI version, site number, and type of machine are printed when ENVI is started.

Under UNIX, the version of the operating system can usually be found in the file

/etc/motd

. It is also printed when the machine boots. In any event, your system administrator should know.

Under Windows 98, Windows 2000, Windows NT version 4, and Windows XP, select

About from the Help menu in the Windows Explorer.

On the Macintosh, select About this Macintosh from the apple menu.

Double Check

Before reporting a problem, you should verify that the problem is a bug and not simply a matter of misinterpreting the expected outcome of a specific function or action. Double check by reviewing the documentation and the online help or by checking with a local expert. Make sure your system is properly configured with enough virtual memory and sufficient operating system quotas.

ENVI User’s Guide

Reporting Problems

56

Chapter 1 Getting Started with ENVI

If you cannot find the information you need in the ENVI written guides or online help, please let us know so we can improve the clarity and content of the documentation.

Describing the Problem

When describing the problem, it is important to use precise language. Vague terms like crashes, blows up, and fails are open to many interpretations. Does it really crash

ENVI and leave you looking at an operating system prompt? This would be our interpretation of “crash.” Perhaps, however, it just issues an unexpected error message and gives another prompt. What is really meant by a term like “fails?”

Sending Data with Your Bug Report

If the data files are required to reproduce the bug, we will need you to send them to us on magnetic media or via e-mail. Call us for details.

Contact Us

To report a problem, contact us at the following addresses.

Mail

Research Systems, Inc.

4990 Pearl East Circle

Boulder, CO 80301 USA

Telephone

(303) 786-9900 (Voice)

(303) 786-9909 (Fax)

(303) 413-3920 (IDL technical support direct line)

Electronic Mail

rsinc.com

Reporting Problems

ENVI User’s Guide

Chapter 1 Getting Started with ENVI

Can We Be of Service?

57

Our team of responsive, creative consultants is ready to listen and deliver what you want - on time and within budget. They can help you define requirements and lead the way throughout the development cycle - from prototyping to final installation - or jump in mid-stream and provide expert assistance.

Each member of the team has many years of experience in areas such as image processing; data analysis; visualization; software development; a broad range of scientific application areas; and government civilian, defense and intelligence community requirements. RSI also has staff with the necessary security clearances to support classified projects.

At RSI, we offer a complete suite of project engineering capabilities. RSI’s Global

Services Group (GSG) builds complete solutions for unique data analysis and visualization applications. Do you need shoulder-to-shoulder guidance that gets you up to speed? Do you want to outsource all or part of a project? Add Research Systems

Professional Services Group to your team.

GSG team members know how to exploit and extend ENVI’s robust suite of user functions and batch programming capabilities. Because these same people help develop IDL and ENVI; they have the most up-to-date knowledge on recent product enhancements and future product direction. This knowledge gives them an edge. That advantage lets you reap maximum reward from your technology investment.

ENVI User’s Guide

Can We Be of Service?

58

Chapter 1 Getting Started with ENVI

Can We Be of Service?

ENVI User’s Guide

Chapter 2:

File Management

This chapter covers the following topics:

The File Menu . . . . . . . . . . . . . . . . . . . . . . . 60

Opening Image Files . . . . . . . . . . . . . . . . . . 61

Opening Vector Files . . . . . . . . . . . . . . . . . . 63

Opening External Files . . . . . . . . . . . . . . . . 66

Opening Vector Files . . . . . . . . . . . . . . . . . . 63

Editing ENVI Headers . . . . . . . . . . . . . . . . 104

Generating Test Data . . . . . . . . . . . . . . . . . 122

Using the Data Viewer . . . . . . . . . . . . . . . . 125

Saving Files . . . . . . . . . . . . . . . . . . . . . . . . 127

Importing IDL Variables . . . . . . . . . . . . . . 135

Exporting to IDL Variables . . . . . . . . . . . 136

Compiling IDL Code . . . . . . . . . . . . . . . . 137

IDL CPU Parameters . . . . . . . . . . . . . . . . 138

Tape Utilities . . . . . . . . . . . . . . . . . . . . . . 141

The Scan Directory List . . . . . . . . . . . . . . 166

Working With Files and Scripts . . . . . . . . 170

Using the ENVI Queue Manager . . . . . . . 172

Logging Processing Information . . . . . . . 173

Setting ENVI Preferences . . . . . . . . . . . . 174

ENVI User’s Guide

59

60

The File Menu

Chapter 2: File Management

Use the File menu on the ENVI main menu to read files into ENVI, set preferences, and to exit ENVI and other file and program management functions. The individual

File menu items are described in the following sections.

The File Menu

Figure 2-1: ENVI File Menu

ENVI User’s Guide

Chapter 2: File Management

Opening Image Files

61

Use Open Image File to open ENVI image files (flat binary files, described in

“ENVI File Formats” in Appendix B) or other binary image files of known format.

ENVI automatically identifies and reads files of the following types: TIFF, GeoTIFF,

JPEG, JPEG200, MrSID, BMP, SRF, HDF, PDS, MAS-50, NLAPS, RADARSAT,

HDF SeaWiFS, Landsat 7 HDF, Landsat 7 Fast (.

fst

), MRLC (.

dda

), ERDAS 7.x

(.

lan

), ERDAS 8.x (.

img

), ER Mapper, PCI (.

pix

), and AVHRR. The data is left in its native format and the necessary information is read from the data header. ENVI can also read several other file types (see

“Opening External Files” on page 66).

1. Select File

Open Image File.

2. When the Enter Data Filenames dialog appears, select the file to open by clicking on its name and clicking OK or Open.

After the file is opened, the bands are listed in the Available Bands List (see

“The

Available Bands List” in Chapter 3).

Tip

If a Header Info: dialog appears when opening a file that is supported in ENVI, select Open External File

your file type instead of using Open Image File (see

“Opening External Files” on page 66).

Creating Header Files

When ENVI first opens a file, it requires specific information regarding the file characteristics. If the file is an ENVI format file, the necessary information is contained in a separate text header file. The text header file has the same name as the image file, but the file extension is

.hdr

.

If ENVI cannot find the header file (

.hdr

file) or other valid header information upon opening a file, the Header Info: dialog box appears. You must enter the required

information into the dialog ( Figure 2-2 ) before an imported image can be displayed in

ENVI. The information needs to be entered only once and is automatically stored into an ENVI header file in the input directory when the OK button at the bottom of the

Header Info: window is selected.

Tip

To change the header information for existing header files, use the Edit Header function (see

“Editing ENVI Headers” on page 104).

ENVI User’s Guide

Opening Image Files

62

Chapter 2: File Management

Use the Header Info: dialog to enter the number of samples or pixels, the number of lines, the number of bands, the offset in bytes from the start of the file to where the data begins, the storage order of the data, the byte order of the data, the data type and the file type. The offset is typically used to define the size of the embedded header, which, if present, contains external information about the file and is usually found before the actual image data begins; the storage order of the data is the interleave, which is in the format BSQ, BIP, or BIL; the byte order of the data is in the format

Host (Intel) (Host Least Significant First) for DEC machines and PCs or Network

(IEEE) (Network Most Significant First) for all other platforms); the data type is in the format byte, integer, floating point, etc.

All additional information stored in the ENVI Header is optional. To access this optional information, click the Edit Attributes button in the Header Info: dialog.

This optional information includes setting the default Z-Plot range, default stretch for display, entering georeferencing information, associated wavelengths and associated

FWHM (full-width-half-maximum) values, sensor type, band names, and bad bands.

For more information, see

“Editing ENVI Headers” on page 104.

Figure 2-2: Header Information Dialog

Note

If you are opening a file directly from a CD-ROM, the created header file will be saved to the Alternate Header Directory specified in the envi.cfg

file because you cannot write to the CD-ROM input directory (see

“Installing and Customizing

ENVI” in Appendix A ).

Opening Image Files

ENVI User’s Guide

Chapter 2: File Management

Opening Vector Files

63

Use Open Vector File from either the ENVI main menu or the Available Vectors

List, to open the Select Vector Filenames dialog. You can use this dialog to navigate to, and open vector files. The Select Vector Filenames dialog enables you to filter for any of the following ENVI-supported vector file types or show all file types (

*.*

) using the Files of type: drop-down list.

• ENVI vector files,

*.EVF

• ArcView Shapefiles,

*.SHP

• ARC/INFO Interchange,

*.EOO

• DXF vector files,

*.DXF

• MapInfo Interchange format,

• Microstation DGN,

• USGS DLG files,

• USGS SDTS files,

*.DGN

*.DDF

,

*.DLG

*.MIF

*.DLG

In addition, you can open one or more files simultaneously from the list in the file selection dialog by using the Shift-click and Ctrl-click methods before selecting

Open.

Note

You may load as many vector layers as desired, but note that each file should contain one vector layer only.

1. To open vector files, select one of the following options:

• From either the ENVI main menu or the Available Bands List, select

File

Open Vector File, or

• From the ENVI main menu, select Vector

Open Vector File.

2. When the Select Vector Filenames dialog appears, use the Files of type: dropdown list to select All Files (*).

3. Select one or more vector filenames and click Open.

Tip

You can open one or more files simultaneously from the files shown in the dialog by using the Shift-click and Ctrl-click methods before selecting

Open.

ENVI User’s Guide

Opening Vector Files

64

Chapter 2: File Management

When external vector files are opened, the Import Vector Files Parameter dialog

appears (see Figure 2-3

).

Figure 2-3: Import Vector Files Parameters Dialog For .evf, and .shp File Types

All of the files opened in the Select Vector Filenames dialog are listed under Selected

Input Files:. When a file in the list is highlighted, the Layer Name and Native File

Projection sections of the dialog are updated with the information for that file. Since

ENVI vector (.evf) files already contain layer name and map projection information,

these sections are inactive in that dialog (as shown in Figure 2-3

left).

The Import Vector Files Parameters dialog enables you to open multiple vector files of different file types simultaneously in the dialog.

Opening Vector Files

ENVI User’s Guide

Chapter 2: File Management

65

4. Select from the following options in the Import Vector Files Parameters dialog.

• To select another file to load, click the Input Additional Files

… button in the Selected Input Files section of the Import Vector Files Parameters dialog. When the button is selected, the Select Vector Filenames dialog appears, and you can again choose one or more files of any vector type to be opened.

• To send all of the non-EVF vector files to memory, click on the Output to

Memory for All button in the Layer Name section. All non-EVF vector files listed in the dialog are sent to memory. Click OK, and the files are listed in the Available Vector List.

Note

EVF files are native to ENVI and do not require conversion to file or memory.

• To apply the current map projection parameters to all files in the list with unknown projections, click the Apply Projection to Undefined button in the Native File Projection section. Unknown projections are listed as

Arbitrary in the map projections list box of the dialog.

Note

Files listed with known projections are not converted to the current map projection when this button is clicked.

5. Click OK to start the conversions you have specified.

ENVI User’s Guide

Opening Vector Files

66

Opening External Files

Chapter 2: File Management

While Open Image File can be used to open most file types, it is often more convenient to use internal or external header information for specific known file types. Use Open External File to read several standard file types including formats for selected sensors, military formats, digital elevations model formats, image processing software formats, and generic image formats. ENVI reads the necessary parameters from internal headers and it is usually not necessary for you to enter any information in the Header Information dialog (see

“Editing ENVI Headers” on page 104).

Note

For a list of ENVI’s supported input files, see “ENVI Supported Input File Formats” in Chapter 1.

1. Select File

Open External Filethe desired format.

2. When the standard file selection dialog appears (see “Selecting Files in ENVI” on page 32), select a filename and click Open.

• To select a group of files that are listed consecutively, click on the first file in the group, press and hold the Shift key, and click the last file in the group. Or, click and drag with the left mouse button to select the desired group.

• To select multiple files that are not listed consecutively, press and hold the

Ctrl key on your keyboard and click on each desired file.

3. If ENVI prompts you to enter Output Filename, enter a name for each file as requested.

See the following sections for detailed descriptions of how to access specific file formats.

Opening External Files

ENVI User’s Guide

Chapter 2: File Management

67

Opening Landsat Files

Use these selections to open Landsat data in FAST, GeoTIFF, HDF, NLAPS, MRLC,

ACRES CCRS, and ESA CEOS formats.

Opening FAST TM Files

To read FAST format Landsat TM data:

1. Select File

Open External FileLandsatFAST.

2. When the file selection dialog appears, select one of the following files:

• For Fast TM format data, select the header.dat

file.

• For Landsat 7 FAST panchromatic data, select the HPN header file.

• For the 6 VNIR/SWIR Landsat 7 FAST data bands, select the HRF header file.

• For Landsat 7 FAST thermal bands, select the HTM header file.

The file names follow the naming conventions shown above. ENVI automatically extracts the header information, including georeferencing information, and enters the image bands into the Available Bands List. For Landsat 7 FAST files, ENVI also extracts the data acquisition date, the gains and bias factors, and the sun elevation and azimuth. ENVI also creates a meta file—a single file containing all of the bands—and lists it in the Available Bands List. ENVI assigns wavelengths to the bands based on the sensor type. For information about meta files, see

“Saving Files as ENVI Meta

Files” on page 129.

Opening Landsat GeoTIFF Files

To read GeoTIFF format Landsat files and extract the georeferencing information:

1. Select File

Open External FileLandsatGeoTIFF.

2. When the file selection dialog appears, select the desired input file.

ENVI reads the GeoTIFF image, automatically extracts the necessary header information (including the associated georeferencing information) and places the image bands in the Available Bands List.

ENVI User’s Guide

Opening External Files

68

Chapter 2: File Management

Opening Landsat HDF Files

To read HDF format Landsat data:

1. Select File

Open External FileLandsatHDF.

2. When the file selection dialog appears, select the

.hdf file.

ENVI automatically extracts the header information, including georeferencing information, and enters the image bands into the Available Bands List. For Landsat 7

HDF files, ENVI also extracts the data acquisition date, the gains and bias factors, and the sun elevation and azimuth. ENVI also creates a meta file—a single file containing all of the bands—and lists it in the Available Bands List. (For information about meta files, see

“Saving Files as ENVI Meta Files” on page 129.) If the data is

from Landsat 7, then the panchromatic band will also be opened and placed in its own file.

Opening NLAPS Landsat Files

To read Landsat TM and MSS BSQ (band sequential) and BIL (band interleaved by line) NLAPS format data from CD-ROM or from disk:

1. Select File

Open External FileLandsatNLAPS.

2. When the file selection dialog appears with the header files (

.

hd

) listed by default, select the

.hd file to open.

ENVI automatically extracts the necessary header information (including any UTM georeferencing information) and lists all the bands in the Available Bands List. ENVI also creates a meta file—a single file containing all of the bands—and lists it in the

Available Bands List. For information about meta files, see

“Saving Files as ENVI

Meta Files” on page 129.

Opening MRLC Landsat Files

ENVI reads Multi-Resolution Land Characteristics (MRLC) format TM and DEM files and extracts the UTM georeferencing information.

To open the Landsat TM data (all bands):

1. Select File

Open External FileLandsatMRLC.

2. When the file selection dialog appears, select one of the TM (

.dda

) image files.

Opening External Files

ENVI User’s Guide

Chapter 2: File Management

69

ENVI automatically extracts the header information (including UTM georeferencing information) and places the image bands in the Available Bands List. ENVI also creates a meta file—a single file containing all of the bands—and lists it in the

Available Bands List. For information about meta files, see

“Saving Files as ENVI

Meta Files” on page 129.

Opening ACRES CCRS Files

To read the Australian Centre for Remote Sensing (ACRES) CCRS format Landsat files:

Note

For Landsat 7 ACRES files, you need to run re_name.bat

(PC) or re_name.s

(UNIX) from the ACRES CD to rename the files to their proper names before the data can be read into ENVI.

1. Select File

Open External FileLandsatACRES CCRS.

2. When the file selection dialog appears, select the

Imag_xx.dat

file.

ENVI automatically extracts the header information, including UTM georeferencing information, and enters the image bands into the Available Bands List.

Opening ESA CEOS Landsat TM Files

To read European Space Agency Landsat TM format data:

1. Select File

Open External FileLandsatESA CEOS.

2. When the file selection dialog appears, select the input data file.

The files must follow the naming convention of dat_xx.xxx

and l ea_xx.xxx

.

ENVI automatically extracts the necessary header information, including any UTM georeferencing information, and lists all of the bands in the Available Bands List.

ENVI also creates a meta file—a single file containing all of the bands of a BSQ formatted file—and lists it in the Available Bands List. ENVI assigns wavelengths to the bands based on the sensor type. For information about meta files, see

“Saving

Files as ENVI Meta Files” on page 129.

ENVI User’s Guide

Opening External Files

70

Chapter 2: File Management

Opening SPOT Files

Use the following procedures to open old Spot files, GeoSPOT files, ACRES SPOT,

SPOT vegetation files, and SPOT DIMAP files.

Opening SPOT Files

To read 1A, 2A, and 1B SPOT data directly from a CD-ROM or disk:

1. Select File

Open External FileSpotSPOT.

2. When the file selection dialog appears, select the image file to be read.

ENVI automatically extracts the header information and enters the image bands into the Available Bands List.

Opening GeoSPOT - ArcView Raster (.bil) Files

SPOT provides most of their data in the GeoSPOT format. ArcView raster image files have a similar format specification. The GeoSPOT format is described in detail in documentation available from SPOT Image. While the GeoSPOT format provides for a wide variety of both raster and vector data, ENVI currently supports only GeoSPOT raster images. These images have the

.bil file extension and an associated header file with the extension

.hdr

.

1. Select File

Open External FileSpotGeoSPOT.

2. When the file selection dialog appears, select the file to be read.

ENVI automatically extracts the header information, including UTM and State Plane projection georeferencing information, and enters the image bands into the Available

Bands List.

Opening ACRES SPOT Files

To read the Australian Centre for Remote Sensing (ACRES) CCRS and SPIM format

Spot files:

1. Select File

Open External FileSpotACRES SPOT.

2. When the file selection dialog appears, select the

Imag_xx.dat

file.

ENVI automatically extracts the header information, including any UTM georeferencing information, and enters the image bands into the Available

Bands List.

Opening External Files

ENVI User’s Guide

Chapter 2: File Management

71

Opening SPOT Vegetation Files

To read SPOT Vegetation files:

1. Select File

Open External FileSpotVegetation.

2. When the file selection dialog appears, select the

.hdf

file.

ENVI automatically extracts the necessary header information, including georeferencing information, and lists all the bands in the Available Bands List. ENVI also creates a meta file—a single file containing all of the bands—and lists it in the

Available Bands List. For information about meta files, see

“Saving Files as ENVI

Meta Files” on page 129.

Opening SPOT DIMAP Files

To read SPOT DIMAP files:

1. Select File

Open External FileSpotDIMAP.

2. When the file selection dialog appears, select any

.dim

file to be read.

ENVI automatically extracts the necessary header information, including georeferencing information, band wavelengths, gains, and offsets. Then, all the bands are listed in the Available Bands List. If the data is multispectral SPOT, ENVI automatically displays a color infrared image.

Note

It may take a long period of time to parse the header information from the metadata.dim file. It is quicker to open the TIFF image file using File

Open

Image File directly if you do not plan to georeference the data. If you plan to georeference the SPOT data using ENVI, you must read the data using File

Open External File

SpotDIMAP because the header information is needed.

For more information, see

“Georeferencing SPOT Data” in Chapter 10.

ENVI User’s Guide

Opening External Files

72

Chapter 2: File Management

Opening IKONOS Files

Use the following procedures to open IKONOS files in GeoTIFF or NITF formats.

Opening GeoTIFF IKONOS Files

To read GeoTIFF format IKONOS files (or those labeled “11-bit TIFF”) and extract the georeferencing information:

1. Select File

Open External FileIKONOSGeoTIFF.

2. When the file selection dialog appears, select the desired input file.

ENVI reads the GeoTIFF image, automatically extracts the necessary header information (including the associated georeferencing information) and places the image in the Available Bands List.

Opening NITF IKONOS Files

To read NITF format IKONOS files:

1. Select File

Open External FileIKONOSNITF.

2. When the file selection dialog appears, select the input file.

ENVI automatically extracts the header information, including georeferencing information, and places the image band in the Available Bands List.

Opening IKONOS Files with RPC Positioning

Use the following procedure to derive RPC-based geolocation information for individual pixels in an IKONOS image. A file containing the image RPCs (Rational

Polynomial Coefficients or Rapid Positioning Coordinates) is required. The geolocations are determined from a pseudo projection, which is derived by ENVI from the provided RPC model. This method does not change the appearance of the image, it simply calculates the correct geolocation for each individual pixel.

Tip

This RPC-based georeferencing method is less computationally and disk space intensive than a full orthorectification process performed on the imagery; however, the full orthorectification process provides greater accuracy.

Opening External Files

ENVI User’s Guide

Chapter 2: File Management

73

To use an RPC pseudo projection to position (georeference) IKONOS data:

1. Select File

Open External FileIKONOSOpen with RPC

Positioning.

2. When the file selection dialog appears, select the input file. If an associated

RPC file cannot be found, you are prompted to select a file containing the RPC coefficients.

ENVI automatically extracts the remaining header information and places the image band in the Available Bands List. To automatically assign an RPC file to be used as a pseudo projection for a specific image, see

“Emulating an RPC Projection” on page 115.

Opening QuickBird Files

Use the following procedures to open QuickBird 2.0 files in GeoTIFF or NITF formats.

Opening GeoTIFF QuickBird Files

To read GeoTIFF format QuickBird 2.0 files and extract the georeferencing information:

1. Select File

Open External FileQuickBirdGeoTIFF.

2. When the file selection dialog appears, select the desired input file.

ENVI reads the GeoTIFF image, automatically extracts the necessary header information (including the associated georeferencing information) and places the image in the Available Bands List.

Opening NITF QuickBird Files

To read NITF format QuickBird 2.0 files:

1. Select File

Open External FileQuickBirdNITF.

2. When the file selection dialog appears, select the input file.

ENVI automatically extracts the header information, including georeferencing information, and places the image band in the Available Bands List.

ENVI User’s Guide

Opening External Files

74

Chapter 2: File Management

Opening QuickBird Files with RPC Positioning

Use the following procedure to derive RPC-based geolocation information for individual pixels in an QuickBird image. A file containing the image RPCs (Rational

Polynomial Coefficients or Rapid Positioning Coordinates) is required. The geolocations are determined from a pseudo projection, which is derived by ENVI from the provided RPC model. This method does not change the appearance of the image, it simply calculates the correct geolocation for each individual pixel.

Tip

This RPC-based georeferencing method is less computationally and disk space intensive than a full orthorectification process performed on the imagery; however, the full orthorectification process provides greater accuracy.

To use an RPC pseudo projection to position (georeference) QuickBird data:

1. Select File

Open External FileQuickBirdOpen with RPC

Positioning.

2. When the file selection dialog appears, select the input file. If an associated

RPC file cannot be found, you are prompted to select a file containing the RPC coefficients.

ENVI automatically extracts the remaining header information and places the image band in the Available Bands List. To automatically assign an RPC file to be used as a pseudo projection for a specific image, see

“Emulating an RPC Projection” on page 115.

Opening External Files

ENVI User’s Guide

Chapter 2: File Management

75

Opening OrbView-3 Files

Use the following procedures to open OrbView-3 files in GeoTIFF or NITF formats.

Opening GeoTIFF OrbView-3 Files

To read GeoTIFF format OrbView-3 files and extract the georeferencing information:

1. Select File

Open External FileOrbView-3GeoTIFF.

2. When the file selection dialog appears, select the desired input file.

ENVI reads the GeoTIFF image, automatically extracts the necessary header information (including the associated georeferencing information) and places the image in the Available Bands List.

Opening NITF OrbView-3 Files

To read NITF format OrbView-3 files:

1. Select File

Open External FileOrbView-3NITF.

2. When the file selection dialog appears, select the input file.

ENVI automatically extracts the header information, including georeferencing information, and places the image band in the Available Bands List.

Opening OrbView-3 Files with RPC Positioning

Use the following procedure to derive RPC-based geolocation information for individual pixels in an OrbView-3 image. A file containing the image RPCs (Rational

Polynomial Coefficients or Rapid Positioning Coordinates) is required. The geolocations are determined from a pseudo projection, which is derived by ENVI from the provided RPC model. This method does not change the appearance of the image, it simply calculates the correct geolocation for each individual pixel.

Tip

This RPC-based georeferencing method is less computationally and disk space intensive than a full orthorectification process performed on the imagery; however, the full orthorectification process provides greater accuracy.

ENVI User’s Guide

Opening External Files

76

Chapter 2: File Management

To use an RPC pseudo projection to position (georeference) OrbView-3 data:

1. Select File

Open External FileOrbView-3Open with RPC

Positioning.

2. When the file selection dialog appears, select the input file. If an associated

RPC file cannot be found, you are prompted to select a file containing the RPC coefficients.

ENVI automatically extracts the remaining header information and places the image band in the Available Bands List. To automatically assign an RPC file to be used as a pseudo projection for a specific image, see

“Emulating an RPC Projection” on page 115.

Opening IRS Files

Opening IRS-1 Data in FAST Format Files

To read IRS-1 data in FAST format:

1. Select File

Open External FileIRSFAST.

2. When the file selection dialog appears, select the header.dat

file to be read.

The file names must follow the naming convention header.dat

and bandx.dat

, where x

= band number or x

= p for panchromatic. ENVI automatically extracts the header information (including UTM georeferencing information) and enters the image bands into the Available Bands List. ENVI also creates a meta file—a single file containing all of the bands—and lists it in the Available Bands List. ENVI assigns wavelengths to the bands based on the sensor type. For information about meta files,

see “Saving Files as ENVI Meta Files” on page 129.

Opening IRS Super Structured Files

To read IRS Super Structured format:

1. Select File

Open External FileIRSSuper Structured.

2. When the file selection dialog appears, select the leader file (

LEADER

* or b00.led

).

ENVI automatically extracts the header information (including wavelength information) and enters the image bands into the Available Bands List. For multiple band images where each band is stored in a separate file, ENVI will create a meta file—a single file containing all of the bands. For information about meta files, see

“Saving Files as ENVI Meta Files” on page 129.

Opening External Files

ENVI User’s Guide

Chapter 2: File Management

Note

Georeferencing information is not provided in IRS Super Structured format.

77

Opening AVHRR Files

Use the following procedures to read KLM/Level 1b and SHARP format AVHRR data.

Note

ENVI only supports AVHRR Level 1b KLM formatted files that have been produced and are distributed by NOAA.

Opening KLM/Level 1b AVHRR Files

To read KLM/Level 1b AVHRR data:

1. Select File

Open External FileAVHRRKLM/Level 1b.

2. When the file selection dialog appears (see

“Selecting Files in ENVI” on page 32), select the input file.

ENVI reads 10-bit packed format as integer data, uncompressed formats as integer data, and 8-bit format as byte data. The necessary header information is automatically extracted and the bands are placed in the Available Bands List.

Tip

To use the embedded information to georeference the data see

“Georeference

AVHRR Data” in Chapter 10.

Opening ESA SHARP Files

European Space Agency SHARP data contains 5 AVHRR bands plus supplementary information. ENVI reads the five AVHRR data bands and the supplementary information is read as three additional bands. The additional bands are 0-1 raster

(mask) images of the latitude/longitude grid, coastlines, and state boundaries.

ENVI User’s Guide

Opening External Files

78

Chapter 2: File Management

To read European Space Agency format AVHRR data:

1. Select File

Open External FileAVHRRSHARP.

2. When the file selection dialog appears, select the input data file.

The input file must follow the naming convention of dat_xx.xxx

and lea_xx.xxx

.

The AVHRR bands and three supplementary bands appear in the Available Bands

List.

Opening SeaWiFS Files

ENVI reads the following types of SeaWiFS data from CD-ROM or disk: OrbImagedistributed CEOS LAC 1B, LAC 2A, LAC 2B, and SeaWiFS HDF Level 1A and 1B, and NASA/Goddard-distributed SeaWiFS HDF format data.

1. Select File

Open External FileSeaWiFSHDF or CEOS.

2. When the file selection dialog appears, select the image file to be read.

ENVI automatically extracts the header information and enters the image bands into the Available Bands List. To use the imbedded information to georeference the data or to create geometry information, see

“Georeferencing SeaWiFS Data” in Chapter

10.

Opening EOS Files

Use the following procedures to open EOS ASTER or MODIS 1B files.

Opening EOS ASTER Files

ENVI reads the following EOS ASTER files:

• Level 1A

• Level 1B

• The following Level 2 products: 05, 07, 08, and 14 (DEM data).

To read EOS ASTER files:

1. Select File

Open External FileEOSASTER.

2. When the file selection dialog appears, select the input file.

ENVI automatically extracts the header information, including any georeferencing information, and enters the image bands into the Available Bands List.

Opening External Files

ENVI User’s Guide

Chapter 2: File Management

79

Opening EOS MODIS 1B Files

To read EOS MODIS 1B files:

1. Select File

Open External FileEOSMODIS 1B.

2. When the file selection dialog appears, select the input file.

ENVI automatically extracts the header information, including any georeferencing information, and enters the image bands into the Available Bands List.

The gains and offsets are also extracted from the HDF metadata. These values are automatically applied when ENVI converts the 16-bit data in the input file to calibrated floating-point data. The resulting emissive and reflectance data are unitless. The units of the radiance data are Watts/meter

2

/micrometer/steradian.

Note

For EOS MODIS 1B files, values greater than 32767 (which indicate invalid data) are replaced by -999 when applying the gains and offsets. The data ignore value in the ENVI header is also set to -999.

Opening EROS A Files

Use the following procedures to open ImageSat International EROS A level 1A and

1B files.

Opening EROS A level 1A Files

1. Select File

Open External File EROS Level 1A.

2. When the file selection dialog appears, select the .1A file. ENVI automatically extracts the header information and lists the band in the Available Bands list.

Opening EROS A level 1B Files

1. Select File

Open External File EROS Level 1B (GeoTIFF).

2. When the file selection dialog appears, select the .1B file. ENVI automatically extracts the header information, including any georeferencing information, and lists the band in the Available Bands list.

ENVI User’s Guide

Opening External Files

80

Chapter 2: File Management

Opening ENVISAT Files

Use the following procedures to open ENVISAT AATSR, ASAR, or MERIS files.

Opening ENVISAT AATSR Files

To read ENVISAT AATSR level 1B and level 2 files:

1. Select File

Open External File ENVISAT AATSR.

2. When the file selection dialog appears, select the image file. ENVI automatically extracts the header information, including any georeferencing information, and places the image data and any ancillary image bands in the

Available Bands list and groups them into appropriate meta files.

Opening ENVISAT ASAR Files

To read ENVISAT ASAR level 1B files:

1. Select File

Open External File ENVISAT ASAR.

2. When the file selection dialog appears, select the image file. ENVI automatically extracts the header information, including any georeferencing information, and places the image bands in the Available Bands list.

Opening ENVISAT MERIS Files

To read ENVISAT MERIS level 1B and level 2 files:

1. Select File

Open External File ENVISAT MERIS.

2. When the file selection dialog appears, select the image file. ENVI automatically extracts the header information, including any georeferencing information, and places the image data and any ancillary image bands in the

Available Bands list and groups them into appropriate meta files.

Opening External Files

ENVI User’s Guide

Chapter 2: File Management

81

Opening ATSR Files

From the Rutherford Appleton Laboratory (RAL) SADIST-2 processing software for the ATSR-1 and ATSR-2 instruments, ENVI reads the gridded brightness temperature/reflectance (GBT), the gridded browse (GBROWSE), and the gridded sea surface temperature (GSST) data. ENVI automatically opens all the image product contents within the file.

To open ATSR-1 and ATSR-2 files:

1. Select File

Open External FileATSR.

2. When the file selection dialog appears, select the input file.

All the image products within the selected file are opened and appear in the Available

Bands List. For forward view and nadir view images, the band names contain FV or

NV respectively. The band names also supply the image units.

Opening DMSP (NOAA) Files

To read NOAA DMSP (OLS format only) data directly into ENVI:

1. Select File

Open External FileDMSP (NOAA).

2. When the file selection dialog appears, select a file to be read.

ENVI automatically extracts the header information and enters the image bands into the Available Bands List.

Opening Thermal Files

Use the following procedures to open TIMS, AATSR, ASTER and MASTER data.

Opening TIMS Files

To read data from the NASA Thermal Infrared Multispectral Scanner (TIMS) from

CD-ROM or disk:

1. Select File

Open External FileThermalTIMS.

2. Select the TIMS filename and click OK.

The bands appear in the Available Bands List. ENVI assumes the data has 6 bands,

638 pixels, plus a 60 byte offset at the beginning of each line, and is in BIL storage order. Default wavelengths are entered into the header and can be edited if needed.

ENVI User’s Guide

Opening External Files

82

Chapter 2: File Management

Opening ASTER Files

To read ASTER 1A/1B files:

1. Select File

Open External FileThermalASTER 1A/1B or File

Open External File

EOSASTER 1A/1B.

2. When the file selection dialog appears, select the input file.

ENVI automatically extracts the header information, including any georeferencing information, and enters the image bands into the Available Bands List.

Opening ENVISAT AATSR Files

To read ENVISAT AATSR level 1B files:

1. Select File

Open External File Thermal ENVISAT-AATSR

2. When the file selection dialog appears, select the image file. ENVI automatically extracts the header information, including any georeferencing information, and places the image data and any ancillary image bands in the

Available Bands list and groups them into appropriate meta files.

Opening MASTER Files

To read MODIS/ASTER airborne simulator (MASTER) files:

1. Select File

Open External FileThermalMASTER.

2. When the file selection dialog appears, select the input file.

ENVI automatically extracts the necessary header information (including wavelengths) and places the bands in the Available Bands List. ENVI automatically applies the scale factor values to scale the data to radiance units.

Note

To access other HDF files, select File

Open External FileRemote Sensing

Formats

HDF (see

“Opening HDF Files” on page 101).

Opening External Files

ENVI User’s Guide

Chapter 2: File Management

83

Opening Radar Files

Use the following procedures to open radar files, including RADARSAT, ERS, JERS, and TOPSAR files, from CD or disk.

Note

To open SIR-C or AIRSAR files, see

“Using Polarimetric Tools” in Chapter 13.

Opening RADARSAT Files

To read RADARSAT data files into ENVI:

1. Select File

Open External FileRadarRADARSAT or

Radar

Open/Prepare Radar FileRADARSAT.

2. When the file selection dialog appears, select the input data file.

3. Click OK to start the data reading.

ENVI automatically extracts the needed header information (including UTM georeferencing information) from the data file, leader file, and/or trailer file.

The image band is entered into the Available Bands List.

The image band is entered into the Available Bands List.

Opening Integer Format RADARSAT Data

When the RADARSAT File Import dialog appears, select Import Data Type

Unsigned Integer.

The image band is entered into the Available Bands List.

For Byte Scaling

1. When the RADARSAT File Import dialog appears, select Import Data

Type

Scale to Byte.

2. Enter the scaling minimum and maximum data values or keep the default values. The Min and Max values are automatically entered as the 2% points from the histogram in the CEOS header if it is found. If the CEOS header is not available you must enter these values.

3. Click OK to start the data reading.

The image band is entered into the Available Bands List.

ENVI User’s Guide

Opening External Files

84

Chapter 2: File Management

Note

Complex RADARSAT data are read into ENVI as follows: Raw data product - two bands of byte data, one each for the Z and I Stokes parameters; SLC data product two bands of signed integer, one each for the Q and I Stokes parameters.

Opening ERS Files

To read ERS-1 and ERS-2 format data:

1. Select File

Open External FileRadarERS or Radar

Open/Prepare Radar File

ERS.

2. When the file selection dialog appears, select the image file to be read.

ENVI automatically extracts the header information and places the image band in the

Available Bands List.

Opening JERS Files

To read JERS format data:

1. Select File

Open External FileRadarJERS or Radar

Open/Prepare Radar File

JERS.

2. When the file selection dialog appears, select the image file to be read.

ENVI automatically extracts the header information and places the image band in the

Available Bands List.

Opening TOPSAR Files

To read the raw TOPSAR (AIRSAR Integrated Processor Data) format data files

(Cvv, Incidence Angle, Correlation Image, or the DEM):

1. Select File

Open External FileRadarTOPSAR or Radar

Open/Prepare Radar File

TOPSAR.

2. When the file selection dialog appears, select the file to be read.

ENVI automatically extracts the needed header information and places the image band into the Available Bands List.

Note

To read all of the TOPSAR files and automatically convert them to physical units,

see “Converting TOPSAR Data” in Chapter 13. To synthesize AIRSAR images, see

“Synthesizing JPL AIRSAR Data” in Chapter 13.

Opening External Files

ENVI User’s Guide

Chapter 2: File Management

85

Opening ENVISAT ASAR Files

To read ENVISAT ASAR level 1B files:

1. Select File

Open External File Radar ENVISAT-ASAR.

2. When the file selection dialog appears, select the image file. ENVI automatically extracts the header information, including any georeferencing information, and places the image bands in the Available Bands list.

Opening Military Files

Use Military selections to open common military format files, including ADRG,

CADRG, CIB and NITF.

Opening ADRG Files

To open files in the ARC Digitized Raster Graphics format from the Defense

Mapping Agency:

1. Select File

Open External FileMilitaryADRG.

2. When the file selection dialog appears, select the

.img

file.

The header information is read from the

.gen

file, including any georeferencing information, and the image bands are entered into the Available Bands List.

Currently, ENVI does not read the associated legend images and does not support the georeferencing. Also, the scroll window is generated from the ADRG overview image for speed considerations.

Opening CADRG and CIB Files

To open Defense Mapping Agency Compressed ARC Digitized Raster Graphics or

Controlled Image Base (CIB) files:

1. Select File

Open External FileMilitaryCADRG or CIB.

2. When the file selection dialog appears, select the

A.toc

file. A list of the frame files is displayed.

3. To open individual frame files, select File

Open External File

Military

NITF NITF. The Enter NITF Filenames dialog appears.

4. Select the frame file.

ENVI User’s Guide

Opening External Files

86

Chapter 2: File Management

5. Select whether or not to mosaic all the files into a virtual mosaic by selecting

Yes or No next to Mosaic Files.

6. Click OK.

All the files within the selected frame and the virtual mosaic, if selected, appear in the

Available Bands List.

Note

Each frame file may be made up of hundreds of individual files that appear in the

Available Bands List.

Opening NITF Files

ENVI reads uncompressed and vector quantization (VQ) compressed NITF 2.0 and

2.1 image data and automatically creates a virtual mosaic of the base image and the image inserts. NITF symbols and labels, except for CGM symbols, are read into separate ENVI annotation files (see

“Annotating Images” in Chapter 4). NITF text

data is displayed in an ENVI report dialog without any additional formatting.

To read National Imagery Transmission Format data:

1. Select File

Open External FileMilitaryNITF.

2. When the file selection dialog appears, select the input file. If symbols or labels are present, an NITF File Parameters dialog appears.

3. Enter symbol and/or label output annotation filenames and click OK.

ENVI automatically extracts the header information and creates a virtual mosaic of all uncompressed and VQ compressed images in the file (see

“Image Mosaicking” in

Chapter 10). The virtual mosaic bands are entered into the Available Bands List. The

symbol and/or label annotation files can be overlaid on the virtual mosaic image (see

“Creating Virtual Mosaics” in Chapter 10). Any symbol bitmaps are shown as

annotation RGB Image inserts.

Note

The NITF support distributed with ENVI is non-compliant with JITC standards and provides limited functionality. For example, it does not read georeferencing information encoded in the MGRS (military grid reference system) format.

However, the ENVI NITF/NSIF Module (which is a plug-in) provides full JITCcompliant support and is available for purchase. See the ENVI NITF/NSIF Module

Guide, and contact your sales representative or RSI ((303) 786-9900, [email protected]

) for more information.

Opening External Files

ENVI User’s Guide

Chapter 2: File Management

87

Opening Digital Elevation Files

United States Geological Survey Digital Elevation Model (USGS DEM) data, Digital

Terrain Elevation Data (DTED), Spatial Data Transfer Standard (SDTS DEM), and

Shuttle Radar Topography Mission (SRTM DEM) formats can be read directly in

ENVI. Elevations are retained at full precision in the converted files. To georeference

DEMs, use ENVI’s registration function to warp the DEM to a specified projection using the corner coordinates and given pixel size (see

“Image-to-Map Ground

Control Points” in Chapter 10).

Note

You can also use the Open Topographic File menu to read USGS DEM, DTED,

and SDTS DEM data into ENVI (see “Opening Topographic Files” in Chapter 12).

Opening DTED Files

To convert DTED files from CD ROM or disk to mosaicked ENVI image files:

1. Select File

Open External FileDigital ElevationDTED.

2. When the file section dialog appears, select the desired input filename.

The DTED Reader Input Parameters dialog appears. This dialog has the same parameters as the USGS DEM dialog (see the following section).

Opening USGS DEM Files

To convert USGS DEM files from disk to mosaicked ENVI image files (DEMs can also be read directly from tape, see

“Reading Known Tape Formats” on page 142):

1. Select File

Open External FileDigital ElevationUSGS DEM or

File

Open External FileUSGSDEM.

2. When the file selection dialog appears, select an input file.

3. Click OK.

• To convert more than one DEM file, click Input Additional File and select the new file in the file selection dialog.

• To automatically mosaic the DEM files into one image based on their geographic coordinates, click Yes next to Mosaic Files? label.

4. Select output to File or Memory. A new file and standard ENVI header file are created from the information in the embedded header.

ENVI User’s Guide

Opening External Files

88

Chapter 2: File Management

Tip

If mosaicking is not selected and output is to a file, each DEM is converted to its own image. In this case, enter a filename without an extension. The output file for each separate image is automatically assigned a numerical extension

(e.g., _1 for the first file, _2 for the second file, etc.).

5. Click OK to start the conversion.

A status window appears indicating the processing status. When completed, the band(s) from the converted file appear in the Available Bands List (see

“The

Available Bands List” in Chapter 3), where they are available for standard display and

analysis using ENVI functions.

Opening USGS SDTS DEM Files

ENVI reads USGS Digital Elevation Models (DEMs) in Spatial Data Transfer

Standard (SDTS) format. The projection information is read automatically.

1. Select File

Open External FileDigital ElevationUSGS SDTS

DEM or File

Open External FileUSGSSDTS DEM.

2. When the file selection dialog appears, select the catalog directory (typically the xxxxCATD.DDF

file).

3. When the USGS SDTS DEM Input Parameters dialog appears, select from the options below:

• To convert more than one DEM file, click Input Additional File and select the new file using the file selection dialog.

• To automatically mosaic the DEM files into one image based on their geographic coordinates, click Yes next to Mosaic Files? label.

4. Select output to File or Memory.

• If you select output to File, a new file and standard ENVI header file is created from the information in the embedded header.

Tip

If mosaicking is not selected and output is to a file, each DEM is converted to its own image. In this case, you should enter a filename without an extension.

The output file for each separate image is automatically assigned a numerical extension (e.g., _1 for the first file, _2 for the second file, etc.).

5. Click OK to start the conversion.

Opening External Files

ENVI User’s Guide

Chapter 2: File Management

89

A status window appears, indicating the processing status. When completed, the band(s) from the converted file appear in the Available Bands List.

Opening SRTM DEM Files

To convert SRTM DEM (

.hgt

) files from CD ROM or disk to mosaicked ENVI image files:

1. Select File

Open External FileDigital ElevationSRTM DEM.

2. When the file section dialog appears, select the desired input filename. If the file contains missing data points, you will be prompted to correct the missing values. If you click Yes, the -32768 values (which indicate missing data) are replaced by values interpolated from valid neighboring pixels.

ENVI then extracts the information and lists it in the Available Bands List.

Opening USGS Files

Use the USGS selections to read DRG, DOQ, DEM, and SDTS DEM format files.

Opening DRG (USGS) Files

To open USGS Digital Raster Graphic files:

1. Select File

Open External FileUSGS DRG.

2. When the file selection dialog appears, select the file to be read.

ENVI automatically extracts the header information (including UTM georeferencing information) and enters the image bands into the Available Bands List.

Opening DOQ (USGS) Files

To read USGS Digital Orthophoto Quadrangle data:

1. Select File

Open External FileUSGS DOQ.

2. When the file selection dialog appears, select a file to be read.

ENVI automatically extracts the header information (including UTM georeferencing information) and enters the image bands (grayscale or RGB) into the Available Bands

List.

Opening DEM or SDTS DEM

For detailed instructions, see

“Opening Digital Elevation Files” on page 87.

ENVI User’s Guide

Opening External Files

90

Chapter 2: File Management

Opening LAS Format LIDAR Files

ENVI allows you to read and convert LAS format LIDAR data with the

.las

extension into ENVI raster or ENVI vector (

.evf

) files.

Viewing the LAS LIDAR File Header

The header associated with the LAS LIDAR file is accessible as a viewable text file.

• Select File

Open External File LAS LIDAR View LAS Header.

The header file dialog is non-editable, but can be saved as a text file which can be printed if desired. If the LAS LIDAR file has geospatial data associated with the file, the information appears below the Projection Information heading in the LAS header.

Converting LAS LIDAR Data

LAS LIDAR files are converted to ENVI compatible files as follows.

1. Select File

Open External File LAS LIDAR Convert LAS Data.

An Enter LAS Filenames dialog opens.

2. Navigate to the file with the

.las

extension, highlight it, and click Open.

The Output LAS Point Data dialog opens.

The Output LAS Point Data dialog has the following elements to be set for the data conversion.

Output Format — Choose either ENVI Raster File to convert the

.las

data to raster format; or ENVI Vector File to convert to a point vector format

(

.evf

).

ENVI Raster File (default) — Selecting this model rasterizes the LAS data, creating output in a standard ENVI image file where the pixel values correspond to surface height or intensity. The converted data format results in an ENVI format file.

ENVI Vector File — Selecting this model for the output creates an ENVI vector file (

.evf

) in which each vector point record corresponds to an

(X, Y) pair of the LIDAR data with the elevation, intensity, and return number stored as corresponding attributes.

Opening External Files

ENVI User’s Guide

Chapter 2: File Management

91

Note

If you select the ENVI Vector File format for your output, each point will be converted to a vector item and the options for model type, output images, interpolation, pixel size, and output data type are desensitized.

Model Type — This setting is required if the ENVI Raster File has been selected for the output format. There are three model types: Last Return, Full

Feature, and First Return.

Last Return (default) — Also known as the bare Earth model, the last return corresponds to a pulse return from the last (lowest) surface to return a pulse. This can include solid materials, such as bare Earth, that are under semi-transparent vegetation.

Note

In the Last Return model, solid objects such as buildings that do not have any transparency are also returned.

Full Feature — This model returns an average value of all the returns at a given (X, Y) location.

First Return — Also known as the first pulse return, this model corresponds to a pulse return from the first (highest) surface. This model can include returns from the top of any semi-solid object, such as vegetation.

Output Images — This drop-down button allows you to select the elevation data, the intensity data, or both to be saved to an ENVI format file. If your

Output Format is ENVI Vector File, then both elevation and intensity are saved as attributes to the vector file.

Elevation and Intensity (default) — The output file contains a Digital

Elevation Model (DEM) of the surface height, and an intensity image.

Elevation — The output file contains only the DEM of the return height.

Intensity — The output file contains only the intensity image.

Select Output Image Projection — (These settings are only available if the

LAS file has associated geospatial information.) This determines the data projection saved in the DEM or vector file. The default settings shown are the projection information of the input LAS data file.

In the list of projection types, click on the name of a projection to select it.

ENVI User’s Guide

Opening External Files

92

Chapter 2: File Management

• To build a customized map projection, click New and follow the instructions under

“Building Customized Map Projections” in Chapter 10 of the ENVI User’s Guide manual.

Different parameters are available depending on the selected projection type.

• Enter or select the corresponding secondary parameters for the selected projection type; if you select Arbitrary, select either Pixel Based or Map

Based by clicking on the arrow toggle button.

Pixel-based uses the upper left corner as the origin and map-based uses the lower left corner as the origin. Either selection only affects the Y coordinates.

• To change the datum for a projection type, click the Datum button and select a datum from the list in the Select Geographic Datum dialog.

• If you select UTM, click the N or S toggle button to indicate if the selected latitude is north (N) or south (S) of the equator. Enter a zone, or click the

Set Zone button and enter the latitude and longitude values to automatically calculate the zone.

• If you select a State Plane... projection, enter the zone or click the Set

Zone button and select the zone name from the list.

Both NOS and USGS zone numbers are shown next to the zone name.

• To designate the units for a projection type, click the Units button and select a unit type from the pop-up dialog.

Note

Be sure the values in the Output X Pixel Size and Output Y Pixel Size fields use the specified Units.

Interpolation — This setting is required if the ENVI Raster File has been selected for the output format. This option determines if Linear or Quintic interpolation is used to create a regular grid of interpolated Z values.

Linear Interpolation (default) — A regular grid of linear interpolated Z values.

Quintic Interpolation — A smooth interpolation performed using quintic polynomials.

Extrapolate Edges — This setting is required if the ENVI Raster File has been selected for the output format. Click the arrow toggle button to Yes to

Opening External Files

ENVI User’s Guide

Chapter 2: File Management

93 extrapolate the boundary node indices within the geographic bounding box defining the data set. The default is No.

Background Value — The Z value assigned to pixels outside of the calculated triangles. This setting is required if the ENVI Raster File has been selected for the output format. The default is 0.0000.

Output X Pixel Size and Output Y Pixel Size — Enter the size of a pixel in the data in the specified projection units. This setting is required if the ENVI

Raster File has been selected for the output format. The default values are set to 5.0.

If projection information exists for the data file, then the units are the same as the units of the chosen projection. If no projection information exists, then the units are the same as the stored units of the data (unknown, meters, feet, etc.).

Output Data Type — Choose from nine ENVI data types: Byte, Integer,

Unsigned Int, Long Integer, Unsigned Long, Floating Point, Double

Precision, 64-bit Integer, Unsigned 64-bit. This setting is required if the

ENVI Raster File has been selected for the output format. The default data type is Integer.

Note

Select Floating Point, or Double Precision for highest data fidelity.

Output Result to — Select either File or Memory.

File (default) — When this option is chosen, the output is stored in a file and can be recalled in subsequent ENVI sessions. You must specify a filename for the saved output.

Memory — When you choose this option, the output image or vector layer is saved in your computer system memory. The image or vector layer can be displayed during the current ENVI session, but will be deleted from memory when you close the ENVI session.

ENVI User’s Guide

Opening External Files

94

Chapter 2: File Management

Opening Image Processing Files

ENVI reads files stored in ArcView, ERDAS, ER Mapper, and PCI image processing formats. ENVI automatically reads the needed header information and enters the bands into the Available Bands List.

Opening ArcView Raster (.bil) Files

ENVI reads ArcView raster format files that have the

.bil

file extension and an associated header file with the extension

.hdr

.

1. Select File

Open External FileIP SoftwareArcView Raster (.bil).

2. When the file selection dialog appears, select the file to be read.

ENVI automatically extracts the header information, including the UTM and State

Plane projection georeferencing information, and enters the image bands into the

Available Bands List.

Note

A free plug-in to ArcGIS is available on the Research Systems download web site, www.rsinc.com/download/

. This plug-in allows ArcGIS software to directly read the ENVI Raster format files.

Opening External Files

ENVI User’s Guide

Chapter 2: File Management

95

Opening ERDAS 7.5 (.lan) Files

To open files stored in the ERDAS 7.5 file format:

1. Select File

Open External FileIP SoftwareERDAS 7.5 (.lan).

2. When the file selection dialog appears, select an input file to be read.

ENVI automatically extracts the header information and enters the image bands into the Available Bands List. ENVI will read the UTM georeferencing information from the associated ERDAS 7.5

.pro

file.

Opening ERDAS 8.x (.img) Files

To open files stored in ERDAS 8.x Imagine file format:

1. Select File

Open External FileIP SoftwareERDAS 8.x (.img).

2. When the file selection dialog appears, select an input file to be read.

ENVI automatically extracts the required header information, including any georeferencing and datum information, and enters the image bands into the Available

Bands List. However, ENVI does not support compressed ERDAS 8.x (

.img

) files.

ENVI also supports ERDAS

.img one band classification files. The class name and color lookup tables for this band are parsed from the file’s header.

Note

Because ERDAS’ tiling scheme is not optimized for ENVI, loading of large

ERDAS files is extremely slow. We recommend converting to a standard flat file in

ERDAS prior to use with ENVI.

Opening ER Mapper Files

To open files stored in the raster ER Mapper file format:

1. Select File

Open External FileIP SoftwareER Mapper.

2. When the file selection dialog appears, select the data header file (

.ers

) to be read.

ENVI automatically extracts the required header information, including UTM georeferencing information (unrotated), and places the image bands in the Available

Bands List.

ENVI User’s Guide

Opening External Files

96

Chapter 2: File Management

Note

ENVI reads ER Mapper unsigned integer data, but does not read signed 8-bit or ER

Mapper algorithm files.

Opening ECW Files

To open files stored in the ECW (Enhanced Compressed Wavelet) format:

1. Select File

Open External FileIP SoftwareECW.

2. When the file selection dialog appears, select the ECW file.

ENVI extracts the information, including any georeferencing, and lists the image in the Available Bands List.

Opening PCI (.pix) Files

To open files stored in the PCI database file format:

1. Select File

Open External FileIP SoftwarePCI (.pix).

2. When the file selection dialog appears, select a file to be read.

ENVI automatically extracts the header information, including any georeferencing information, and places the image bands in the Available Bands List.

Note

You cannot use this option to directly read PCI files that contain multiple data types or that are in file interleave format.

Opening and Writing ESRI GRID Data

Reading and writing ESRI GRID data format is supported on Windows platforms only.

Warning

Verify that you have a licensed version of ESRI ArcView or ArcGIS 8.x installed on your system. If you have ArcView or ArcGIS 8.x installed but not licensed, do not attempt to read or write ESRI GRID datasets with ENVI. Doing so may cause

ENVI to exit immediately.

Note

The ability to read and write GRID datasets is only available in a licensed version of

ENVI. You cannot access GRID datasets while ENVI is in demonstration mode.

Opening External Files

ENVI User’s Guide

Chapter 2: File Management

97

Opening ESRI GRID Files in ENVI

To read GRID datasets into ENVI, perform the following steps.

1. From the ENVI main menu, select File

Open External FileIP

Software

ESRI GRID. The Select Grid to Open dialog appears.

2. Use the Select Grid to Open dialog to navigate to the directory containing the

GRID (single band data) or GRID Stack 7.x (multiband data) data set you want to open in ENVI. Highlight the GRID or GRID Stack, and then click the Open button. The data appears in the ENVI Available Bands List with the associated map information.

Note

An ESRI GRID or ESRI GRID Stack is stored in a directory, not a file. When a GRID directory is opened in ENVI, it is opened as single band data. When a GRID Stack directory is opened, it appears in the Available Bands List as an image with multiple bands.

3. To view the data, simply highlight the data in the Available Bands List, select

Grayscale or RGB and load it into an ENVI display.

Writing an ESRI GRID File From ENVI

You can save your image files in the ESRI GRID raster format from either the ENVI main menu or the Display menu bar in the Main Image window.

Note

You can only save imagery to the GRID format if that imagery contains 49 or fewer bands and each band contains only square pixels. Datasets with non-square pixels or more than 49 bands are not allowed in the GRID format.

To save an image to a GRID, perform the following steps.

1. Select File

Save File AsESRI GRID from the ENVI main menu. The

Output to ESRI GRID Input Filename dialog appears.

2. Use the Output to ESRI GRID Input Filename dialog to select the image file you want to save to a GRID, then click OK. The Export to Grid dialog appears.

3. In the Export to GRID dialog, navigate to the directory under which the GRID will be saved. Select an existing GRID, or type in the name of a new GRID, and click the Open button to save the data to the specified GRID.

ENVI User’s Guide

Opening External Files

98

Chapter 2: File Management

To save the contents of an ENVI display to a GRID, perform the following steps.

1. Select File

Save Image AsImage File… from the Display menu bar.

The Output Display to Image File dialog appears.

2. Use the Output File Type drop-down button to select the ESRI GRID option.

Note

When the ESRI GRID option is chosen, the three letter extension on the default filename is removed because the ENVI image file is saved as a GRID

(as a directory, not a single file).

3. Verify that the path name conforms to ESRI requirements before proceeding.

ESRI grid names must have the following features:

• The first character must be alphabetic (a-z and A-Z).

• The grid name may not contain more than 13 characters.

• Valid characters are alphabetic or numeric (0-9).

4. When you are satisfied with your selections, click OK to save the file as a

GRID.

Opening Generic Image Format Files

ENVI reads generic image format data including ASCII, BMP, HDF, JPEG,

JPEG2000, MrSID, PDS, PICT, PNG, SRF, TIFF/GeoTIFF, and XWD. The files, with the exception of TIFF and BMP files, are converted to ENVI format files. TIFF and BMP files are kept in their native formats. See

“Opening TIFF Files” on page 100

and

“Opening ASCII Files as Image Files” on page 100 for detailed instructions. If

the envi.cfg

option Open applicable formats automatically to memory is set, generic image format files will be automatically placed in memory.

Note

Converting generic image files to ENVI format is limited to images that fit entirely into system memory with the exception of TIFF, HDF, and BMP format images.

Opening External Files

ENVI User’s Guide

Chapter 2: File Management

99

Opening Standard Format Image Files

To open files stored in standard image file formats, including BMP, JPEG,

JPEG2000, PICT, PNG, SRF, and XWD:

1. Select File

Open External FileGeneric Formatsthe file type to be

read.

2. When the standard ENVI file selection dialog appears, select a file to be converted to RGB format. Files can be converted and read into memory or output to a disk file.

Note

If the Open applicable formats automatically to memory parameter in the envi.cfg

file is set to No, the External File Conversion dialog appears. For information about the envi.cfg

file, see

“The ENVI Configuration File” in

Appendix A.

3. If the External File Conversion dialog appears, select output to File or

Memory and click OK. If you select output to File, a new file and standard

ENVI header file are created from the information in the embedded header.

Note

If you open a JPEG file that was created from a georeferenced image, the file may have a .

jgw

file associated with it. If a .

jgw

file is present, ENVI reads the map information from it.

The band(s) from the converted file are listed in the Available Bands List.

Opening MrSID Files

The MrSID (Multi-Resolution Seamless Image Database) format is a wavelet compressed, multi-resolution raster image format. MrSID images may be viewed without ever being fully decompressed. The memory requirements and time delays associated with opening a full image into memory are thus avoided, and an image, regardless of size, may be viewed quickly. To open MrSID compressed format singleband or three-band files:

Note

Opening MrSID files is only available on Windows platforms.

1. From the ENVI main menu, select File

Open External FileGeneric

Formats

MrSID, or select FileOpen Image File.

ENVI User’s Guide

Opening External Files

100

Chapter 2: File Management

2. When the standard ENVI file selections dialog appears, select the MrSID compressed file to be read.

ENVI automatically extracts the needed header information, including any georeferencing information, and places the image bands in the Available Bands List.

Opening ASCII Files as Image Files

Use Generic Formats to open an ASCII file as an image. Each ASCII value is read as a pixel DN value. The ASCII values must be separated by white spaces or commas.

Lines at the top of the file that have non-numeric characters or that start with a semicolon are skipped. The image data in the file must be in the format of an image array. The number of samples is determined by the number of values in a line, and the number of lines is determined by the number of lines in the file.

1. Select File

Open External FileGeneric FormatsASCII.

2. When the standard file selection dialog appears, select an ASCII file to input.

The number of samples and lines (columns and rows) are automatically determined.

3. When the Input ASCII File dialog appears, select BSQ, BIL, or BIP from the

Interleave button menu.

4. From the Data Type button menu, select the correct data type.

5. Enter or select the number of input bands by using the arrow buttons next to the Number of Bands label or by typing a number into the box.

6. Click OK.

The bands are read into memory and entered into the Available Bands List.

Opening TIFF Files

ENVI supports the following TIFF files: TIFF world files (.

tfw

), GeoTIFF, 1-bit, 4bit, 8-bit, 16-bit signed and unsigned integer, 24-bit, 32-bit signed and unsigned long integer, and 32-bit floating point.

Note

ENVI does not support LZW-compressed TIFF files.

1. Select File

Open External FileGeneric FormatsTIFF/GeoTIFF.

Opening External Files

ENVI User’s Guide

Chapter 2: File Management

101

2. When the standard file selection dialog appears, select a TIFF file to input. If you have a .

tfw

associated with your TIFF file, follow these additional steps.

A. When the TIFF World File Input Projection dialog appears, select the desired input projection and enter the zone number, if needed (see

“Selecting Map Projection Types” in Chapter 10).

B. Click OK.

Note

If you have a GeoTIFF file and a TIFF world file, all projection information will be read directly from the GeoTIFF file.

The bands are placed in the Available Bands List.

Opening HDF Files

Supported HDF files include raster format, images stored in three-dimensional scientific data format and plots stored in one-dimensional scientific data format. The

HDF plot files are read directly into an ENVI plot window.

To read HDF format data:

1. Select File

Open External FileGeneric FormatsHDF.

2. When the file selection dialog appears, select the input file.

3. When the HDF Dataset Selection dialog appears, select the files to read by clicking in the text boxes next to their names and clicking OK.

Note

If a three-dimensional data file is selected, the Data Set Storage Order dialog appears. Select the HDF data storage order by clicking on BSQ (band sequential), BIL (band interleaved by line) or BIP (band interleaved by pixel).

All the one-dimensional HDF files selected are read directly into an ENVI plot window. The two-dimensional and three-dimensional files are read and placed in the

Available Bands List.

ENVI User’s Guide

Opening External Files

102

Chapter 2: File Management

Opening PDS Image Files

ENVI reads uncompressed PDS format only and does not support VAX floating point

(complex, double, or real) data. To read uncompressed Planetary Data System format files with attached and detached PDS data product labels:

1. Select File

Open External FileGeneric FormatsPDS.

2. When the file selection dialog appears, select the desired

.img

input file.

ENVI automatically extracts the needed header information and enters the image bands into the Available Bands List.

Opening External Files

ENVI User’s Guide

Chapter 2: File Management

Opening Previous Files

103

Use Open Previous File to view and select from a list of the last 20 files that were opened in ENVI. Selecting a file opens it. When a new file is opened, it is added to the top of the list. When more than 20 files have been opened, the file at the bottom of the list is removed.

Tip

If a file is sticky, it remains at (sticks to) the top of the previous files list. See

“Setting ENVI Preferences” on page 174 for instructions on making a file sticky.

The file names under the Open Previous File menu item are stored in a user-selected

ASCII file (see

“Setting ENVI Preferences” on page 174). The format of this file is

described in

“ENVI Previous Files List” in Appendix B.

To open a file from the previous files list, select File

Open Previous File and click on the desired file name.

The filename appears in the Available Bands List.

ENVI User’s Guide

Opening Previous Files

104

Editing ENVI Headers

Chapter 2: File Management

ENVI stores information about files in a separate text header file with the same name as the image file, but with the file extension

.hdr

. Use the Edit ENVI Header function to change the header information. Each time a data file is opened, ENVI searches for the header file and uses the information to open the file.

1. Select File

Edit ENVI Header.

The Edit Header Input File dialog appears.

Tip

You can also open the header by right-clicking the filename in the Available

Bands List.

2. Click on the desired filename. The file details are displayed in the text box labeled File Information.

3. Click OK. The Header Info: dialog appears. Use the Header Info: dialog to edit general image parameters, band names, wavelengths, and map information; or to associate a DEM with an image. Refer to the procedures in the following sections for specific editing instructions.

4. After editing the header, click OK.

Note

If you edit the header of a file that is currently open, ENVI closes that file and re-opens it when you click OK. Because the displays using that file close when the file closes, you must restart those displays from the Available

Bands List.

Editing ENVI Headers

ENVI User’s Guide

Chapter 2: File Management

105

Modifying General Image Parameters

Use the Header Info: dialog to edit general image parameters. Each field is explained in this section.

Figure 2-4: Header Info: Dialog

Note

Use caution when editing the general image parameters for files not in the ENVI file format. For example, changing the data type of an image in an HDF file will not effect the data type of the displayed or returned data. The HDF format will override any setting by the user. To change the data type of an HDF image, first save the data to an ENVI file and then change the data type. This is also true for many external file formatted files opened in ENVI.

To save an image file as and ENVI format file, see

“Saving Files as Standard ENVI

Files” on page 127.

ENVI User’s Guide

Editing ENVI Headers

106

Chapter 2: File Management

• The Samples field displays the number of samples in the file.

• The Lines field displays the number of lines in the file.

• The Bands field displays the number of bands stored in the file.

• The Offset field displays the offset in bytes from the start of the file to where the actual data begins. (The Offset is sometimes known as the embedded header.)

• The xstart and ystart fields define the image coordinates for the upper lefthand pixel in the image. Images that are spatial subsets of larger images will often use an image coordinate system that references the parent (or larger) image so that the two can be linked and dynamically overlaid. The default values are (1,1) so that the upper left hand pixel has an image coordinate of

(1,1).

Note

Changing the value of xstart or ystart does not affect the way ENVI reads the image data from the file.

• Use the Data Type pull-down menu to select the appropriate data type (byte, integer, unsigned integer, long integer, unsigned long integer, floating point, double precision, 64-bit integer and unsigned 64-bit integer, complex, or double complex).

• Use the Byte Order pull-down menu to select the byte order of the data. This parameter varies by platform:

• For DEC machines and PCs, select Host (Intel), for the host least significant first byte order.

• For all other platforms, select Network (IEEE), for the network most significant first byte order.

• Use the Interleave menu to select the data storage order from these choices:

BSQ — band sequential

BIL — band interleaved by line

BIP — band interleaved by pixel

• Use the text field at the bottom of the Header Info: dialog to insert string text that describes the data file.

Editing ENVI Headers

ENVI User’s Guide

Chapter 2: File Management

107

Selecting File Types

ENVI uses the File Type header field to automatically identify certain types of data files. In the Header Info: dialog, use the File Type field to identify the native file type of the file that the ENVI header belongs to. The file will have an ENVI Header, but will still exist in its native format. The ENVI header file can be used to add ancillary information (i.e., wavelengths) that is used in ENVI.

From the File Type button menu, select a file type.

Tip

For a complete list of all file types recognized by ENVI, see the filetype.txt

file that comes in the menu directory of each ENVI release. You may edit this file and add new user-defined file types (see Chapter 7, “Custom File Input” in the

ENVI Programmer’s Guide).

The file types include ENVI-specific file types such as meta files, classification files, virtual mosaics, spectral libraries, and FFT results. The file types also encompass data-specific formats such as NLAPS, RadarSat, Spot, etc. TIFF, BMP, ERDAS 8.x and PCI files are also recognized.

Inputting Header Information from Other Files

In the Header Info: dialog, use the Input Header Info From pull-down menu to incorporate the header information of another open file into the header of the current file.

1. Select Input Header Info From

Other File.

2. Select the file containing the header information and click OK.

Editing Ancillary Header Information

ENVI headers may have associated ancillary information (Band Names, Spectral

Library Names, Wavelengths, Bad Bands List, FWHM) depending on the image data type.

In the Header Info: dialog, use the Edit Attributes pull-down menu to edit ancillary header information such as band names and wavelengths, to edit map, classification,

Z-plot and stretching information, and to determine what images to display for complex data types.

ENVI User’s Guide

Editing ENVI Headers

108

Chapter 2: File Management

Selecting Bad Bands

Use the Bad Bands List to select bands to be excluded from plotting or optionally omitted during processing. The Bad Bands list is often used to omit the water vapor bands in hyperspectral data sets.

1. In the Header Info: dialog, select Edit Attributes

Bad Bands List.

2. In the Edit Bad Bands List values dialog, all bands in the list are highlighted by default as good. Deselect any desired bands in order to designate them as bad bands.

• To designate a range of bands, enter the beginning and ending band numbers in the text boxes next to the Add Range button. Click Add

Range.

3. Click OK.

Figure 2-5: Edit Bad Bands List Values and Edit Band Name Values Dialogs

Editing Band Names or Spectral Library Names

1. Select Edit Attributes

Band Names, or Spectral Library Names.

2. Click on the name to change in the list. The value appears in the text box under the Edit Selected Item label.

3. In the text box, type the new name and press the Enter or Return key.

4. Click OK.

Editing ENVI Headers

ENVI User’s Guide

Chapter 2: File Management

109

Editing Wavelengths and FWHM

1. Select Edit Attributes

Wavelengths or FWHM.

2. Click on the value to change in the list. The value appears in the text box under the Edit Selected Item label.

3. In the text box, type the new value and press the Enter or Return key.

4. Click the Wavelength/FWHM Units: pull-down menu button to select the units to use with your wavelength and FWHM values.

Note

The wavelength units are used to scale correctly between different wavelength units in ENVI’s Endmember Collection dialog. For more information, see

“Collecting Endmember Spectra” in Chapter 6.

5. Click OK.

Importing Header Data from ASCII Files

1. In any Edit Values dialog, click Import ASCII.

2. When the standard ENVI File Selection dialog appears, open the ASCII file.

The Input ASCII File dialog appears with first few values from the ASCII file listed.

Note

The number of rows of the ASCII file must match the number of bands in the image file. The ASCII file may have one or more columns of ASCII data, while the file used to import band names can only contain strings.

3. In the Wavelength Column text box, enter the number of the ASCII column that contains the wavelengths.

Note

To scale the wavelength values on-the-fly, enter a multiplicative scale factor in the Multiply Factor text box. For example, to multiply the imported wavelength values by 100, enter 100.

4. In the FWHM Column text box, enter the number of the ASCII column that contains the band width information (used in spectral resampling).

ENVI User’s Guide

Editing ENVI Headers

110

Chapter 2: File Management

Note

The ASCII file can also contain a Bad Bands List column. The Bad Bands

List column specifies a good band with a 1 and bad band with a 0.

5. Enter the number of the ASCII column that contains the Bad Bands List.

6. Click OK.

7. Click OK in the Header Info: dialog to write all of the changes to the header file.

Figure 2-6: Input ASCII File Dialog

Setting Default Bands to Load

Use Default Bands to Load to identify bands that will be automatically loaded into the a new display group when the file is opened. Either a grayscale image or a color image can be selected.

1. From the Header Info: dialog, select Edit Attributes

Default Bands to

Load. The Default Bands to Load dialog appears with a list of all the bands in the file.

Editing ENVI Headers

ENVI User’s Guide

Chapter 2: File Management

111

2. Click on the bands names to load in the red (R), green (G), and blue (B) guns.

• If only one band is selected, it will be loaded as a grayscale image.

• Click Reset to clear the bands.

3. Click OK to return to the Header Info: window.

When the file is opened, the bands will automatically be loaded into a new display group.

Entering Gains and Offsets

Use Gains and Offsets to enter values that will be used as default values in the Basic

Tools

PreprocessingGeneral Purpose UtilitiesApply Gain and Offset function. For more information, see

“Applying Gain and Offset” in Chapter 5.

1. From the Header Info: dialog, select Edit Attributes

Gains or Offsets.

2. Click on the value to change in the list. The value appears in the text box under the Edit Selected Item label.

3. In the text box, type the new value and press Enter or Return.

4. Click OK.

Entering Map Information for Georeferenced Files

Map information is associated with georeferenced files. In ENVI, the term georeferenced refers to images that have been geometrically corrected (i.e., rectified) such that they conform to a known projection. To establish the georeferenced data coordinate system, you must know the sample and line coordinates of one pixel (the reference pixel), the pixel size, the map projection, and map coordinates of this pixel.

Note

In ENVI, pixel values always refer to the upper left corner of the pixel. Map coordinates also typically refer to the upper left corner of the pixel. However, if you want the map coordinate to reference the middle of the pixel, add 0.5 to the image coordinate of the reference pixel specified in the Map Info field of the header (e.g., x = 1.5, y = 1.5 would make the map coordinates refer to the center of the pixel).

1. From the Header Info: dialog, select Edit Attributes

Map Info.

2. In the Map Information dialog, enter the reference pixel coordinates in the

Image Coord X and Y text boxes and the pixel size in the Pixel Size X and Y text boxes. Be sure to enter the pixel size in the units appropriate for your selected projection.

ENVI User’s Guide

Editing ENVI Headers

112

Chapter 2: File Management

Note

If north is not up in the image, enter a rotation angle in degrees in the Map

Rotation text box. Measure the angle in a clockwise direction where zero degrees is straight up (see

“Overlaying Grid Lines” in Chapter 4).

3. Select the map projection by clicking on Change Projection and selecting the appropriate projection from the list of projections (see

“Selecting Map

Projection Types” in Chapter 10).

Figure 2-7: Map Information Dialog

4. Enter the coordinates of the reference pixel in the appropriate text boxes.

Note

The corresponding latitude and longitude will be automatically calculated and can be viewed by clicking on the arrow toggle button to Geographic

Coordinates.

5. Click OK to return to the Header Info: window.

Editing ENVI Headers

ENVI User’s Guide

Chapter 2: File Management

113

Associating a DEM to a File

You can associate a DEM (Digital Elevation Model) with an image via the ENVI header file. This allows you to retain the association between the two files in a persistent manner. You can also break the association by editing the ENVI header file to remove the reference to the DEM file.

To associate a DEM with an image, perform the following steps.

Note

When a DEM band is chosen, no checks are performed to assure the DEM is complimentary to the image; that is, no check is made to verify they are georeferenced and cover the same area.

1. In the main ENVI menu bar, select File

Edit ENVI Header.

2. Select the image file whose header you wish to edit.

3. In the Header Info: dialog, click the Edit Attributes

Associate DEM

File… option.

4. If an association already exists, the Associate DEM with File dialog opens

(

Figure 2-8 ). Select either Edit existing DEM file association, or Clear

existing DEM file association.

• If you choose Edit existing DEM file association, a Select DEM Band to

Associate With This File dialog opens. The existing associated band is highlighted by default. Edit the DEM file association by selecting another band to associate. Click OK.

• If you choose Clear existing DEM file association, the Associate DEM with File dialog closes, the association no longer exists, and you are returned to the Header Info: dialog.

ENVI User’s Guide

Figure 2-8: New Associate DEM with File Dialog

Editing ENVI Headers

114

Chapter 2: File Management

If the association of a DEM with this image is new, a file selection dialog appears. (Spectral or spatial subsets are not allowed in this dialog.) Select a band to be the associated DEM. Click OK.

When a DEM association is selected, two fields ( Table 2-1 ) are written to the

ENVI header file.

Field Description

dem file = /path/file Path and Filename of selected DEM file dem band = 2 Index (starting at 1) of selected DEM band

The dem band

will not be written if the DEM file contains a single band, or if the first band of an image was chosen. In these cases, the dem band

value defaults to 0.

Note - Neither field will be written if an in-memory band is selected as the associated DEM band. In this case, the DEM association exists for the current ENVI session only; it does not persist for subsequent sessions.

Table 2-1: Associated DEM Header Fields

Whenever an image which has an associated DEM is opened, the DEM will also be opened in the Available Bands List.

The DEM is not displayed in the Available Bands List if the associated DEM file is not found by ENVI. When this happens, an error message is returned and the base image is still opened in the Available Bands List, but the DEM is not.

This DEM association also affects the following functionality in ENVI.

• Cursor Location/Value Tool — The DEM value for a given pixel is displayed next to the data value for areas where the DEM and the image share common geographic coordinates; for example, “Data:11 (DEM=1280)”. The DEM value is not shown if either the image or the DEM are not georeferenced.

• 3D SurfaceView — The associated DEM file is used as the default and you are not prompted to select a DEM for the surface.

• RPC Projection Emulation — If an image is displayed using RPC projection emulation and it has an associated DEM, the DEM is used to refine the RPC solution. This increases the positional accuracy of the RPC solution.

Editing ENVI Headers

ENVI User’s Guide

Chapter 2: File Management

115

Note

For this functionality, the DEM must contain map information covering the area for the RPC image; otherwise, the default elevation is used.

• RPC Orthorectification — If an image being orthorectified has an associated

DEM file, then it is used by default as the elevation input to the orthorectification process. You can change this default designation at any time, if desired.

Emulating an RPC Projection

If your file has an associated RPC file, use this method to automatically use the RPC file to derive RPC-based geolocation information for individual pixels in an image. A file containing the image RPCs is required. The geolocations are determined from a pseudo projection, which is emulated from the provided RPC model. This method does not change the appearance of the image, it simply calculates the correct geolocation for each individual pixel.

Note

This RPC-based georeferencing method is less computationally and disk space intensive than a full orthorectification process performed on the imagery; however, the full orthorectification process provides greater accuracy.

To establish a pseudo projection emulated from a file containing RPCs, perform the following steps:

1. From the Header Info: dialog, select Edit Attributes

RPC Projection

Emulation. If an associated RPC file cannot be found, a warning dialog appears prompting you to select a file containing the RPC coefficients. The

RPC Parameters dialog opens when a file containing RPCs is determined.

2. In the RPC Parameters dialog, toggle the arrow button to set RPC Projection

Emulation Enabled to either

On

(enabled projection) or

Off

(use the native map information, if any).

3. If needed, use the Select Projection section of the RPC Parameters dialog to modify the projection used to report the resulting geolocation information.

• To build a customized map projection, click New and follow the instructions under

“Building Customized Map Projections” in Chapter 10 of the ENVI User’s Guide manual.

Different parameters are available depending on the selected projection type.

ENVI User’s Guide

Editing ENVI Headers

116

Chapter 2: File Management

• To change the datum for a projection type, click the Datum button and select a datum from the list in the Select Geographic Datum dialog.

• If you select UTM, click the N or S toggle button to indicate if the selected latitude is north (N) or south (S) of the equator. Enter a zone, or click the

Set Zone button and enter the latitude and longitude values to automatically calculate the zone.

• If you select a State Plane... projection, enter the zone or click the Set

Zone button and select the zone name from the list.

Both NOS and USGS zone numbers are shown next to the zone name.

• To designate the units for a projection type, click the Units button and select a unit type for the pop-up dialog.

4. Click OK to return to the Header Info: window.

Entering Geographic Information for Non-Georeferenced Files

If your file is not georeferenced but does include geographic information, use this procedure to place that information in the ENVI header file. Currently, ENVI uses the first geographic point to place a flag on the geo-browser showing the location of the

file (see “Opening Files with the Geo-Browser” on page 168

). The other points remain in the header for your information only (image georeferencing is defined using the MapInfo field).

1. From the Header Info: dialog, select Edit Attributes

Geographic Corners.

2. Enter between one and four pixel locations and their corresponding latitudes and longitudes.

Note

In ENVI, pixel values always refer to the upper left corner of the pixel. Map coordinates also typically refer to the upper-left corner of the pixel. However, if you want the map coordinate to reference the middle of the pixel, add 0.5 to the image coordinate of the reference pixel specified in the Map Info field of the header (e.g., x = 1.5, y = 1.5 would make the map coordinates refer to the center of the pixel).

Editing ENVI Headers

ENVI User’s Guide

Chapter 2: File Management

117

Entering Pixel Sizes for Non-Georeferenced Files

1. In the Header Info: dialog, select Edit Attributes

Pixel Sizes.

2. Enter the X and Y pixel sizes into the appropriate text boxes and select the desired units from the Units pull-down menu.

Editing Classification Info

1. From the Header Info: dialog, select Edit Attributes

Classification Info.

Note

The File Type must be set to Classification for this selection to be available.

2. Enter the number of classes in the Classification Info dialog and click OK.

The Class Color Map Editing dialog appears.

ENVI User’s Guide

Figure 2-9: Class Color Map Editing Dialog

Editing ENVI Headers

118

Chapter 2: File Management

3. In the Class Color Map Editing dialog appears, click on the class name of the region to be changed from the list Selected Classes.

• To change a selected class name, edit it in the Class Name text field.

• To change the class color in the RGB color space (0-255 for the three colors), move the three sliders labeled Red, Green, or Blue.

• To reset the original class colors and names, click Reset.

• To change the class colors in the HSV or HLS color spaces, from the

System pull-down menu in the Class Color Map Editing dialog, select the appropriate system. Move the Hue, Saturation, Value or Hue, Lightness,

Saturation sliders to the desired values.

4. To make the changes permanent, click OK.

Note

On 24-bit color displays, ENVI does not automatically apply the color changes. Instead, for 24-bit hardware, apply color changes to the image by clicking on the Apply Changes button, which appears only when 24-bit color is available.

Changing Z Plot Information

Use Z Plot Information to change Z profiles, set axes titles, set a Z Plot box size, or specify an additional Z profile file name.

1. From the Header Info: dialog, select Edit Attributes

Z Plot Information.

The Edit Z Plot Information dialog appears.

2. Select from the following options:

• To set the Z plot Range: enter the minimum range value in the left and maximum value in the right text boxes labeled Z Plot Range.

• To set the axes titles, enter the desired axes titles into the X Axis Title and

Y Axis Title text boxes.

• To specify the size (in pixels) of the box used to calculate an average spectrum, enter the parameters into the Z Plot Average Box fields.

• To specify an additional file name from which to extract Z profiles, click on Default Additional Z Profiles. When the Default Additional Z Profiles dialog appears, click on Add New File.

Editing ENVI Headers

ENVI User’s Guide

Chapter 2: File Management

119

• Select the desired file name and click OK. The file name will appear in the list.

• To remove a file name from the list, click on the file name and click on

Remove Selected File.

Entering a Reflectance Scale Factor

Use Reflectance Scale Factor to enter a reflectance scale factor that is used in

ENVI’s Endmember Collection to correctly scale library data or other reflectance data to match the image data. If one of the files used in the Endmember Collection does not have a reflectance scale factor defined, then no scaling is done.

1. Select Edit Attributes

Reflectance Scale Factor and enter the value that, when divided into your data, would scale it from 0 to 1. For example, if the value of 10,000 in your data represents a reflectance value of 1.0, enter a reflectance scale factor of 10,000.

2. Click OK.

Entering a Data Value to Ignore

This parameter is currently used only for ENVI programming. See

“ENVI_FILE_QUERY” in the ENVI Reference Guide manual for details.

Entering Sensor Types

1. From the Header Info: dialog, select Edit Attributes

Sensor Type.

2. From the list, select a sensor type.

Setting the Default Stretch

Use Default Stretch to set the default stretch that will be used when displaying a band from the file.

1. In the Header Info: dialog, select Edit Attributes

Default Stretch.

2. From the Default Stretch menu, select the stretch type. Your choices include: linear, linear range, gaussian, equalize, square root, or none.

ENVI User’s Guide

Editing ENVI Headers

120

Chapter 2: File Management

Some of the stretches require you to enter additional information:

• For the % Linear stretch, enter the percentage of the data to clip (i.e. 5%).

• For Linear Range stretching, enter the minimum and maximum DN values to use in the stretch.

• For Gaussian stretching, enter the number of standard deviations to use in the stretch.

ENVI saves the stretch setting in the

.hdr

file. Whenever you display this image, this stretch setting overrides the global default stretch given in the envi.cfg

file.

Note

If the Default Stretch is set to None, use the Default Stretch set in the ENVI

Configuration File ( envi.cfg

).

Using the Complex Lookup Function

For complex data types, use Complex Lookup Function to determine which image to display.

1. In the Header Info: dialog, select Edit Attributes

Complex Lookup

Function.

2. When the Complex Data Lookup Function dialog appears, select the desired lookup function from the pull-down menu: Real (real portion of number),

Imaginary (imaginary portion), Power (log

10

of magnitude), Magnitude

(square root of sum of the squares of the real and imaginary), and Phase (arc tangent of imaginary divided by real). The default image is Power.

Setting Row Offsets

Use Major/Minor Frame Offsets to set the number of extra bytes to skip at the beginning and ending of lines and bands. An offset is non-image data that you want to skip, and it comes before and/or after a frame. A minor frame is one-dimensional, and a major frame is two-dimensional.

See the following table for definitions of major and minor frames for the various file formats.

1. In the Header Info: dialog, select Edit Attributes

Major/Minor Frame

Offsets.

2. In the Major/Minor Frame Offsets dialog, enter or select the number of prefix and suffix bytes to skip per major or minor frame by clicking on the arrow buttons or by typing into the text boxes.

Editing ENVI Headers

ENVI User’s Guide

Chapter 2: File Management

121

The following table contains major and minor definitions for the file formats in

ENVI.

File Format

BSQ

BIL

BIP

Minor Frame

# of samples (line)

# of samples (line)

# of bands (spectrum)

Major Frame

# of samples by # of lines

(band)

# of samples by # of bands

# of bands by # of samples

3. Click OK.

Table 2-2: Major and Minor Frame Definitions

ENVI User’s Guide

Editing ENVI Headers

122

Generating Test Data

Chapter 2: File Management

Use Generate Test Data to create a variety of test images that may be useful for demonstrating or testing ENVI features. These include constant value images, horizontal and vertical ramps, random number images using both uniform and normal distributions, and images generated using a Gaussian Point Spread Function.

1. Select File

Generate Test Data.

2. Select the output image type by clicking the appropriate button (see descriptions in the following sections).

3. When the Generate Image Parameters dialog appears, select the number of output samples, lines, and bands and the output data type.

4. Select output to File or Memory.

5. Click OK to start the function.

A status box appears while the image is being processed. The new image will be listed in the Available Bands List when processing is complete.

Generating Test Data

Figure 2-10: Generate Image Parameters Dialog

ENVI User’s Guide

Chapter 2: File Management

123

Generating Constant Value Images

To generate an image with a constant value for every pixel:

1. In the Generate Image Parameters dialog, select the Constant exclusive button.

2. Enter the desired DN value in the Value text box.

Generating Horizontal or Vertical Ramps

To generate an image with a either a horizontal or vertical linear ramp:

1. In the Generate Image Parameters dialog, select either the Horiz Ramp or

Vert Ramp exclusive button, respectively.

2. Enter the desired minimum value of the ramp in the text box labeled Min

Value and the desired maximum value in the text box labeled Max Value.

Generating Random Number Images

To generate an image with randomly distributed values:

1. In the Generate Image Parameters dialog, select either the Random (uniform) or Random (normal) exclusive button.

Selecting the Random (normal) option returns an image with normallydistributed random numbers. Selecting the Random (uniform) option returns an image with uniformly-distributed random numbers.

2. Enter the desired minimum value to occur in the image in the text box labeled

Min Value and the desired maximum value in the text box labeled Max Value.

3. Enter a Seed value in the Seed text box for initialization of the random number generator.

If no seed value is entered, the system clock will be used for initialization.

ENVI User’s Guide

Generating Test Data

124

Chapter 2: File Management

Generating Gaussian Images

To generate an 2D Gaussian Point Spread Function image:

1. In the Generate Image Parameters dialog select the Gaussian PSF exclusive button.

2. Enter the desired minimum value to occur in the image in the text box labeled

Min Value and the desired maximum value in the text box labeled Max Value.

3. Enter the standard deviation to be used for the function in the text box labeled

Sigma.

Generating Test Data

ENVI User’s Guide

Chapter 2: File Management

Using the Data Viewer

125

Use Data Viewer to examine data files at the byte level, which allows you to view file structure, to identify unknown file types, and to determine the “offset” to data when an embedded image header is present in the data.

1. Select File

Data Viewer.

2. When the Data Viewer Input File dialog appears, select a file.

3. Click OK.

The Data Viewer dialog appears with the file name and number of total bytes in the window banner and the actual data values (in hexadecimal format, by default) in the window displayed.

ENVI User’s Guide

Figure 2-11: Data Viewer Dialog

Using the Data Viewer

126

Chapter 2: File Management

The first column lists the byte count (the starting byte of the listed row). The next 16 columns (for hexadecimal and byte data) list the values for 16 bytes of data, and the final column lists the ASCII equivalent of the values.

Note

If the data does not have any embedded ASCII characters, the ASCII equivalents will be totally random. If there is embedded ASCII data, the data will be readable as text.

4. Select from the following options:

• To select the starting byte to view from the file, enter the byte number in the Byte Offset text box.

• To move the data view forward or backward one page respectively, use the

Next Page and Prev Page buttons.

• If you suspect that the data may be in something other than byte format, select a data format (Hexadecimal, Byte, Unsigned Integer, Integer,

Long Integer, Unsigned Long Integer, or Floating Point) from the

View_Format menu. The number of columns of data values and the representation of the listed data change accordingly.

• To open and view a different file, select File

Open New File.

• To exit the function, select File

Cancel.

• To evaluate swapping of bytes between Intel and IEEE formats for data types with more than one byte per value (integer, long integer, and floating point), select from the Byte_Swap menu: None (no swapping), Short

Word (swapping two bytes for an integer), or Long Word (swapping byte pairs for long integer and floating point data).

Using the Data Viewer

ENVI User’s Guide

Chapter 2: File Management

Saving Files

127

Use Save File As to create a new standard ENVI disk file or an ENVI Meta File from bands contained in the Available Bands List and to output image data to various image processing formats. You can output your data to image processing formats such as ArcView Raster (

.bil

), ER Mapper, ERDAS (

.lan

), NITF (

.ntf

), PCI

(

.pix

), TIFF (including GeoTIFF and TIFF world files [

.tfw

]), and JPEG2000 files

(

.jp2

). In addition, you can output your image to an ASCII (

.txt

) file.

Note

New files can only be created from bands that have the same spatial dimensions.

Use ENVI’s integral subsetting capabilities to choose individual bands and to perform on-the-fly subsetting of files to the correct dimensions. For instructions, see

“Selecting a Spatial Subset” on page 35 and

“Selecting a Spectral Subset” on page 40.

Saving Files as Standard ENVI Files

Use ENVI Standard to create disk files from a combination of ENVI files, external

(foreign) files, or memory items.

1. Select File

Save File AsENVI Standard.

The New File Builder dialog appears.

ENVI User’s Guide

Figure 2-12: New File Builder Dialog

Saving Files

128

Chapter 2: File Management

2. In the New File Builder dialog, click Import File. The Create New File Input

File dialog appears.

3. Select files by clicking on the file names.

Note

If the file to be included is not listed, click Open File and select the input file.

4. Spatially or spectrally subset the file as desired (see

“Selecting a Spatial

Subset” on page 35 or

“Selecting a Spectral Subset” on page 40).

Tip

You can spatially or spectrally subset a group of files if they are the same size. The subset will be applied to each file.

5. Repeat the file selection using the Import ENVI File button for each input file to be included in the new file. Input files are listed in the Selected ENVI Files

for New File list.

• To delete a file from the list in the New File Builder dialog, click on the filename and click Delete.

• To change the order in which the files and/or bands are imported, see

“Reordering Files” below.

6. Select output to File or Memory.

7. Click OK to build the new file.

The file will be output as a band sequential (BSQ) format.

Reordering Files

1. In the New File Builder dialog, click the Reorder Files button. The Reorder

Files dialog appears.

2. Click on a filename or bandname and drag it to the desired position in the list.

3. Repeat for as many filenames or bandnames as needed.

4. Click OK.

Saving Files

ENVI User’s Guide

Chapter 2: File Management

129

Removing Superfluous Files

When you create a standard file, use this procedure to remove the bands used to create it.

To remove the component files, use the arrow toggle button to select Yes (remove files), or No, next to the text label Remove Superfluous Files?.

Warning

This function physically removes the files from the Available Bands List and the disk:

If memory items are to be transferred to the new file and Remove Superfluous

Files? is selected, they are deleted from memory when the new file is created.

If all of the bands from a disk file are to be transferred to the new file and Remove

Superfluous Files? is selected, the original disk file is physically deleted from the disk when the new file (either memory or disk file) is created.

Saving Files as ENVI Meta Files

A meta file is a virtual file structure, in which no new disk file is actually created.

Instead, selected files or image bands are associated through the use of a small text file containing the names of the files that are to be treated as a virtual file. When this file is later selected for input or processing, ENVI gets the image data from the individual disk files and treats them as if they were actually in the same input file for processing. ENVI meta files can contain images with different data types (byte, integer, floating point, etc.), which allows you to combine processing of diverse data sets. No file conversions are required, and no intermediate processing files are created.

Note

Files to be included in Meta Files must reside on disk as ENVI format files. Convert foreign files imported to ENVI (e.g., TIFF files) or files/bands created as memory items within ENVI to ENVI disk files prior to creating the meta file.

1. Select File

Save File AsENVI Meta.

2. When the New File Builder dialog appears, click Import File. The Create New

File Input File dialog appears.

3. Select files by clicking on the file name(s). If the file to be included is not listed, click Open File and select the desired input file.

ENVI User’s Guide

Saving Files

130

Chapter 2: File Management

Tip

You can spatially or spectrally subset a group of files if they are the same size. The subset will be applied to each file.

4. Spatially or spectrally subset the file as desired (see

“Selecting a Spatial

Subset” on page 35 or

“Selecting a Spectral Subset” on page 40).

5. Repeat the file selection using the Import ENVI File button for each input file to be included in the new file.

• To delete a file from the list in the New File Builder dialog, click on the filename and click Delete.

• To change the order in which the files and/or bands are imported, see

“Reordering Files” on page 128.

6. In the Enter Output Filename text box, enter a filename or click Choose and select an output filename.

7. Click OK to build the new file.

The bands in the meta file appear in the Available Bands List. The actual meta file, on disk, is a text file that only contains the names of the imported files.

Saving Files as ASCII Files

ASCII (

.txt

) output files will contain the DN values for every pixel. You may select the output format of the DN values (field size, including decimal point and white spaces, and number of decimal places). If you output multiple bands, the file interleave (BSQ, BIL, BIP) will be the same as the input file. The format of the

ASCII file is that of a two-dimensional array.

Note

If your output file contains three asterisks (

***

), then your ASCII output format is incorrect for the data type of your DN values.

1. Select File

Save File AsASCII.

2. When the Output File to ASCII Input Filename dialog appears, select a file and perform any subsetting.

3. Click OK.

Saving Files

ENVI User’s Guide

Chapter 2: File Management

131

4. When the Output to ASCII Parameters dialog appears, select from the following options.

• To set the field size, click on the arrow buttons next to the Total Field Size label to select a number, or type a number into the box.

• To set the number of digits that will follow the decimal point in the output data, click on the arrow buttons next to the Decimal Precision label to select a number, or type a number into the box.

5. Enter an output filename, or click the Choose button to select a filename.

6. Click OK.

The output ASCII file is created and can be viewed using any text editor.

Saving Files as ArcView Raster Files

To output data to an ArcView raster (

.bil

) format file (including

.hdr

and

.stx

files):

1. Select File

Save File AsArcView Raster (.bil).

2. When the Output ArcView Input Filename dialog appears, select the desired file and perform any subsetting (see

“Selecting a Spatial Subset” on page 35 or

“Selecting a Spectral Subset” on page 40).

3. When the Output File to ArcView dialog appears, enter the desired output filename and click OK.

ENVI creates the

.bil

,

.hdr

, and

.stx

ArcView raster output files.

Note

The resulting ArcView file does not contain datum and ellipsoid information.

ENVI User’s Guide

Saving Files

132

Chapter 2: File Management

Saving Files as ER Mapper Files

To output data to an ER Mapper format file:

1. Select File

Save File AsER Mapper File.

2. When the Output ER Mapper Input Filename dialog appears, select the input file and perform any subsetting.

3. When the Output File to ER Mapper dialog appears, enter an output filename and click OK.

ENVI creates an ER Mapper output file.

Saving Files as ERDAS Files

To output data to an ERDAS (

.lan

) format file:

1. Select File

Save File AsERDAS (.lan) File.

2. When the Output ERDAS Input Filename dialog appears, select the input file and perform any subsetting.

3. When the Output File to ERDAS dialog appears, enter an output filename and click OK.

ENVI creates an ERDAS

.lan

output file.

Saving Files as JPEG2000 Files

To output to a JPEG2000 file:

1. Select File

Save File AsJPEG2000.

2. When the file selection dialog appears, select an input filename and perform any subsetting, then click OK. The Output File to JPEG2000 dialog appears.

3. Use the textbox or the Choose button to enter an output filename.

4. Use the button menu to specify the type of compression used to save this data as a JPEG2000 file.

Saving Files

ENVI User’s Guide

Chapter 2: File Management

133

The button menu contains the following choices:

Lossless Compression (default) — a completely reversible compression that produces a high quality result, but less data content is compressed than with Low Compression or High Compression.

Low Compression — a non-reversible compression that retains nearly all the original data content while maintaining moderate compression.

High Compression — a non-reversible compression that provides the highest level of data content compression, but could produce in a lower quality result.

5. Click OK to start the output processing.

ENVI creates a JPEG2000 (

.jp2

) output file.

Saving Files as NITF Files

To output data, including any geographic information, to a National Imagery

Transmission Format (NITF) version 02.00 (MIL-STD-2500A), or any geographic or

UTM georeferencing information to 02.10 (MIL-STD-2500B) format file:

Note

Currently ENVI’s NITF output uses a default Compliance Level of 99 and is not certified.

1. Select File

Save File AsNITF.

2. When the NITF Output File dialog appears, select the output file and perform any subsetting.

3. When the NITF Output Parameters dialog appears, select the NITF output version from the button menu.

• To enter additional parameters such as originator information or header details, click the Additional Settings button and enter the additional information in the NITF Additional Parameters dialog.

4. In the NITF Output Parameters dialog, enter an output filename and click OK.

Note

ENVI does not support blocked NITF output.

ENVI User’s Guide

Saving Files

134

Chapter 2: File Management

Saving Files as PCI Files

To output data to a PCI(

.pix

) format file:

1. Select File

Save File AsPCI File.

2. When the Output PCI Input Filename dialog appears, select the input file and perform any subsetting.

3. When the Output File to PCI dialog appears, enter an output filename and click

OK.

ENVI creates a

.pix

PCI output file.

Saving Files as TIFF Files

To output to a TIFF file:

1. Select File

Save File AsTIFF.

2. When the file selection dialog appears, select an input filename and perform any subsetting.

3. When the Output File to TIFF dialog appears, enter or choose an output filename and click OK to start the output processing.

ENVI creates a TIFF output file.

Note

If you selected a georeferenced file as the input file, the output file will be a

GeoTIFF file with an associated TIFF world file (.

tfw

).

Saving Files

ENVI User’s Guide

Chapter 2: File Management

Importing IDL Variables

135

Use Import IDL Variables to import IDL variables into ENVI. The variables must be defined on the ENVI command line. See the

ENVI Programmer’s Guide

for details. The Import IDL Variables function is not available in ENVI RT (run-time version).

1. Select File

Import IDL Variables.

The Import IDL Variables dialog appears with a list of all defined variables.

2. Select the desired variable names to import by clicking in the check box next to the name.

• To add a range of variable names, enter the starting and ending variable numbers and click the Add Range button.

• To select all the variable names, click on the Select All button.

• To clear the selected variable names, click on the Clear button.

3. To save a copy of the data in IDL, use the arrow toggle button to select Yes.

Note

If you select No, the data will be imported into ENVI and deleted from IDL.

4. Click OK to import the selected variables.

All one-dimensional variables are placed in a plot window; the two- and threedimensional variables appear in the Available Band List as memory items.

ENVI User’s Guide

Importing IDL Variables

136

Exporting to IDL Variables

Chapter 2: File Management

Use Export to an IDL Variable to export and/or subset an ENVI band or file to an

IDL variable on the ENVI command line.

Tip

If the ENVI command line is not visible in the IDL window, select Window

Command Input in the IDL window (Export to an IDL Variable is not available in ENVI RT (run-time version)).

1. Select File

Export to an IDL Variable.

2. When the file selection dialog appears (see

“Selecting Files in ENVI” on page 32), select the band or file and perform any subsetting.

3. In the Export Variable Name dialog, select one of the following options:

• If the variable has been previously defined, click on the name of the variable in the displayed list.

• In the New Variable Name text box, enter the name of an undefined IDL variable.

4. Press the Enter key on your keyboard.

Figure 2-13: Export Variable Name Dialog

The exported data will be available to use at the ENVI command line.

Exporting to IDL Variables

ENVI User’s Guide

Chapter 2: File Management

Compiling IDL Code

137

Use Compile IDL Module if you have written your own IDL code to use in ENVI.

Every time you change the code you will need to compile it unless the code is in the save-add directory and ENVI has been restarted (see “Compiling” in Chapter 1 of the

ENVI Programmer’s Guide manual).

1. Select File

Compile IDL Module.

2. When the Enter Module Filename file selection dialog appears, select your module filename and click OK.

Any compile errors are shown in the main IDL window.

ENVI User’s Guide

Compiling IDL Code

138

IDL CPU Parameters

Chapter 2: File Management

In IDL, certain routines are multi-threaded. Multi-threading is used to increase the speed of numeric computations by using multiple system processors to simultaneously carry out different parts of the computation. When an ENVI operation uses a multi-threaded IDL routine, the ENVI operation will exhibit improved performance.

Note

Only ENVI operations that utilize multi-threaded IDL routines are affected. For more information, see the IDL documentation.

You can change the settings for how ENVI will use IDL’s thread pool during an

ENVI session by selecting File

IDL CPU Parameters. The IDL CPU Parameters dialog displays.

Figure 2-14: IDL CPU Parameters Dialog

Thread Pool number of Processors — The number of threads that IDL will use in thread pool computations. The default value is equal to the value of the number of CPUs on your system, so that each thread will have the potential to run in parallel with the others. Note that there is no benefit to using more threads than your system has CPUs. However, depending on the size of the problem and the number of other programs running on the system, there may be a performance advantage to using fewer CPUs.

Thread Pool Minimum Elements — The number of data elements (each element being a single data value of a particular data type) in a computation that are necessary before IDL will use the thread pool. If the number of

IDL CPU Parameters

ENVI User’s Guide

Chapter 2: File Management

139 elements is less than the number you specify, ENVI will perform the computation without using the thread pool. Use this parameter to prevent

ENVI from using the thread pool on tasks that are too small to benefit from it.

The default is 100000.

Thread Pool Maximum Elements — The maximum number of elements in a computation that will be processed using the thread pool. Computations with more than this number of elements will not use the IDL thread pool. Set this parameter if large jobs are causing virtual memory paging on your system.

Setting this value to 0 removes any limit on maximum number of elements.

The default is 0.

Set the Thread Pool Number of Processors, Thread Pool Minimum Elements, and Thread Pool Maximum Elements and click OK.

Note

Changing the multi-threading options using the IDL CPU Parameters dialog will only change the options for the current session. The settings will not be saved in the envi.cfg

file. For more information on how to change the settings in the envi.cfg

file, see “The ENVI Configuration File” in Appendix A.

Optimizing the CPU Parameter and Tile Size

Parameter Settings

An issue related to the Thread Pool Minimum Elements parameter is the tile size preferences setting (under File

PreferencesMemory Usage). The tile size listed here refers to the size of the tiles used during spatial processing of images in

ENVI. If the tile size is such that each image tile has fewer array elements than the

Thread Pool Minimum Elements value, then ENVI will not tile the process even if the image itself is relatively large. In this situation, you can simply set the Image Tile

Size preference to a larger value, so that the tiles are large enough to exceed the

Thread Pool Minimum Elements. In general, the larger the Image Tile Size, the more memory is required for processing, but the larger the potential performance from multi-threaded processing.

Correctly setting ENVI’s Image Tile Size parameter (File

Preferences

Memory Usage) is a very important consideration in optimizing the performance gains from multi-threading. Tile size is the size of the pieces into which ENVI breaks large datasets so that certain processes can occur on machines with finite resources.

The default value for this parameter is 1 MB. On conventional (i.e., 1 processor) machines, the tile size has little to no impact on processing speed. Having it set to a relatively small value (such as 1 MB) can help ensure that ENVI does not run out of

ENVI User’s Guide

IDL CPU Parameters

140

Chapter 2: File Management

memory, especially if other applications are running on the same machine. Setting it to more than 5 MB or so on most conventional machines is not recommended.

However, on a multi-processor machine, it’s possible for a small tile size setting to result in undesirable consequences for multi-threading.

For example, a tile size setting of 1 MB, applied to an image containing double precision complex data (16 bytes per array element) will produce input arrays for spatially tiled processes of 62,500 elements, which would fall quite short of the default 100,000 element minimum required for multi-threading. Furthermore, multithreading performance gains are generally much better with larger input array sizes.

An unnecessarily small tile size might needlessly limit the benefits of multithreading.

While not all processes in ENVI are tiled and not all processes in IDL are multithreaded, it’s best to set the tile size parameter on multi-processor machines with multi-threading in mind so as to take full advantage of this feature.

Warning

Do not just set the tile size to a large portion of your RAM. If the tile size parameter is set to an amount greater than the amount of actually available memory (memory still free after the operating system and any other applications have claimed what they need) and ENVI is asked to use the full tile size for a large process, any number of system and/or application errors could result.

The tile size should be set to a value less than the smallest amount of free memory that can be expected on the machine where ENVI is installed, giving due consideration to the memory demands of other applications and users at any given time. Depending on how much memory the machine in question has and what demands are placed on it, a safe tile size setting may in fact be significantly larger than the 1 MB default value.

IDL CPU Parameters

ENVI User’s Guide

Chapter 2: File Management

Tape Utilities

141

Use Tape Utilities to read MSS, TM, SPOT, AVHRR, AVIRIS, NLAPS, and CEOS format radar data (including SIR-C/X-SAR, RADARSAT and ERS-1) from a variety of computer compatible tape (CCT) formats and to read U.S. Geological Survey

DEMs and DLGs (Optional Format only). Also, use the tape utilities to read BSQ,

BIP, or BIL data directly from tape and to control SCSI tape drives (9 track, 8 mm, and 4 mm media) at the file and record levels.

Flexible tape tools are included with the tape utilities for inputting other data types, even when a specific format is not directly supported. Also included is a special tape output utility for writing ENVI files to tape, which preserves header information and file structure. A corresponding tape input utility is also available for reading ENVI formatted tapes. Use the tape scan and dump utilities to diagnose tape structures, build scripts for commonly used tape types, and dump tapes to disk.

Figure 2-15: ENVI Tape Utilities Menu

Note

Tape functions are automatically supported on UNIX. To install SCSI tape support for Microsoft Windows 98, Windows 2000, Windows NT, and Windows XP platforms, open the aspi_v470.exe

self-extracting archive in the

\tape32 directory on the ENVI for Windows installation CD. Please see the included

README.DOC

file for installation instructions.

ENVI User’s Guide

Tape Utilities

142

Chapter 2: File Management

Understanding Tape Device Names

On PC platforms, ENVI uses a tape device name based on the adaptor, target, and unit number. On UNIX platforms, ENVI uses the standard UNIX tape device naming conventions.

On PCs With Microsoft Windows

The tape devices on the PCs must be ASPI compatible SCSI tape drives. The tape device name on the PC is referenced by the adapter number (a#), target id (t#) and logical unit (l#). Most PCs have only one adapter and the logical unit number for the tape is 0. The target number is the SCSI id of the device. For external devices this is the pinwheel setting on the back of the drive. Internal devices use jumpers to set the

SCSI id. In either case your SCSI adapter should list the target numbers of your tape drives during bootup. For example, your Tape device name for a tape drive with SCSI id 4 would be

/dev/a0t4l0

(assuming only one adapter). If your tape drive is attached to your second SCSI adapter then you would use

/dev/a1t4l0

as the Tape device.

On UNIX Platforms

The tape devices on UNIX platforms are specified as the name of the tape device in the

/dev

directory. For example, to specify device

Øb

in the

/dev/rmt

directory, use the name

/dev/rmt/Øb as the ENVI Tape Device.

Reading Known Tape Formats

Use Read Known Tape Formats to read standard file formats from tape. Supported formats include Landsat MSS, Landsat TM, AVHRR, SPOT, AVIRIS, USGS DEM,

USGS DLG, NLAPS, SIR-C CEOS, RADARSAT CEOS, and Generic CEOS.

Reading Landsat MSS Tapes

ENVI reads two types of Landsat MSS tapes. MSS CCT-X format is typical of early

MSS data recorded in the BIP2 (BIPP) format. These data consist of strips of MSS data for all 4 MSS bands in pixel pairs (See MSS documentation available from data center and other sources). Landsat MSS data has been distributed in MSS EDIPS format since 1979. ENVI automatically identifies both MSS CCT-X or EDIPS formats by scanning the tape headers. The data can be subset directly from tape.

Tape Utilities

ENVI User’s Guide

Chapter 2: File Management

143

1. Select File

Tape UtilitiesRead Known Tape FormatsLandsat

MSS. The Landsat MSS – Load Tape dialog appears.

2. Select from the following options:

• To designate a different tape device, enter or choose a device.

• To change the tape record size, enter the values into the MaxRecsize text boxes.

Tip

If you designate a different tape device, allow your operating system enough time to register the new device before proceeding.

3. Click OK to have ENVI scan the tape header. If MSS format data are identified, the MSS Tape Output Parameter dialog appears.

• To subset the image being read from tape, enter the starting and ending lines and/or samples in the text boxes labeled Samples...To and/or

Lines...To respectively.

4. Select bands to be read by clicking on the toggle buttons next to the desired band names.

Note

To designate a range of bands, enter the beginning and ending band numbers in the text boxes next to the Add Range button. Click Add Range.

5. Select output to File or to Memory.

Note

File output is recommended.

6. Click OK to start the tape processing.

A status window informs you of the tape format and processing progress.

ENVI User’s Guide

Tape Utilities

144

Chapter 2: File Management

Reading Landsat TM Tapes

ENVI reads Landsat TM tapes of these formats: full scene CCT-AT and CCT-PT data, TIPS (Quad) format, LGSOWG, and FAST Format. ENVI identifies the file type automatically by scanning the tape headers. The CCT-AT and CCT-PT data formats are full-scene formats that were used for early (pre-1984) TM data and are typically are on two (AT) or three (PT) 6250 bpi tapes. The TM TIPS format is typical of most historical TM data recorded in the BSQ format from 1984 through approximately 1991. These data consist of TM data organized by “Quadrangle” (see

TM documentation available from EROS data center and other sources). TM data are currently distributed using the FAST format. For FAST format TM data that are georeferenced with a UTM projection, ENVI reads all of the necessary information and places it in the ENVI header. For Landsat data in NLAPS format, use the NLAPS

tape reader (see “Reading NLAPS Tapes” on page 151). The data can be subset

directly from tape.

1. Select File

Tape Utilities Read Known Tape Formats Landsat

TM. The Landsat TM-Load Tape dialog appears.

2. Select from the following options:

• To designate a different tape device, enter or choose a device.

• To change the tape record size, enter the values into the MaxRecsize text boxes.

Note

If you designate a different tape device, allow your operating system enough time to register the new device before proceeding.

3. Click OK to have ENVI scan the tape header. If TM format data are identified, the TM Tape Output Parameters dialog appears.

Note

To subset the image being read from tape, enter the starting and ending lines and/or samples in the text boxes labeled Samples...To and/or Lines...To respectively.

4. Select bands to be read by clicking on the toggle buttons next to the desired band names.

Tape Utilities

ENVI User’s Guide

Chapter 2: File Management

145

Note

To designate a range of bands, enter the beginning and ending band numbers in the text boxes next to the Add Range button. Click Add Range.

5. Select output to File or to Memory.

Note

File output is recommended.

6. Click OK to start the tape processing.

A status window informs you of the tape format and processing progress.

Reading AVHRR Tapes

ENVI reads both AVHRR LAC (HRPT) and GAC (in Level 1b format) data as provided by NOAA. The data can be subset directly from tape.

1. Select File

Tape UtilitiesRead Known Tape FormatsAVHRR.

The AVHRR Format – Load Tape dialog appears.

2. Select from the following options:

• To designate a different tape device, enter or choose a device.

• To change the tape record size, enter the values into the MaxRecsize text boxes.

Tip

If you designate a different tape device, allow your operating system enough time to register the new device before proceeding.

3. In the File text box, enter the file number to retrieve from the tape.

4. Click OK to scan the tape header. If AVHRR format data are identified, the

AVHRR Tape Output Parameters dialog appears and the bands available on tape are listed.

Note

To subset the image being read from tape, enter the starting and ending lines and/or samples in the text boxes labeled Samples...To and/or Lines...To respectively.

ENVI User’s Guide

Tape Utilities

146

Chapter 2: File Management

5. Select bands to be read by clicking on the toggle buttons next to the desired band names.

Note

To designate a range of bands, enter the beginning and ending band numbers in the text boxes next to the Add Range button. Click Add Range.

6. Select output to File or to Memory.

Note

File output is recommended.

7. Click OK to start the tape processing. A status window informs you of the tape format and processing progress.

Reading SPOT Tapes

ENVI automatically reads two types of SPOT data tapes: SPOT panchromatic data

(PAN) and SPOT multispectral data (XS). The data can be subset directly from tape.

1. Select File

Tape UtilitiesRead Known Tape FormatsSpot. The

SPOT – Load Tape dialog appears.

2. Select from the following options:

• To designate a different tape device, enter or choose a device.

• To change the tape record size, enter the values into the MaxRecsize text boxes.

Tip

If you designate a different tape device, allow your operating system enough time to register the new device before proceeding.

3. Click OK to have ENVI scan the tape header. If the data are identified as one of the supported SPOT data formats, the SPOT Tape Output Parameters dialog will appear.

Note

To subset the image being read from tape, enter the starting and ending lines and/or samples in the text boxes labeled Samples...To and/or Lines...To respectively.

Tape Utilities

ENVI User’s Guide

Chapter 2: File Management

147

4. Select the bands to be read by clicking the toggle buttons next to the band names. If SPOT PAN data are identified, one band is listed in the Select

Output Bands list. If SPOT XS data are identified, three bands are listed.

Note

To designate a range of bands, enter the beginning and ending band numbers in the text boxes next to the Add Range button. Click Add Range.

5. Select output to File or to Memory.

Note

File output is recommended.

6. Click OK to start the tape processing.

Reading AVIRIS Tapes

ENVI reads 1992 to 1996 NASA/JPL Airborne Visible/Infrared Spectrometer

(AVIRIS) data tapes. These tapes are in BIL format and have a 1000 byte header, which ENVI automatically scans to identify the data and to extract key image parameters. The data can be subset directly from tape.

Tip

The 1997 and later AVIRIS tapes are in UNIX tar format and ENVI cannot read them directly. To read these tapes, dump the tape using tar and use File

Open

Image File to read the data into an ENVI file.

1. Select File

Tape UtilitiesRead Known Tape FormatsAVIRIS. The

AVIRIS – Load Tape dialog appears.

2. Select from the following options:

• To designate a different tape device, enter or choose a device.

• To change the tape record size, enter the values into the MaxRecsize text boxes.

Note

If you designate a different tape device, allow your operating system enough time to register the new device before proceeding.

3. Click OK to have ENVI read the AVIRIS wavelength file and scan the AVIRIS image header. If the data are identified as AVIRIS data, the AVIRIS Tape

Output Parameters dialog appears.

ENVI User’s Guide

Tape Utilities

148

Chapter 2: File Management

Note

To subset the image being read from tape, enter the starting and ending lines and/or samples in the text boxes labeled Samples...To and/or Lines...To respectively.

4. Choose the bands (and their corresponding wavelengths) to be read by clicking the toggle buttons next to the band names.

Note

To designate a range of bands, enter the beginning and ending band numbers in the text boxes next to the Add Range button. Click Add Range.

5. Select output to File or to Memory.

Note

File output is recommended.

6. Click OK to start the tape processing.

A status window informs you of the tape format and processing progress.

Reading USGS DEM Tapes

ENVI reads both 1:24,000 (7 1/2’) and 1:250,000 (3 arc second) digital elevation model data in standard USGS format. You must know which files on the tape correspond to the input DEMs prior to starting this function (this information is usually on the tape label or in documentation provided by the USGS with the tape).

The UTM, geographic, or state plane projection information is read from the tape and placed in the ENVI header. Multiple DEMs can be automatically mosaicked together from tape.

1. Select File

Tape UtilitiesRead Known Tape FormatsUSGS DEM.

2. When the DEM Tape Reader Input Parameters Dialog appears, enter the file number of each DEM to be read into the Tape File: text box and press the

Return key. The file numbers to be read appear in a list under the box.

Tape Utilities

ENVI User’s Guide

Chapter 2: File Management

149

3. Enter a root file name to be used for DEM output. Each individual output file is assigned the root name with the file number appended. For example, if you assign the root test

then file 2 will be named test_2

.

• To have ENVI automatically mosaic files together, check the Yes button.

• To have the numbered temp files that are created during the mosaic process automatically deleted after mosaicking, check Yes next to the Delete temp

files when done? question.

4. Click OK. The USGS DEM Format – Load Tape Dialog appears.

5. Select from the following options:

• To designate a different tape device, enter or choose a device.

• To change the tape record size, enter the values into the MaxRecsize text boxes.

Note

If you designate a different tape device, allow your operating system enough time to register the new device before proceeding.

6. Click OK to read the DEM data. ENVI scans the data file to determine critical format and location information and automatically identifies and reads the data.

7. Select output to File or to Memory.

Note

File output is recommended.

8. Click OK to start the tape processing.

A status window informs you of the tape format and processing progress.

ENVI User’s Guide

Tape Utilities

150

Chapter 2: File Management

Reading USGS DLG Tapes

ENVI reads 1:24,000 (7 1/2’) or 1:100,000 digital line graph data in the USGS

Optional format. You must know which files on the tape correspond to the desired

DLGs prior to starting this function (this information is usually on the tape label or in documentation provided with the tape by the USGS). The UTM projection information and Albers Equal Area projection information are read from the tape, placed in the .

evf

output file, and used as the vector projection.

1. Select File

Tape UtilitiesRead Known Tape FormatsUSGS DEM.

2. When the DEM Tape Reader Input Parameters dialog appears, enter the file number of each DLG to be read into the Tape File: text box and press the

Return key. The file numbers to be read appear in a list under the box.

3. Enter a root filename to be used for DLG output. Each individual output file is assigned the root name with the file number appended. For example, if you enter the root filename test

, then file two will be named test_2

.

4. Click OK to continue. The USGS DLG Format – Load Tape dialog appears.

5. Select from the following options:

• To designate a different tape device, enter or choose a device.

• To change the tape record size, enter the values into the MaxRecsize text boxes.

Note

If you designate a different tape device, allow your operating system enough time to register the new device before proceeding.

6. Click OK to read the DLG data.

ENVI scans the data file to determine critical format and location information, automatically identifies and reads the data, and places it in the Available Vectors List

(see

“The Available Vectors List” on page 212

).

Tape Utilities

ENVI User’s Guide

Chapter 2: File Management

151

Reading NLAPS Tapes

ENVI reads National Landsat Archive Production System (NLAPS) tapes. ENVI reads only the first image from the tape (TM, MSS, or DEM) and currently does not read the optional DEM that follows a TM or MSS image. These optional DEM files can be read by using the ENVI dump tape utility (see

“Dumping Tape Data” on page 165). ENVI currently only reads UTM projection information from the header

file on tape. The data can be subset directly from tape.

1. Select File

Tape UtilitiesRead Known Tape FormatsNLAPS. The

NLAPS – Load Tape dialog appears.

2. Select from the following options:

• To designate a different tape device, enter or choose a device.

• To change the tape record size, enter the values into the MaxRecsize text boxes.

Note

If you designate a different tape device, allow your operating system enough time to register the new device before proceeding.

3. Click OK to have ENVI scan the tape header. If NLAPS format data are identified, the Landsat NLAPS Tape Output Parameters dialog appears.

Note

To subset the image being read from tape, enter the starting and ending lines and/or samples in the text boxes labeled Samples...To and/or Lines...To respectively.

4. Select bands to be read by clicking on the toggle buttons next to the desired band names.

Note

To designate a range of bands, enter the beginning and ending band numbers in the text boxes next to the Add Range button. Click Add Range.

ENVI User’s Guide

Tape Utilities

152

Chapter 2: File Management

5. Select output to File or Memory.

Note

File output is recommended.

6. Click OK to start the tape processing.

A status window informs you of the tape format and processing progress.

Reading SIR-C CEOS Tapes

On UNIX and Windows platforms, use Read SIR-C CEOS Tape to read SIR-C tapes as distributed by JPS or EROS Data Center in CEOS format. Supported formats include Single Look Complex (SLC), Multilook Complex (MLC), and Multilook

Ground Detected (MGD). You can subset all data types directly from tape to conserve disk space. In addition, SLC data sets can be multilooked from tape with integer or non-integer number of looks.

Note

Depending on the data type, the size of the SIR-C data scene, and the number of data sets selected, the tape reading and processing could take from less than one hour to several hours to complete.

1. Select File

Tape UtilitiesRead Known Tape FormatsSIR-C

CEOS. The SIR-C Format – Load Tape dialog appears.

2. Select from the following options:

• To designate a different tape device, enter or choose a device.

• To change the tape record size, enter the values into the MaxRecsize text boxes.

Note

If you designate a different tape device, allow your operating system enough time to register the new device before proceeding.

Tape Utilities

ENVI User’s Guide

Chapter 2: File Management

153

3. Click OK to have ENVI scan the tape for standard format SIR-C data. When the tape scan is completed, the SIR-C Tape File Selection dialog appears. A list of the SIR-C data files on the tape appears in the Select Output Files list.

Figure 2-16: SIR-C Tape File Selection Dialog

4. Click on the box next to one or more of the desired data sets to choose the data to be read from the tape.

Note

To designate a range of data, enter the beginning and ending numbers in the text boxes next to the Add Range button. Click Add Range.

5. Click OK. The SIR-C Tape Parameters dialog appears. The SIR-C data sets selected in the previous dialog are listed in the Selected SIR-C Tape Files: list.

ENVI User’s Guide

Tape Utilities

154

Chapter 2: File Management

SIR-C Tape Options

Use the SIR-C Tape Parameters dialog to select spatial subsetting from tape, assign output file names, and choose multilooking from tape if desired. Each data set will be independently named and processed.

Subsetting SIR-C Data

1. In the SIR-C Tape Parameters dialog, click on a data set.

2. Click the Spatial Subset button.

3. Use standard ENVI spatial subsetting to subset the data. For instructions, see

“Selecting a Spatial Subset” on page 35.

Note

Image subsetting is not available because an image has not been synthesized at this stage.

Multilooking SIR-C Data from Tape

Multilooking from tape can take a long time because of the start-stop tape movement caused by processing data between tape reads.

Note

Only select this option if insufficient disk space is available to read the entire data set. Multilooking on disk is much more efficient and is the preferred processing option (see

“Multilooking SIR-C Compressed Data” in Chapter 13).

1. In the SIRC Tape Parameters dialog, click on a data set.

2. Click the Multi-Look button. The SIR-C Multilook Parameters dialog appears.

Tape Utilities

ENVI User’s Guide

Chapter 2: File Management

155

Figure 2-17: SIR-C Multilook Parameters Dialog

3. Enter the multilooking parameters by selecting one of the following options:

• In the Looks text boxes, enter the desired number of looks in the range

(samples) and azimuth (lines) directions.

Both integer and floating point number of looks are supported.

• In the Pixels text boxes, enter the output number of pixels.

• In the Pixel Size text boxes, enter the output pixel size in meters.

Note

When one of the parameters is entered, the others are automatically calculated to match. For example, if you enter the Pixel Size as 30 m, the corresponding number of pixels and the looks are calculated and change in the corresponding text boxes. Both integer and floating point number of looks are supported.

4. Click OK to return to the SIR-C Tape Parameters dialog.

5. Repeat the multi-look process for each data set listed in the dialog.

Entering Output Filenames

1. In the SIR-C Tape Parameters dialog, click on a data set name in Selected

SIR-C Tape Files list.

2. In the Enter Output Filename [.cdp] text box, enter an output filename.

By convention, filenames should take the form

filename_c.cdp

and

filename_l.cdp

.

3. Repeat steps 1 and 2 for each data set.

ENVI User’s Guide

Tape Utilities

156

Chapter 2: File Management

Note

One compressed scattering matrix output file is created for each data set selected.

4. Click OK to begin reading the tape and processing the data.

Reading RADARSAT CEOS Tapes

Use Read RADARSAT CEOS Tape to read RADARSAT CEOS data tapes onto disk if you are running ENVI on UNIX and Windows platforms.

1. Select File

Tape UtilitiesRead Known Tape FormatsRADARSAT

CEOS. The RADARSAT – Load Tape dialog appears.

2. Select from the following options:

• To designate a different tape device, enter or choose a device.

• To change the tape record size, enter the values into the MaxRecsize text boxes.

Note

If you designate a different tape device, allow your operating system enough time to register the new device before proceeding.

3. Click OK to have ENVI scan the tape for standard format RADARSAT data.

Note

When the tape scan is completed, the RADARSAT Tape File Selection dialog appears. A list of the RADARSAT data files on the tape appear in the Select

Output Files list.

4. Click on the box next to the data set(s) to be read from the tape.

Note

To designate a range of files, enter the beginning and ending numbers in the text boxes next to the Add Range button. Click Add Range.

5. Click OK. The RADARSAT Tape Parameters dialog appears. The

RADARSAT data sets that were selected in the RADARSAT Tape File

Selection dialog are listed in the Selected RADARSAT Tape Files list.

Tape Utilities

ENVI User’s Guide

Chapter 2: File Management

157

RADARSAT Tape Options

Use the RADARSAT Tape Parameters dialog to select spatial subsetting from tape and to assign output file names. Each data set will be independently named and processed.

Subsetting RADARSAT Data

1. In the RADARSAT Tape Parameters dialog, click on a data set.

2. Click the Spatial Subset button.

3. Use standard ENVI spatial subsetting to subset the data. For instructions, see

“Selecting a Spatial Subset” on page 35.

4. Click OK to return to the RADARSAT Tape Parameters dialog.

5. Repeat steps 1 through 3 each data set listed in the dialog.

Entering RADARSAT Output Filenames

1. In the RADARSAT Tape Parameters dialog, click on a data set in the Selected

RADARSAT Tape Files list.

2. In the Enter Output Filename text box, enter a filename.

3. Repeat steps 1 and 2 for each data set listed in the dialog.

Note

One image output file is created for each data set selected.

4. Click OK to begin reading the tape and processing the data.

The processed images appear in the Available Bands List and can be displayed and processed using standard ENVI procedures.

Reading Generic CEOS Tapes

Use Read Generic CEOS Tape to read a variety of SAR data tapes in CEOS format.

It is a flexible CEOS-format tape reader for UNIX and Windows platforms. Use this routine to read ERS-1, JERS-1, and X-SAR (MLD) data. CEOS information is used directly to minimize user interaction and simplify creation of files for viewing and analysis in ENVI.

ENVI User’s Guide

Tape Utilities

158

Chapter 2: File Management

Note

The generic CEOS reader does not dump data files that are complex (e.g., SLC,

MLC, etc.). Instead, use the specific SIR-C or RADARSAT tape tool or dump the tape using ENVI’s Scanning Tapes and Customizing Dumps utility. Once the complex files are on disk, they can be opened using the Open External File menu or synthesized into images using ENVI’s radar tools. For more information, see

“Scanning Tapes and Customizing Dumps” on page 163 in this chapter, and

Chapter 13, “Radar Tools” .

Tip

To conserve disk space, subset the data directly from tape.

1. Select File

Tape UtilitiesRead Known Tape FormatsRead

Generic CEOS. The CEOS Format – Load Tape dialog appears.

2. Select from the following options:

• To designate a different tape device, enter or choose a device.

• To change the tape record size, enter the values into the MaxRecsize text boxes.

Note

If you designate a different tape device, allow your operating system enough time to register the new device before proceeding.

3. Click OK to have ENVI scan the tape for standard format CEOS data.

Note

When the tape scan is completed, the CEOS Tape File Selection dialog appears. The CEOS-format data files on the tape appear in the Select Output

Files list.

4. Click on the box next to one or more of the desired data sets to be read from the tape.

Note

To designate a range files, enter the beginning and ending numbers in the text boxes next to the Add Range button. Click Add Range.

5. Click OK.

Tape Utilities

ENVI User’s Guide

Chapter 2: File Management

159

The CEOS Tape Parameters dialog appears.The CEOS data sets that were selected in the CEOS Tape File Selection dialog appear in the Selected CEOS Tape Files list.

CEOS Tape Options

Use the CEOS Tape Parameters dialog to select spatial subsetting from tape and to assign output file names. Each data set will be independently named and processed.

Subsetting CEOS Data

1. In the CEOS Tape Parameters dialog, click on a data set name.

2. Click the Spatial Subset button.

3. Use standard ENVI spatial subsetting to subset the data. For instructions, see

“Selecting a Spatial Subset” on page 35.

4. Repeat steps 1 through 3 for each data set listed in the dialog.

5. Click OK to return to the CEOS Tape Parameters dialog.

Entering CEOS Output Filenames

1. In the CEOS Tape Parameters dialog, click on a data set name in the Selected

CEOS Tape Files list.

2. In the text box labeled Enter Output Filename, enter a filename.

3. Repeat steps 1 and 2 for each data set listed in the dialog.

Note

One image output file is created for each data set selected.

4. Click OK to begin reading the tape and processing the data.

The processed images appear in the Available Bands List and can be displayed and processed using standard ENVI procedures.

ENVI User’s Guide

Tape Utilities

160

Chapter 2: File Management

Reading and Writing ENVI Tapes

Use Read/Write ENVI Tape to read and write ENVI-formatted tapes. The ENVI tape output utility writes image data to tape while preserving the ENVI file structure and header configuration. A corresponding utility reads these tapes.

ENVI Tape Format Information

ENVI tapes are written in a standard format to simplify reading of image data while maintaining key image characteristics found in the image headers. As a result, the

ENVI format uses several header records and files. See the following table for descriptions.

2

3

1

File ID Rec ID

1

Data

Type

ASCII

Information

2 ASCII

1024 bytes, ID String “ENVI TAPE FORMAT”, and string “NUM_ENVI_FILES= N” (where N is the total number of ENVI image files on the tape.

1024 bytes, Key word strings containing required information for the first ENVI image file on the tape. Keywords are NL (number of lines), NS (number of samples), NB (number of bands), INTERLEAVE (BSQ, BIL, or BIP),

DATA TYPE (byte, signed and unsigned integer, long integer, 64-bit integer, unsigned 64-bit integer, floating point, double precision complex and double complex), ENVI_TYPE (0 is ENVI image file), NAME (image name), and

DESCRIPT (image description string).

Same as above for 2nd ENVI file

Same as above for 3rd through Nth ENVI file

3

4 thru

N+1

ASCII

ASCII

ASCII Header for Image 1 (variable length)

BINARY Image 1 (Record length is number of samples)

Table 2-3: ENVI Format Tape Structure

Tape Utilities

ENVI User’s Guide

Chapter 2: File Management

161

4

5

File ID Rec ID

6 thru

N+1

Data

Type

Information

ASCII Header for Image 2 (variable length)

BINARY Image 2 (Record length is number of samples)

Pairs of ASCII header files and binary image files up to N+1 as specified in the first header record

Table 2-3: ENVI Format Tape Structure (Continued)

Reading ENVI Tapes

Use Read ENVI Tape to read ENVI format tapes that were written using the Write

ENVI Tape function.

1. Select File

Tape UtilitiesRead/Write ENVI TapesRead ENVI

Tape. The ENVI Format – Load Tape dialog appears.

2. Select from the following options:

• To designate a different tape device, enter or choose a device.

• To change the tape record size, enter the values into the MaxRecsize text boxes.

Note

If you designate a different tape device, allow your operating system enough time to register the new device before proceeding.

3. Click OK to have ENVI scan the tape header.

Note

If the data are identified as ENVI format data, the ENVI Tape Files dialog appears, listing the names of the ENVI files on the tape.

4. Select files to be read by selecting the toggle buttons next to the desired file names.

Note

To select ranges of files, enter the beginning and ending files in the text boxes next to the Add Range button. Click Add Range.

ENVI User’s Guide

Tape Utilities

162

Chapter 2: File Management

5. Click OK. The ENVI Tape to Output File dialog appears for each selected file to be read.

6. In the ENVI Tape to Output File dialog, select either File or Memory output.

7. Click OK to start the tape processing.

A status window informs you of tape processing progress for each image file. The bands in each file are added to the Available Bands List as the files are read.

Writing ENVI Files to Tape

Use Write ENVI File to Tape to write ENVI format files to tape while preserving their file structure and header information. The function requires the ENVI files are currently shown in the Available Bands List. If the files are not open, open them (see

“Opening Image Files” on page 61).

1. Select File

Tape UtilitiesRead/Write ENVI TapesWrite ENVI

File to Tape. The Output ENVI Files to Tape dialog appears.

2. Click Import ENVI File.

3. When the standard input file selection dialog appears, select a file and perform any spatial and/or spectral subsetting.

4. Click OK. The selected files appear in the Select ENVI Files to Output to

Tape list in the Output ENVI Files to Tape window.

Note

To select additional files, repeat steps 2 and 3.

5. To designate a different tape device, enter the device name in the Tape Device text box.

Note

If you designate a different tape device, allow your operating system enough time to register the new device before proceeding.

6. Click Accept. The ENVI Format - Load Tape window appears.

7. Select from the following options:

• To designate a different tape device, enter or choose a device.

• To change the tape record size, enter the values into the MaxRecsize text boxes.

Tape Utilities

ENVI User’s Guide

Chapter 2: File Management

163

Note

If you designate a different tape device, allow your operating system enough time to register the new device before proceeding.

8. Click OK to have ENVI sequentially output the selected files to tape in standard ENVI tape format.

A status window lists the progress as each file is written. The tape is rewound at the end of the processing.

Scanning Tapes and Customizing Dumps

Use Scan Tape and Customize Dump to scan a tape, to select files from tape, and to build a tape script that describes the tape contents. Use the script as is, edit it to combine specific tape records or files, and/or save the script for future use on identical tapes.

1. Select File

Tape UtilitiesScan Tape and Customize Dump. When the

ENVI Tape Dump Utility dialog appears, the default tape device is automatically listed in the Tape Device text box at the top of the window. To designate a different tape device, enter the device name in the Tape Device text box.

Note

If you designate a different tape device, allow your operating system enough time to register the new device before proceeding.

2. In the ENVI Tape Dump Utility window, select Options

Scan Tape. The

ENVI Tape Information Scan window appears as the tape is scanned and the current file number and the total number of bytes scanned on the tape are listed. As each file is completed, the tape information is shown in the ENVI

Tape Dump Utility dialog.

Note

To interrupt the tape scan at any time, click Interrupt Tape Scan at the bottom of the window (the interrupt may take a few seconds to register with the system). If the tape scan is interrupted, the information up to that point is shown and the tape is automatically rewound. In either case, the file number, the number of records, and the number of bytes per record are listed.

ENVI User’s Guide

Tape Utilities

164

Chapter 2: File Management

3. In the ENVI Tape Dump Utility dialog, select from the following options to select records and bytes and to edit their values:

• To edit values, click on an item in the list. Change the values as they appear in the corresponding text boxes and press the Enter key.

This allows combining files/records and selecting subsets of bytes to be read.

• To add new items to the dump list, enter new values in the text boxes and click the Add Entry button.

• To delete an entry from the list, click on the entry in the list and click

Delete Entry.

• To clear the list, select Clear Entries.

• To recall data from the previous scan, select Options

Restore Prev

Scan.

• To save the Tape Script to an ASCII text file, select File

Save Format and enter the desired filename. The default file extension is

.fmt

. (See

“Tape Script Format (.fmt)” in Appendix B).

• To recall previously saved Tape Scripts, select File

Restore Format and select the desired file.

4. In the ENVI Tape Dump Utility dialog, select Options

Dump Tape to read the tape. The Tape Dump Output Parameters dialog appears.

5. Use the arrow toggle button to select either Dump tape records to a single

output file or Dump each item to a separate output file.

6. Enter an output filename and click OK.

Note

If separate output files is selected, the output filename entered will be used as a base filename and the file number that is dumped is appended to the base filename. For example, if a filename of test

is entered and files 2 and 3 are dumped, they will be output as test_2

and test_3

.

As the tape is dumped, the status is displayed in the ENVI Dump Tape to Output File window.

Note

To interrupt the tape dump, click Interrupt Tape Dump.

Tape Utilities

ENVI User’s Guide

Chapter 2: File Management

165

Dumping Tape Data

To perform binary dumps of tapes to disk:

1. Select File

Tape UtilitiesDump Tape.

2. When the Dump Tape dialog appears, the default tape device is automatically listed in the Tape Device text box at the top of the window. The starting and ending file numbers to dump from the tape are listed in the text boxes next to the Dump Files text label.

3. To change the active tape device, enter the device name in the Tape Device text box.

Note

If you designate a different tape device, allow your operating system enough time to register the new device before proceeding.

4. Select output to a single output file or to separate files by clicking the appropriate toggle button.

5. Enter an output filename and click OK.

Note

If you select output to separate files, the output filename you enter is used as a base filename and the file number that is dumped is appended to the base filename. For example, if a filename of test

is entered and files 2 and 3 are dumped, they would be output as test_2

and test_3

.

As the tape is dumped, the status is displayed in the ENVI Dump Tape to Output File window.

Note

To interrupt the tape dump, click Interrupt Tape Dump.

ENVI User’s Guide

Tape Utilities

166

The Scan Directory List

Chapter 2: File Management

Use Scan Directory List to scan directories to locate and open files. ENVI provides recursive directory scanning, and allows you to select multiple files for opening. The geo-browser option allows map browsing of the locations of georeferenced images and opening of files based on their geographic location (see

“Opening Files with the

Geo-Browser” on page 168 ).

Figure 2-18: Directory Scan Dialog

Entering Directories into the Scan Directory List

1. Select File

Scan Directory List.

2. When the Directory Scan Dialog appears, enter a directory name or use the

Choose button to select a directory.

• To add the selected directory to the Selected Directories List, click Add.

• To add the directory and all its sub-directories to the Selected Directories

List, click Add Recursively. (A

+

(plus sign) appears before the name of all directories that will be scanned recursively.)

• To remove a directory from the Selected Directories List, highlight a directory name in the list and click Delete.

• To clear the directory list, click Clear.

The Scan Directory List

ENVI User’s Guide

Chapter 2: File Management

167

3. After ENVI lists all the directories to be scanned, click OK. The Scanned

ENVI Files dialog appears, containing a list of all the ENVI files found with the listed directories. You may open multiple files using the Scanned ENVI

Files dialog.

Figure 2-19: Scanned ENVI Files List

Note

If a header does not match its ENVI file, ENVI displays a warning message. The

Header Info: dialog appears so that you may enter the correct information. To ignore the file with the warning, click Cancel.

Managing Files in the Scanned ENVI Files List

In the Scanned ENVI Files dialog, use the File and Options menus to manage the

Scanned ENVI Files List.

Opening Files

To open the file and place the image bands in the Available Bands List:

1. Click on a file name.

2. Select File

Open File.

ENVI User’s Guide

The Scan Directory List

168

Chapter 2: File Management

Removing Files

To remove a single file from the list:

1. Click on a file name.

2. Select File

Remove File.

To remove all files from the list:

1. Click on a file name.

2. Select File

Remove All Files.

Adding New Directories

1. To add a new directory and allow yourself to select files from within that directory, select Options

Scan New Directory List.

2. The Directory Scan dialog appears.

Opening Files with the Geo-Browser

Use Geo Browser to scan files and open them based on their geographic location.

ENVI’s Geo-Browser allows map browsing of the locations of georeferenced images.

1. From within the Scanned ENVI Files dialog, select Options

Geo-Browser.

ENVI plots a world map with continent and country outlines. Within the

United States, state outlines also appear. The locations of georeferenced images (the location of the reference pixel designated in the ENVI header) are plotted on the world map as flags. For multiple files with the same location,

ENVI plots a different colored flag, with a number next to it showing the number of files at that location.

Note

The mouse cursor’s latitude and longitude appear in the upper left corner of the map.

2. Select from the following options:

• To change the size of the window, grab and drag one of the window corners.

• To center the map on a point, click the left mouse button.

• To zoom in on the map area, hold and drag the middle mouse button.

The Scan Directory List

ENVI User’s Guide

Chapter 2: File Management

169

• To zoom back out, click the middle mouse button.

• To identify the file corresponding to a flag, click the right mouse button near a flag.

Figure 2-20: ENVI’s Geo-Browser Zoomed on the United States

3. ENVI highlights the corresponding file in the Located Files List.

Note

For sites with multiple files, click the right mouse button multiple times to highlight each corresponding file.

4. After you have selected a file by highlighting it, select File

Open File to open it.

ENVI User’s Guide

The Scan Directory List

170

Working With Files and Scripts

Chapter 2: File Management

Changing Output Directories

To change the output default directory:

1. Select File

Change Output Directory.

2. When the Change Output Directory dialog appears, enter the full path of the directory to which you want ENVI to send its output.

3. Click OK to change the current output directory to the new path.

Saving Sessions to Scripts

Use Save Session to Script to save currently open image files, image displays, and their bands to an ENVI startup script. To execute this startup file see

“Executing

Startup Scripts” on page 170.

1. Select File

Save Session to Script.

2. When the Output ENVI Script Filename dialog appears, enter the startup filename (typically with the extension

.ini

).

Executing Startup Scripts

Use Execute Startup Script to open image files, load bands into displays, open vector files, and open ROI files when starting ENVI. This script is automatically executed when ENVI is started if a filename is set in the envi.cfg

file. It can also be executed at any time using the following procedure. A description of the ENVI startup script commands is given in

“ENVI Startup Script” in Appendix A.

1. Select File

Execute Startup Script.

2. Select the startup script filename and click OK.

Working With Files and Scripts

ENVI User’s Guide

Chapter 2: File Management

171

Restoring Display Groups

Use Restore Display Group to restore display groups that have been saved to a text

file. For detailed instructions, see “Restoring Saved Display Groups” in Chapter 4.

Closing all Files

1. When you have finished working with your files in ENVI, close them by selecting File

Close All Files.

Note

ENVI closes all disk files and removes all items from memory. Be sure to save all your important memory items to disk before using this procedure.

2. A warning message appears asking for confirmation. Click Yes.

ENVI User’s Guide

Working With Files and Scripts

172

Using the ENVI Queue Manager

Chapter 2: File Management

Use the ENVI Queue Manager to execute functions that have been queued (see

“Placing Un-executed Functions in Queue” on page 45).

Note

Results from one queued function (procedure) cannot be used as input into another.

1. Ensure that all of the files needed to run the queued functions (procedures) are opened and are listed in the Available Bands List.

2. From the ENVI main menu, select File

ENVI Queue Manager. The ENVI

Queue Manager dialog displays a list of all queued functions (procedures).

Figure 2-21: ENVI Queue Manager

3. In the Queued Procedures List, select by highlighting one or more procedures.

• To view information about a procedure in the Procedure Information field, click on the procedure name.

• To select all of the procedures, click Select All.

• To deselect all of the procedures, click Clear All.

• To delete a procedure, highlight it and click the Remove Selected button.

4. Click the Execute Selected button.

The executed function names are removed from the list. The resulting filenames appear in the Available Bands List.

Using the ENVI Queue Manager

ENVI User’s Guide

Chapter 2: File Management

Logging Processing Information

173

Use the ENVI Log Manager to save an ASCII log of all file-to-file processing. The log file contains all the function parameters and file names used and can be selectively turned on and off. See “Using ENVI Recording to Write Batch Code” in

Chapter 3 of the ENVI Programmer’s Guide manual for information on using the log script for batch processing.

1. Select File

ENVI Log Manager. The ENVI Log Manager dialog appears.

2. Click the On toggle button to start the logging. To turn off the logging, select the Off button.

3. Enter the output log filename or use the Choose button to select a filename.

Note

If the same name as a previous file name is used, the log will be appended to the bottom of the file.

4. Click OK to start the logging.

ENVI User’s Guide

Logging Processing Information

174

Setting ENVI Preferences

Chapter 2: File Management

Use Preferences to view information about the current configuration of ENVI or to change the current configuration. The Edit System Preferences dialog lists all of the values contained in the envi.cfg

file. Most entries are self-explanatory. For a complete description of each parameter, see

“The ENVI Configuration File” in

Appendix A.

1. Select File

Preferences. The System Preferences dialog appears with the parameters to be set under various category tabs.

2. Click on the tab of the preference category that you want to change. A different dialog appears depending on the which preference category you select.

Setting ENVI Preferences

Figure 2-22: Edit Configuration Values Dialog

ENVI User’s Guide

Chapter 2: File Management

175

• Use the User Defined Files tab to set user graphics colors file, color table file, menu files, map projection file, previous files filename, tape device name, the startup script filename, useradd text file, math expression file, user-defined move routine, and user-defined motion routine.

• Use the Default Directories tab to set the data, temporary, output, save_add, spectral library, and alternative header default directories.

• Use the Display Defaults tab to set the display window sizes, turn on/off image and zoom window scroll bars, set the zoom factor increment, zoom window interpolation, select which combination of windows to use, scroll/zoom graphics color, display default stretch, display retain value, set the scroll/zoom window position, and the 8-bit color division preferences.

You can also change the system graphics colors and system color tables from this dialog. For more information, see

“Editing System Color Tables” on page 177.

• Use the Plot Defaults tab to set the background and foreground colors, fonts, character size, axis thickness, the number of minor tick marks and length, window size, and margin sizes used in ENVI plot windows.

• Use the Grid Line Defaults tab to set the colors, fonts, character size, line thickness, and labels used in grid line plotting.

• Use the Previous Files List tab to edit the previous files list. Mark files as sticky by clicking on the filename and clicking the “Stick” On button.

Sticky files remain at the top of the previous files list and do not fall off as other files are opened. The curly bracketed symbol

{S}

appears to the left of the filename when a file is set as a sticky file. To remove the sticky file designation, highlight the sticky file (the file with the

{S}

marker) and click the “Stick” Off button. You can delete a file from the previous files list by highlighting the filename and selecting the Delete button. Use the

Reset button to reset the previous files list and remove all editing entries.

• Use the Miscellaneous tab to set the configuration name, the main menu orientation, maximum number of multilist items, maximum histogram bins, number of pull-down menu items, maximum vertices in memory, post script output parameters, turn on/off IDL command line blocking, set whether to exit IDL upon exit of ENVI, set whether to show a status window for input, set the auto apply option for interactive stretching, set whether to automatically append default extensions to filenames, set whether to automatically load default bands, set whether to open applicable files to memory, and set memory usage parameters.

ENVI User’s Guide

Setting ENVI Preferences

176

Chapter 2: File Management

See

“The ENVI Configuration File” in Appendix A for a complete description

of each parameter.

3. In the preference dialog, edit the parameters to suit your needs.

4. Click OK to save the changes for the current ENVI session.

5. At this point ENVI asks if you want to save the preferences to a file. To save the new preferences, click Yes.

6. To overwrite the current envi.cfg

file, click OK without entering a new filename; otherwise, enter the new configuration filename and click OK.

Editing System Graphic Colors

Use the Edit System Graphics Colors button in the Preferences dialog Display

Defaults tab to edit the current colors that ENVI uses for graphics. The colors are stored in the menu directory in the ASCII text file colors.txt

. ENVI uses this file unless a default graphic colors file is entered in the envi.cfg

file.

Tip

To add new colors to the graphic colors file, use a text editor to append the colors to

the end of the file (see “ENVI Graphic Colors File” in Appendix B).

1. Select File

Preferences to bring up the System Preferences dialog. In the

System Preferences dialog, click on the Display Defaults tab and click the

Edit System Graphics Colors button. The Edit Graphic Colors dialog appears.

2. In the Graphic Colors: list box, click on the color to be edited.

Warning

It is not advised to change any of the first 5 colors (black, white, red, green, blue) because they are used in the ENVI system. Changing graphic colors may affect previously saved graphic overlays.

• To change the color name, enter the name in the Color Name text box.

• To change the color, select a color system from the button menu and use the slider bars to adjust the variables.

• To reset all colors to their original values, click Reset.

• To exit the function without applying the changes, click Cancel.

3. Click OK to apply the changes.

Setting ENVI Preferences

ENVI User’s Guide

Chapter 2: File Management

177

4. When the prompt appears, select one of the following options.

• To permanently apply the color changes, select Yes.

• To change the colors for the current ENVI session only, select No.

Editing System Color Tables

Use the Edit System Color Tables button on the Preferences dialog Display

Defaults tab to define new color tables, save them to ENVI’s current list of color tables, and delete color tables from the current list. You can work in RGB (red-greenblue), HLS (hue-lightness-saturation), or HSV (hue-saturation-value) color spaces and define tables using user-defined interpolation paths. In addition, you can choose specific colors from a color palette for defined regions of the color table or make a ramp to fill the color table.

Tip

Editing Color Tables works best when your monitor display is set to 16-bit or higher color mode (it will function in 8-bit color mode, but the colors will not appear as exact).

1. To ensure that all colors are available, close all display and plot windows.

2. Select File

Preferences to bring up the System Preferences dialog.

3. In the System Preferences dialog, click on the Display Defaults tab and click the Edit System Color Tables button. The ENVI Color Table Editor dialog appears.

The current color table is displayed as a narrow gradiated color bar on the left side of the dialog. A white positioning arrow appears at the far left and far right

ENVI User’s Guide

Setting ENVI Preferences

178

Chapter 2: File Management

ends of the color bar next to the color palette. The current system colors are displayed in the Color Palette Selection widget.

Figure 2-23: ENVI Color Table Editor Dialog

4. Select a color system (RGB, HLS, HSV) from the button labeled System. The color palette and color bar reflect the system change.

5. Select from the following options when defining the color table.

• To keep one color or element constant (i.e., red in RGB or lightness in

HLS), click on the toggle button next to the slider bar of that value. The two remaining colors represent the horizontal and vertical axes of the color palette.

• To move points on the interpolation line, click on a point on the line with the left mouse button and drag to the new position.

• To add points to the interpolation path through the colors, click on a position in the color palette with the middle mouse button.

• To remove points from the interpolation line, click the right mouse button on the square interpolation points.

Setting ENVI Preferences

ENVI User’s Guide

Chapter 2: File Management

179

• To designate whether the color table automatically reflects the changes made as you move the interpolation line, select On or Off using the

Update Color Table arrow toggle button.

• To see the values of a specific color, click on the color with the left mouse button. The circle cursor jumps to that location on the palette and the slider bars show the new values.

• To identify the color represented by a combination of values, move the slider bars of the values or use the arrow increment buttons to change them. The circle cursor moves to the corresponding location on the color palette.

Defining Colors and Making Ramps

To define colors or make a color ramp for specific ranges of the output color table, do the following:

1. Click on the left positioning arrow (the white arrow at the far left corner of the gradiated color bar) of the color table and drag it to the new lower location, or enter the lower value in the Pos1 text box.

2. Select the color to be the lower value by clicking with the left mouse button on the color in the color palette.

3. Click Replace.

4. Click on the right positioning arrow on the color table and drag it to the new upper location, or enter the upper value in the Pos2 text box.

5. Select the color to be the upper value by clicking with the left mouse button on the color in the color palette. You may select the same color as the upper and lower value.

6. Click the Interp button to fill in the colors between the new values.

• Click Reset to reset the color table to a grayscale image.

• To clear the positioning arrows, click Clear.

Adding Color Tables to ENVI

To add the new color table to the current list of ENVI color tables:

1. In the ENVI Color Table Editor, click Add Current as New Color Table.

2. When the Add Color Table dialog appears, enter a name into the text box and click OK.

ENVI User’s Guide

Setting ENVI Preferences

180

Chapter 2: File Management

Tip

If you do not have permission to write to the colors1.tbl

file, you will be prompted to enter a new color table filename.

Setting a New Color Table File

To use the new color table file in ENVI:

1. Select File

Preferences to bring up the System Preferences dialog.

2. In the System Preferences dialog, click the User Defined Files tab.

3. In the Color Table File text box, enter the new color table filename.

4. Click OK.

Deleting Existing Color Tables

To delete existing color tables from the color table list:

1. In the ENVI Color Table Editor, click Delete Existing Color Tables. The

Delete Existing Color Tables dialog appears with a list of all the system color tables.

2. Click on the color table names that you want to remove.

Note

To select multiple color tables from the list, see “Selecting Multiple Items in

Lists” on page 43).

3. Click OK.

Note

If you do not have permission to write to the colors1.tbl

file, you will be prompted to enter a new color table filename.

Importing Color Tables from ASCII Files

1. In the ENVI Color Table Editor, click Import Color Table from ASCII.

2. Select an input filename.

Note

The input file must be an ASCII file containing 256 lines, each containing 3 columns of red, green, and blue values.

Setting ENVI Preferences

ENVI User’s Guide

Chapter 3:

Display Management

This chapter covers the following topics:

The Window Menu . . . . . . . . . . . . . . . . . . 182

Using the Window Finder . . . . . . . . . . . . . 183

Starting New Displays . . . . . . . . . . . . . . . . 184

Starting New Vector Windows . . . . . . . . . 184

Starting New Plot Windows . . . . . . . . . . . 184

The Available Files List . . . . . . . . . . . . . . . 185

The Available Bands List . . . . . . . . . . . . . 189

ENVI Image Display Windows . . . . . . . . 199

The Available Vectors List . . . . . . . . . . . . 212

ENVI Vector Windows . . . . . . . . . . . . . . . 220

Tools for Maintaining Your Display . . . . . 224

ENVI User’s Guide

181

182

The Window Menu

Chapter 3: Display Management

Use the Window menu to control ENVI display and plot windows, including starting new windows, maximizing window sizes, linking display windows, and closing windows. Use it to access the Available Bands List and the Available Vectors List to display bands and vector layers. Also use the Window menu to view display information, to view cursor locations and pixel values for displayed images, to collect points from display windows, and to open the Window Finder.

Figure 3-1: Window Menu

The Window Menu

ENVI User’s Guide

Chapter 3: Display Management

Using the Window Finder

183

Use the Window Finder to manage active ENVI windows and dialogs and to bring windows that have been iconized or buried under other windows to the foreground.

The list contains the names of major active windows in the order that they were opened. The list includes display window groups (Main, Scroll, Zoom), plot windows, scatter plots, ROI definition windows, etc.

1. Select Window

Window Finder. The ENVI Window Finder appears with the names of opened windows displayed in a list.

Figure 3-2: Window Finder

2. To call a window to the foreground of your desktop, click on the name of a window.

• Clicking on the name of a specific display number brings the Main Image window and its associated Scroll and Zoom windows to the front.

• Clicking on any other window name brings that window to the front.

• If you click on the name of an overlay dialog (Annotation, ROI, Density

Slice, etc.) that was hidden using Overlay

Hide Layer, double-clicking the dialog name hides the dialog again. For details about hiding dialogs,

(see

“Showing and Hiding Overlay Dialogs and Layers” in Chapter 4).

Note

The ENVI Window Finder always moves to the front of the display if bringing an ENVI window forward causes it to be covered. If the ENVI

Window Finder is lost behind another window, select Window

Window

Finder to bring it to the front again.

3. Close the ENVI Window Finder by selecting File

Cancel.

ENVI User’s Guide

Using the Window Finder

184

Starting New Displays

Chapter 3: Display Management

To start a new, independent image display window:

• select Window

Start New Display Window from the Display menu or from the ENVI main menu.

Each window started is numbered sequentially starting with Display #1. Display windows may also be started using the New Display option in the Available Bands

List (see

“Selecting the Active Display” on page 190).

Starting New Vector Windows

To start a new and independent Vector window:

• select Window

Start New Vector Window.

Each window is numbered sequentially starting with Vector Window #1. New vector windows may also be started using the Options menu in the Available Vectors List

(see

“Opening New Vector Windows” on page 214).

Starting New Plot Windows

To start a new and independent plot window:

• select Window

Start New Plot Window.

New plots may also be started using the Options menu in any plot window (see

“Creating New Plot Windows” in Chapter 4).

Starting New Displays

ENVI User’s Guide

Chapter 3: Display Management

The Available Files List

185

Use the Available Files List to get information about the files that are currently open in ENVI and stored in memory. Also, use the Available Files List to open new files, close files, save memory items to disk, and edit ENVI headers.

Tip

Use the Available Files List on a regular basis to remove memory-only calculations from system memory.

To display a list of all the currently open image files:

• Select Window

Available Files List.

Figure 3-3: Available Files List

Obtaining File Information

Use this procedure to view important information about each file. In the Available

Files List, click on a filename.

ENVI User’s Guide

The Available Files List

186

Chapter 3: Display Management

ENVI displays information and parameters from the ENVI header file, including the full path and image name; the number of lines, samples, and bands (Dims); the file size; the interleave (BSQ, BIL, BIP); the data type (byte, integer, etc.); the file type; the byte order of the data (Host or Network); and whether or not the data is georeferenced and if any wavelengths are associated with the bands.

Options in the Available Files List

Use the Options menu to edit file headers (see

“Editing ENVI Headers” on page 104

for details).

1. From within the Available Files List, click on the filename.

2. Select Options

Edit Header.

3. When the Header Info: dialog appears, change parameters and click OK to save the changes.

Managing Files from the Available Files List

Use the File menu options to open new files, close files, add files to memory, delete memory items, delete files from disk, and save memory items to disk.

The Available Files List

Figure 3-4: Available Files List File Menu Selections

ENVI User’s Guide

Chapter 3: Display Management

187

Opening New Files

1. From within the Available Files List, select File

Open New File.

2. When the file selection dialog appears, select the file and click OK.

• To select a group of files that are listed consecutively, click on the first file in the group, press and hold the Shift key, and click the last file in the group. Or, click and drag with the left mouse button to select the desired group.

• To select multiple files that are not listed consecutively, press and hold the

Ctrl key on your keyboard and click on each desired file.

ENVI opens the file and adds it to the Available Files List. The file information appears in the right side of the dialog.

Closing all Files

To close all files (including memory items, which are automatically deleted):

• Select File

Close All Files from within the Available Files List.

Deleting Memory Items

To remove files that exist only in memory without closing open disk files:

• Select File

Delete All Memory Items from within the Available Files List.

Warning

Memory items removed in this fashion are not recoverable.

Storing Files in Memory

Image files can be stored as an in-memory item for faster processing of large images.

Note

This option is dependent on the amount of RAM available on your system.

1. From the main ENVI menu bar, select Window

Available Files List.

2. In the Available Files List, click on a filename to select it. You can Shift-click to select multiple filenames inclusively, or Ctrl-click to select discontiguous filenames in the Available Files List.

3. Next, select File

Add Selected Files to Memory.

ENVI User’s Guide

The Available Files List

188

Chapter 3: Display Management

All selected image files, including their parameters, will be added as in-memory items to the Available Bands List.

Saving Memory Files to Disk

1. In the Available Files List, click on the item to be saved.

2. In the Available Files List, select File

Save Selected File to Disk.

3. When the Memory to File Storage dialog box appears, enter an output filename and click OK.

Deleting Files from Disk

1. In the Available Files List, click on the item to be deleted.

2. Select File

Delete Selected File from Disk. Because this is a permanent action, a warning message appears to verify that you want to permanently delete the file.

3. Click Yes to delete the file.

Closing Selected Files

1. In the Available Files List, click on the item to be closed.

2. Select File

Close Selected File.

Note

If a warning box appears, it means that one or more bands from the file are currently displayed in one of the active display windows. Select Yes to close the file and to remove the associated bands from the display.

If the file is a memory item, it is removed from memory and any associated displays are closed.

Closing the Available Files List

To close the Available Files List:

• Select File

Cancel.

The Available Files List

ENVI User’s Guide

Chapter 3: Display Management

The Available Bands List

189

Use Available Bands List to open the Available Bands List. Use the Available Bands

List to access the files and the individual bands of each image file that has been opened during the current session. From the Available Bands List, display grayscale and color images, start new display windows, open new files, close files, view meta file components, and view displayed band information.

When you open a file for the first time during a session, ENVI automatically places the filename, with all of its bands listed beneath it, into the Available Bands List

( Figure 3-5

). If multiple files are opened, all of the files with all of the bands appear in the Available Bands List sequentially, with the most recently opened file at the top of the list. The bands of the files can be folded back into the filename to shorten the list.

ENVI User’s Guide

The Available Bands List

190

Chapter 3: Display Management

To make the Available Bands List active, select Window

Available Bands List.

Figure 3-5: Available Bands List: Grayscale Band; RGB Bands

Selecting the Active Display

ENVI allows you to have multiple display windows open, with any combination of grayscale and color images displayed. When you load images, you can select an existing display or a new display to use for displaying your new images. The selected display is called the active display.

The Available Bands List

ENVI User’s Guide

Chapter 3: Display Management

191

When no display window is open, the button at the bottom of the Available Bands

List reads No Display. The first image loaded automatically appears in a new window.

1. In the Available Bands List, click on the Display #X button menu (where X is the number corresponding to the number in a display window’s title bar) and select the display from the list.

2. To start a new display, select New Display from the button menu.

3. Click Load Band or Load RGB to load the selected bands into the active display.

Displaying Color Composite Images

Note

If default bands to load have been set in the image header (

.hdr

) file, you do not need to use the Available Bands List—the color image will be automatically loaded into a display group as soon as the file is opened. For details, see

“Setting Default

Bands to Load” on page 110.

1. In the Available Bands List, select the RGB Color toggle button.

2. Click in sequence on the red, green, and blue bands to be displayed (or on individual R, G, or B bands using the toggle buttons). If necessary, change the active display (see

“Selecting the Active Display” on page 190).

3. Once the band names have been loaded into the text boxes labeled R, G, and B, click the Load RGB button to load the bands into the current active image

display (see “Selecting the Active Display” on page 190).

Tip

You can also load the image by double-clicking the blue bandname in the list

of available bands, or by using the shortcut menu (see “Available Bands List

Shortcut Menu” on page 192).

A status window displays the progress of the operation.

Note

To cancel loading the bands into a display, click the Cancel button in the status window. The display window will be blank.

After the bands are successfully loaded, a Main Image window, Zoom window, and

Scroll window (for large images) appears. ENVI displays all images with a default

ENVI User’s Guide

The Available Bands List

192

Chapter 3: Display Management

2% linear stretch. You may change the default stretch in the envi.cfg

file (see

“The

ENVI Configuration File” in Appendix A), or by setting a default stretch in the image

header file.

Available Bands List Shortcut Menu

The Available Bands List has a shortcut menu for easy access to common Available

Bands List functions. For descriptions of the individual functions, see the following sections.

1. To use the shortcut menu, right-click on any filename, bandname, or map info label. The shortcut menu items differ depending on which item in the Available

Bands List is used to initiate the shortcut menu.

2. From the shortcut menu that appears, select a menu command.

Figure 3-6: Available Bands List: File and Band Shortcut Menus

The Available Bands List

ENVI User’s Guide

Chapter 3: Display Management

193

Editing a Header File Using the Shortcut Menu

To view or edit the header associated with a file, right-click on the filename in the

Available Bands List and select Edit Header from the shortcut menu.

Editing Map Information

If a file has map information associated with it, you can view or edit this information.

To view or edit the map information associated with a file, right-click on the Map

Info label in the Available Bands List and select Edit Map Information from the shortcut menu.

Displaying True Color or Color Infrared Images

If a file has wavelengths for each band stored in the header and that file contains bands in the needed wavelength ranges, you can automatically display a true color image or a color infrared image directly from the Available Bands List without having to designate the individual bands for red, green, and blue.

Note

If your data does not have bands in the needed wavelengths, the bands nearest to the wavelengths will be used. This may produce a grayscale image if red, green, and blue are set to the same band.

The true color image is made by displaying the band in the red wavelength region

(0.6-0.7

µm) in red, the band in the green region (0.5-0.6 µm) in green, and the band in the blue region (0.4-0.5

µm) in blue. The color infrared (CIR) image is made by displaying the band in the near infrared wavelength region (0.76-0.9

µm) in red, the band in the red region in green, and the band in the green region in blue.

To automatically display a true color or color infrared image in the current display window, right-click on a filename in the Available Bands List.

• Select Load True Color to <current> or Load CIR to <current> from the shortcut menu.

To automatically display a true color or color infrared image in a new display window, right-click on a filename in the Available Bands List.

• Select Load True Color to <new> or Load CIR to <new> from the shortcut menu.

ENVI User’s Guide

The Available Bands List

194

Chapter 3: Display Management

Displaying Grayscale Images

Note

If default bands to load have been set in the image header (

.hdr

) file, you do not need to use the Available Bands List to initiate a display — the grayscale image will be automatically loaded into a display group as soon as the file is opened. For details, see

“Setting Default Bands to Load” on page 110.

1. In the Available Bands List, select the Grayscale toggle button.

2. Click on the input band name. The band name appears in a small text box labeled Selected Band.

Note

If necessary, change the active display (see

“Selecting the Active Display” on page 190).

3. Click Load Band to load the band into a new or current display.

Tip

You can also load the grayscale image by double-clicking the bandname.

A status window displays the progress of the operation.

Note

To cancel loading the band into a display, click the Cancel button in the status window. The display window will be blank.

After the band is successfully loaded, a Main Image window, Zoom window, and/or

Scroll window (for large images) appears depending on your default display window style. ENVI displays all images with a default 2% linear stretch. You may change the default stretch in the envi.cfg

file, or by setting a default stretch in the image

header file (see “Editing ENVI Headers” on page 104).

The Available Bands List

ENVI User’s Guide

Chapter 3: Display Management

195

Options in the Available Bands List

Use the Options menu in the Available Bands List to select a band by wavelength to display information about displayed bands, and to fold, all bands of each data set into single layers in the Available Bands List.

Locating Bands by Wavelength

For files with associated wavelength values in the file header, use the Wavelength

Locator to locate the band that contains a desired wavelength.

1. From the Available Bands List, select Options

Wavelength Locator.

2. When the Wavelength Locator dialog appears, enter the wavelength you want to locate and click Apply.

The band containing that wavelength is highlighted in the Available Bands List.

Note

To close the Wavelength Locator dialog, click the Cancel button.

Showing Displayed Band Information

To display the names and wavelengths of the bands being used in an image display:

1. In the Available Bands List, select the display from the Display #n button menu.

2. Select Options

Show Current Displayed Bands.

The band information appears in the R, G, and B, or Selected Band (for grayscale) text boxes.

Folding Bands

In the Available Bands List and other band selection dialogs, there may be many bands listed, especially when using hyperspectral data. You can fold or hide all of the bands of a data set so that they appear on only one line. This keeps the lists shorter and easier to work with.

Note

If a band is currently displayed in either a grayscale or RGB image, an asterisk ( * ) appears next to the filename when it is folded.

ENVI User’s Guide

The Available Bands List

196

Chapter 3: Display Management

Folding a Single Data Set

Data sets are loaded into the Available Bands List and other band selection dialogs in an unfolded state by default. The names of unfolded data sets appear in this format:

-<filename>

Band

Band

• To fold a data set, click on the filename of the data set. All of the bands of the data set are compressed and the data set appears in the list in this format:

+<filename>[number of bands]

• To unfold a data set and make it available for display, simply click the folded filename.

Folding all Data Sets

• In the Available Bands List, select Options

Fold All Files, or right-click and use the shortcut menu. All of the bands of all of the data sets are compressed and each data set appears in the list in this format:

+<filename>[number of bands].

• To unfold a data set, click on the folded filename.

The Available Bands List

ENVI User’s Guide

Chapter 3: Display Management

197

• To unfold all data sets, right click in the list of files and select Unfold All

Files from the shortcut menu.

Figure 3-7: Available Bands List with Folded and Unfolded Data Files

Managing Image Files from the Available Bands List

Use the File menu in the Available Bands List to open new image files, list open files, and close files.

Opening Files

To select a new file to open, do the following:

1. In the Available Bands List, select File

Open Image File.

2. When the Enter Data Filename dialog opens, select your new file.

Note

To display a list of all open files use the Available Bands List to select File

Available Files List (see

“The Available Files List” on page 185).

ENVI User’s Guide

The Available Bands List

198

Chapter 3: Display Management

Closing Files

Use Close Selected File or Close All Files to remove memory files or to close disk files from the Available Bands List.

Closing Selected Files

To close the file associated with the bands currently displayed in the Selected Band text box or in the R, G, and B text boxes:

• Select File

Close Selected File from the Available Bands List menu; or

• Right-click in the displayed file list and select Close Selected File.

Tip

If you close one band from a disk file, ENVI closes the entire file and all of the bands in the file disappear from the Available Bands List. However, the file still exists on disk, and you can reopen it using File

Open Image File.

Closing All Files

To close all files in the Available Bands List and delete any items in memory:

1. Select File

Close All Files. A warning dialog appears.

Note

Once a memory file is deleted, there is no way to recover the image.

2. In the warning dialog, click Yes.

Hiding the Available Bands List

To remove the Available Bands List from view while keeping the files it contains open and the bands available:

• Select File

Cancel.

To recall the Available Bands List at any time:

• Select Window

Available Bands List from the ENVI main menu.

The Available Bands List

ENVI User’s Guide

Chapter 3: Display Management

ENVI Image Display Windows

199

When you display an image file, it is placed in an ENVI image display group, which consists of a Main Image window, a Zoom window, and/or a Scroll window (Scroll windows for larger images only). The windows included in the default display group

are controlled by the Display Window Style option in the preferences (see “Display

Window Shortcut Menu” on page 210). Multiple image display groups can be on the

screen at once, but only one display group is active (see

“Selecting the Active

Display” on page 190).

Note

Mouse functions change within each type of window. Mouse button function descriptions for each window type are included in the following sections.

The Main Image Window

The Main Image window displays a portion of an image at full resolution. The window is automatically created the first time you open an image.

To open a new display group, select from the following options:

• In a Main Image window or from the ENVI main menu, select Window

Start New Display.

• In the Available Bands List, click New Display (see

“Selecting the Active

Display” on page 190).

ENVI User’s Guide

ENVI Image Display Windows

200

Chapter 3: Display Management

Figure 3-8: Main Image Window for Display #1 with Zoom Window Indicator

Resizing the Main Image Window

Select one of the following options to change the size of the Main Image window:

• Dynamically resize the Main Image window up to available screen size by grabbing one of the corners and dragging to the desired image size.

• In the Main Image window, select File

Preferences and enter the size in the

Display Defaults dialog (see

“Resizing Windows” in Chapter 4).

• Change the default window size parameters set in the envi.cfg

configuration file (see

Appendix A, “Installing and Customizing ENVI”

).

ENVI Image Display Windows

ENVI User’s Guide

Chapter 3: Display Management

201

Displaying Image Window Scroll Bars

Use the scroll bars in the border of the Main Image window to move around the image. When you move the scroll bars, the graphic box in the Scroll window moves to show you what part of the whole image you are in. There are three ways to display the Image window scroll bars:

Displaying Scroll Bars at all Times

1. Select File

Preferences.

2. In the Edit System Preferences window, select the Display Defaults tab.

The Preferences: Display Defaults dialog box appears.

3. Click the Image Window Scroll Bars arrow toggle button to select Yes.

4. Click OK.

5. In the Edit System Preferences window, select File

Save Configuration.

Note

To exit without saving, select File

Cancel.

6. Enter an output filename and click OK.

Turning Display Scroll Bars On/Off

1. Right-click in the Main Image window and select Toggle

Display Scroll

Bars or in the Main Image window, select File

Preferences. The Display

Preferences dialog appears.

2. In the Image Window section of the dialog, click the Scroll Bars arrow toggle button to select Yes or No.

3. Click OK.

ENVI User’s Guide

ENVI Image Display Windows

202

Chapter 3: Display Management

Controlling the Zoom Window from the Main Image Window

In the Main Image window, the Zoom Window Indicator box outlines the area that is displayed in the associated Zoom window.

• To change the region defined by the zoom box, click-and-drag the box (the

Zoom Window Indicator) around the Main Image window.

• Use the arrow keys on the keyboard to move the zoom window pixel-by-pixel in the direction of the arrow. Use Shift + arrow to move the image window five pixels in the direction of the arrow.

Note

Some interactive processes change the mouse functions listed in the following table.

These processes include defining Regions-Of-Interest (ROIs), Annotation, Vector

Overlay, and Dynamic Overlay. These functions may be turned off to restore the mouse buttons to their normal operation. To see which function has control of the mouse, see

“Displaying Mouse Button Descriptions” on page 224.

The Display Menu

Use the Display menu bar in the Main Image window to select common interactive display functions. When a function is selected from one of the Display menus, the function applies only to the active display (see

“The Display Menu Bar” on page 230).

Tip

You can access many Display menu interactive functions from the Main Image and

Zoom window shortcut menu. For details, see

“Display Window Shortcut Menu” on page 231.

ENVI Image Display Windows

ENVI User’s Guide

Chapter 3: Display Management

Mouse Button Functions in the Main Image Window

203

Mouse Button

Left Button

Middle Button

Right Button

Function

• Click inside the Zoom window indicator and drag it to a new location. The Zoom window updates when the button is released.

• Click to center the Zoom window indicator over the current pixel position. Continue to hold the button and drag to continuously update the Zoom window.

• Double-click in the Main Image window to display the

Cursor Location/Value dialog.

No function.

Click to display the shortcut menu.

Table 3-1: Functions of the Mouse Buttons in the Main Image Window

The Zoom Window

The Zoom window is a small image display window that displays a portion of the image at a user-defined zoom factor. The Zoom window provides you with virtually unlimited zoom capabilities such as zooming in or out and panning.

Tip

You can access many Zoom window and Main Image Display menu functions from the Zoom window shortcut menu. For details, see

“Display Window Shortcut

Menu” on page 231.

The Display Menu

Use the Display menu bar in the Zoom window to select common interactive display functions. When a function is selected from one of the Display menus, the function applies only to the active display (see

“The Display Menu Bar” on page 230).

ENVI User’s Guide

ENVI Image Display Windows

204

Chapter 3: Display Management

Resizing the Zoom Window

To resize the Zoom window, select from the following options:

• Dynamically resize the Zoom window by grabbing one of the corners and dragging it to the desired image size. The corresponding Zoom window indicator box in the Main Image window automatically changes its size and shape to match the displayed Zoom window.

• In the Display menu, select File

Preferences and enter the size in the

Display Preferences dialog (see

“Resizing Windows” on page 236).

• Change the default Zoom window size parameters set in the envi.cfg

configuration file (see

Appendix A, “Installing and Customizing ENVI”

).

Scrolling the Zoom Window

• Use the arrow keys on the keyboard to move the Zoom window by one pixel in the direction of the arrow.

• Use Shift + arrow to move the Zoom window by five pixels in the direction of the arrow.

Displaying Zoom Window Scroll Bars

Use the scroll bars in the border of the Zoom window to move around the image.

When you move the scroll bars, the graphic box in the Scroll window moves to show you what part of the whole image you are in. There are three ways to display the

Zoom window scroll bars:

Displaying Scroll Bars at all Times

1. Select File

Preferences.

2. In the Edit System Preferences window, select the Display Defaults tab.

The Preferences: Display Defaults dialog box appears.

3. Click the Zoom Scroll Bars arrow toggle button to select Yes.

4. Click OK.

5. In the Edit System Preferences window, select File

Save Configuration.

Note

To exit without saving, select File

Cancel.

6. Enter an output filename and click OK.

ENVI Image Display Windows

ENVI User’s Guide

Chapter 3: Display Management

205

Turning Display Scroll Bars On/Off

1. Right-click in the Zoom window and select Toggle

Display Scroll Bars or in the Zoom window, select File

Preferences. The Display Preferences dialog appears.

2. In the Zoom Window section of the dialog, click the Scroll Bars arrow toggle button to select Yes or No.

3. Click OK.

Controlling the Zoom Factor of the Zoom Window

The current zoom factor is displayed as a number in parentheses in the Zoom window title bar. The default zoom factor is 4.

Zoom Out

Zoom In

Turn Crosshairs On/Off

Figure 3-9: ENVI Zoom window with Symbol Boxes

Use the different mouse buttons and the Symbol boxes in the Zoom window to change the zoom factor and to turn the display crosshairs on and off in both the Zoom

ENVI User’s Guide

ENVI Image Display Windows

206

Chapter 3: Display Management

and Main Image windows. The following table describes the Zoom window’s symbol functions and associated mouse button descriptions.

Zoom Window

Symbol

Plus

Function

Minus

Crosshair Box

Click with left mouse button to increase zoom factor by 1.

Click with middle mouse button to double the zoom factor with each click (i.e., 2, 4, 8, 16...).

Click with right button to return to the default zoom factor of 4.

Click with left mouse button to decrease zoom factor by 1.

Click with middle mouse button to decrease zoom factor by half.

Click with right mouse button to return to the default zoom factor of 4.

Click with left mouse button to toggle crosshairs on and off in Zoom window.

Click with middle mouse button to toggle crosshairs on and off in the Main Image window.

Click with right mouse button to toggle the zoom box and crosshairs in the Main Image window on and off.

Table 3-2: The Zoom Window Symbol Functions with Mouse Button

Descriptions

ENVI Image Display Windows

ENVI User’s Guide

Chapter 3: Display Management

207

Mouse Button Functions in the Zoom Window

In addition to the mouse button functions associated with the Zoom window symbol boxes and controlling the zoom factor, the left and right mouse buttons perform differently when clicked anywhere else inside the Zoom window (not on the symbol boxes). The following table describes those functions.

Mouse Button

Left Button

Middle Button

Right Button

Function

Click on desired pixel to center the Zoom window on that pixel.

or:

Click and hold to pan from the center of the window in the direction of the cursor location. (The speed of the pan varies with the cursor’s distance from the center of the Zoom window — the closer the cursor is to the center, the slower the pan.)

No function.

Click to display the shortcut menu.

Table 3-3: Mouse Button Functions Inside the Zoom Window

Controlling Zoom Window Interpolation

You can set your preference for what kind of interpolation is used in the Zoom window. The default setting is pixel replication, also known as nearest neighbor. Set the interpolation by clicking the right mouse button in the Zoom window and making a selection from the Zoom Interpolation menu or set it through the System

Preferences dialog as follows:

1. In the Display menu, select File

Preferences.

2. From the Zoom Interp button menu, select the interpolation method: Nearest

Neighbor, Bilinear, Bicubic, or Optimized Bicubic.

Note

Nearest neighbor uses pixel replication; bilinear does a linear interpolation using 4 pixels; bicubic uses 16 pixels for the interpolation; optimized bicubic provides the best interpolation.

ENVI User’s Guide

ENVI Image Display Windows

208

Chapter 3: Display Management

Note

When you use the Cursor Location/Value window to view values in the Zoom window, the values you see reported are from the original data, not the interpolated data.

The Scroll Window

The Scroll window is a small image display window that appears when the display window style is set to Scroll/Zoom or Scroll/Image/Zoom and the main image is larger than can be displayed in the Main Image window at full resolution. The image in the Scroll window is displayed at subsampled resolution. The resampling factor appears in parenthesis in the title bar. The Main Image window indicator appears as a box within the scroll window and outlines the area that is displayed in full resolution in the Main Image window.

Resizing the Scroll Window

To resize the Scroll window, select one of the following options:

• Dynamically resize the Scroll window by grabbing a corner and dragging to the desired image size. The resampling factor changes to reflect the new size of the scroll window.

• In the Display menu window, select File

Preferences and enter the size in the Display Preferences dialog (see

“Resizing Windows” on page 236).

• Change the default Scroll window size using the parameters set in the envi.cfg

configuration file (see Appendix A, “Installing and Customizing

ENVI”

).

Controlling the Main Image Window from the Scroll Window

The size of the Main Window Indicator box in the Scroll window is directly linked to the size of the Main Image window. If you change the size of the Main Image window, the Main Image window indicator will also change sizes. If you have the display window style set to Scroll/Image/Zoom and you resize the Main Image window so that the entire image appears at full resolution, the Scroll window will disappear because it is no longer needed. If you subsequently resize the Main Image

ENVI Image Display Windows

ENVI User’s Guide

Chapter 3: Display Management

209 window so that the full image cannot be shown at full resolution, the Scroll window automatically reappears.

Figure 3-10: Scroll Window with Main Image Window Indicator Box

• Use the arrow keys on the keyboard to move the image window by one scroll pixel in the direction of the arrow. Use Shift + arrow to move the image window in larger increments in the direction of the arrow.

• To control the location of the Main Image window indicator, follow the

directions given in “Mouse Button Functions in the Scroll Window” on page 210.

Scroll Window Meta Zoom

When very large images are displayed, the Scroll window image may be subsampled so much that it is difficult to see image features. The Scroll window Meta Zoom capability allows you to zoom into an area and reduce the subsampling factor in the

Scroll window. The zoomed area replaces the full image in the Scroll window and scroll bars appear. The original Scroll window image can be re-displayed with a mouse click (see

“Mouse Button Functions in the Scroll Window” on page 210 for

mouse button functions).

Note

The Scroll window meta zoom will not zoom if the area selected is smaller than the current Main Image window size.

ENVI User’s Guide

ENVI Image Display Windows

210

Chapter 3: Display Management

To zoom in the Scroll window:

• Click and drag using the middle mouse button to draw the meta zoom indicator box around the desired area. This area replaces the image in the Scroll window.

To display the original full image in the Scroll window:

• Click the right mouse button in the Scroll window and select Reset Scroll

Range from the shortcut menu.

Mouse Button Functions in the Scroll Window

The following table outlines the mouse button functions in the Scroll window.

Mouse Button

Left Button

Middle Button

Right Button

Function

Click anywhere outside the Main Image window indicator box in the Scroll window and drag. The Zoom and Main Image windows update continuously.

Click, drag, and release the Main Window indicator box to reposition the Main Image. The Zoom and Main Image windows update when you release the mouse button.

or:

Click to center the Main Image indicator box and Main Image display over the selected pixel.

Click and drag meta zoom box.

Click to display the shortcut menu.

Table 3-4: Mouse Buttons Functions Inside the Scroll Window

Display Window Shortcut Menu

Use the shortcut menu in any of the three display windows to quickly access Display window options.

1. To use the shortcut menu, right-click anywhere in any of the three display windows.

2. Select from the following options:

• Use Display Window Style to select which of the three display windows

(Image, Scroll, and Zoom) are shown.

ENVI Image Display Windows

ENVI User’s Guide

Chapter 3: Display Management

211

• Use Scroll/Zoom Position to place the Scroll and Zoom windows in the desired position with respect to the Image window and to turn the Auto

Placement option off or on.

• Use <Find Display> to locate the closed display windows associated with the current display window.

Positioning the Zoom and Scroll Windows

To position the Zoom and Scroll windows with respect to the Main Image window:

• Select Scroll/Zoom Position from the shortcut menu.

To position the Zoom or Scroll window:

• Click the title bar and drag the window while holding the left mouse button.

To group the Zoom and Scroll windows to move with the Main Image window:

• Deselect the Scroll/Zoom Position

Auto Placement Off option in the shortcut menu. To ungroup the window, set Scroll/Zoom Position

Auto

Placement Off in the shortcut menu.

Locking Window Placement

To ensure that windows remain where they are placed:

• Select Scroll/Zoom Position

Auto Placement Off.

The windows will remain in place until you move them again.

Hiding Scroll/Zoom Windows

To hide only the Zoom and/or Scroll windows on Microsoft Windows platforms, click the button in the right corner of the window.

Unhiding Scroll/Zoom Windows

Right-click in the Image, Zoom or Scroll window and click <Find Display> to bring up the associated hidden Zoom and/or Scroll windows.

ENVI User’s Guide

ENVI Image Display Windows

212

The Available Vectors List

Chapter 3: Display Management

Use the Available Vectors List to load vectors into a Vector window or to overlay them on a displayed image. You can simultaneously overlay vector layers of different projection types or overlay vector layers that have projection types different than the image. The image or the first vector layer displayed sets the projection type and all other layers are automatically converted to that projection type.

When you load a vector file into memory for the first time during an ENVI session,

ENVI places the vector layers into the Available Vectors List automatically. Data files that will appear in the Available Vectors List include ENVI Vector Files, DLG,

Microstation DGN, MapInfo, SDTS, DXF, ARC/INFO Interchange, and ArcView

Shapefiles. If multiple vector files are opened, all of the layers for all of the files appear in the Available Vectors List sequentially.

From the Available Vectors List, select vector files to display as an overlay on an image or in a separate Vector window.

To stretch and resize the Available Vectors List, click on any corner of the dialog with the left mouse button and drag to the desired size and/or shape.

The Available Vectors List

Figure 3-11: Available Vectors List

ENVI User’s Guide

Chapter 3: Display Management

213

Loading Vectors for Display

Follow these steps to display vector files in ENVI:

1. From the ENVI main menu, select Window

Available Vectors List. All open vector layers appear in the Available Vectors List.

2. Click on the layer name.

• To select all of the layers, click on Select All Layers.

• To clear all of the layers, click on Deselect All Layers.

• To remove a layer from the list, click on the name and click Remove

Selected.

3. Click on Load Selected in the Available Vectors List to load the vectors to a vector or display window.

4. When the Load Vector Layers dialog appears, select a vector destination display window by clicking on a window name.

• If any image display windows are open, the display names (i.e. Display #1) appear in the list. Click on the desired display window name to plot the vectors over the displayed image.

• If any vector windows are open, the vector window names (i.e. Vector

Window #1) appear in the list. Click on the desired Vector window name to plot the vectors in that window.

• To plot the vectors in a new Vector window, select New Vector Window.

5. Click OK.

The Vector window appears with the selected vectors displayed (see “Vector

Options” on page 222).

ENVI User’s Guide

The Available Vectors List

214

Chapter 3: Display Management

Options in the Available Vectors List

Use the Options menu in the Available Vectors List to start a new Vector window, remove all the vector layers from memory, edit the layer names, change projection types, convert layers from one projection type to another, create various world boundaries vectors, and create new empty vector layers.

Opening New Vector Windows

To start a new empty Vector window and an associated parameters dialog:

• Select Options

Start New Vector Window.

Deleting Layers from Memory

To delete all the vector layers from memory:

• Select Options

Remove All Layers.

Note

Once vectors are deleted from memory, the only way to recover the layers is to read them from disk again.

Editing Layer Names

1. Select Options

Edit Layer Names.

2. When the Edit Layer Names dialog appears, click on the name of the layer that you want to change. The name appears in the Edit Selected Item text box.

3. Edit the name in the text box. To return the layer to its unedited name, click

Reset.

4. Click OK.

Changing Projection Types

1. Select Options

Edit Layer Projection.

2. When the Edit Layer Projection dialog appears, select a new projection type by clicking on it (see

“Selecting Map Projection Types” on page 922).

3. Click OK.

The Available Vectors List

ENVI User’s Guide

Chapter 3: Display Management

215

Note

Changing the projection type does not affect any data points; it only changes the projection name.

To convert between projections, see the following section. For more map projection information, see

Chapter 10, “Map Tools” .

Converting Layer Projections

Use Convert Layer Projection to convert layers from one projection type to another.

1. Click on the layer name in the Available Vectors List.

2. Select Options

Convert Layer Projection.

3. When the Convert Layer Projection dialog appears, select a projection type

from the list (see “Selecting Map Projection Types” on page 922).

4. Enter a new layer name, if desired.

5. Select output to File or Memory.

6. Click OK.

For more information on converting projections, see

“Converting Map Projections” in

Chapter 10.

Creating Buffer Zone Images for Vectors

Use Calculate Buffer Zone to calculate a buffer zone image in which the value of every pixel is defined as the distance from that pixel to the selected vector layers, in units of pixels. If your vectors are overlaid on a display window, the displayed image is used to create the output buffer zone image. If the vectors are displayed in a Vector window, you must select an associated file to use for the calculation. You designate a maximum distance value and the result is that any pixels with a distance larger than that value are set to the maximum distance value +1.

1. In the Available Vectors List, click on the names of the vectors to use in the buffer zone image.

Note

If you select more than one layer, the distance will be from the pixel to any of the selected layers.

2. Select Options

Calculate Buffer Zone.

ENVI User’s Guide

The Available Vectors List

216

Chapter 3: Display Management

3. When the Select Associated Data File dialog appears, select the file associated with your vectors. The Buffer Zone Image Parameters dialog appears.

4. Click the Maximum Distance arrow increment buttons to set the maximum distance to measure, or type the value (in pixels) into the corresponding text box. Any pixels with a distance larger than this value will be set to the maximum distance value +1.

5. From the Distance Kernel button menu, select Floating Point or Integer output.

6. Select output to File or Memory.

7. Click OK.

Creating World Boundary Layers

From the Available Bands List, use Create World Boundaries to create layers of various world boundaries (including political boundaries, coastlines, rivers, and USA states) from either a high resolution or a low resolution database.

1. Select Options

Create World Boundaries. The Create Boundaries dialog appears.

Note

You can also create world boundaries by selecting Vector

Create World

Boundaries from the ENVI main menu.

2. Select the layers by clicking the check box next to their names.

• To select a range of layers, enter the starting and ending numbers and click

Add Range.

• To select all the layers, click Select All.

• To clear all the layers, click Clear.

3. Select one of the following options:

• To create world boundary layers for a specific area, enter the latitude and longitude coordinates in the corresponding text boxes.

• To create world boundary layers for the entire world, do not enter latitude and longitude coordinates.

4. Select output to File or Memory. One output

.evf

file is created for every selected layer and named with a layer abbreviation appended to the root filename. The high resolution layers are named with a

_hp

,

_hc

, or

_hr

for the

The Available Vectors List

ENVI User’s Guide

Chapter 3: Display Management

217 political boundaries, the coastlines, or the rivers, respectively. The low resolution layers are named similarly but with an

_lp

, etc. The USA States layer have

_usa

appended to the root name.

Note

Building layers from the high resolution database creates very large output files (~20 MB each).

5. Click OK to build the vector layers.

The selected layers appear in the Available Vectors List.

Creating New Layers

Use Create New Vector Layer to create a new empty vector layer so you can enter your own vector layers of polygons, lines, or points and attributes. These vector layers can have the same projection and geographic boundaries (size) as existing vector layers, georeferenced raster images, or can be based on user-defined input. An empty vector layer can also be created from non-georeferenced raster images for drawing vectors over those images.

Tip

You can also create vector layers by selecting Vector

Create New Vector Layer

from the ENVI main menu (see “Creating Vector Layers” in Chapter 11).

From Existing Layers

1. Select Options

Create New Vector LayerUsing Existing Vector

Layer.

2. When the New Vector Layer Parameters dialog appears, click on the name of the vector layer to use to set the projection and size boundaries.

3. When the New Vector Layer Parameters dialog appears, enter a layer name, and select File or Memory output.

From Projection and Boundaries of a Raster Image

1. Select Options

Create New Vector LayerUsing Raster Image File.

2. When the Select Image File for New Vector Layer dialog appears, select the image file and click OK.

3. When the New Vector Layer Parameters dialog appears, enter a layer name, and select File or Memory output.

ENVI User’s Guide

The Available Vectors List

218

Chapter 3: Display Management

From User-Defined Parameters

1. Select Options

Create New Vector LayerUsing User Defined

Parameters.

2. When the New Vector Layer Parameters dialog appears, select the desired projection type and enter a Zone number if needed (see

“Selecting Map

Projection Types” in Chapter 10).

3. Enter the bounding box coordinates in the selected projection units in the

X/Ymin and X/Ymax text boxes.

4. Enter a layer name and select File or Memory output.

The new layer is listed in the Available Vectors List. From the Available Vectors List, you can load the layer into a Vector window and draw vectors and add attributes to it

( “Working with Vector Layers” in Chapter 4).

Managing Vector Files from the Available Vectors List

Use the File pull-down menu in the Available Vectors List to open new vector files, export vector layers to a region of interest (ROI) or ArcView file, and to save layers from memory to a file.

Tip

ENVI vector files can be converted to DXF using Vector

Convert EVF to DXF

(see “Converting EVFs to DXF Files” in Chapter 11).

Opening Files

1. In the Available Vectors List, select File

Open Vector Filevector file

type.

2. When the standard file selection dialog appears, select the file (see “Opening

Vector Files” in Chapter 2 for details).

Exporting Vector Layers to a Region of Interest (ROI)

When exporting vector layers to Regions of Interest (ROIs), you can choose to create one ROI containing all of the vectors, or create one ROI for each vector.

1. Choose one of the following options:

• From within the Available Vectors list, select File

Export Layers to

ROI.

The Available Vectors List

ENVI User’s Guide

Chapter 3: Display Management

219

• From within the Vector Parameters window, select File

Export Active

Layer to ROIs.

2. When the Export Vector Data to ROI dialog appears, select either the Convert

all vectors to one ROI or Convert each vector to a new ROI option.

Warning

Vector layers exported as ROIs can create very large ROIs.

Exporting Vector Layers to a Shapefile

Use this procedure to export vector layers to an ArcView-compatible fileset, which includes a Shapefile (

.shp

), an index file (

.shx

), and a database file (

.dbf

).

1. In the Available Vectors List, select the vectors to export by clicking on their names.

• To export all of the layers, click Select All Layers.

• To select multiple layers, but not all layers, click on each layer that you want to export while holding down the Ctrl key on your keyboard.

2. Select File

Export Layers to Shapefile.

Note

If you decide to not load any vectors from the Available Vectors List, select

File

Cancel to exit it without removing the loaded vectors from memory.

3. When the Output Layer to the Shapefile dialog appears, enter the desired output filename and click OK. This dialog appears for each layer selected.

Each ArcView vector file can contain only one type of vector (polygon, point, etc.), so ENVI uses a base name and appends extensions to the base name for each vector type. The extensions used are

.pg

for the polygons,

.pl

for the polylines, and

.pt

for the points.

Saving Vector Layers

Vector layers listed in the Available Vectors List are currently in memory. Use this procedure to save them to a file.

1. In the Available Vectors List, select the layer by clicking on the name.

2. Select File

Save Memory Layers to File.

3. Enter an output filename.

ENVI User’s Guide

The Available Vectors List

220

ENVI Vector Windows

Chapter 3: Display Management

ENVI provides a stand-alone GIS plot window for displaying vector data and composing simple vector-only maps. ENVI also provides vector overlays on standard

ENVI displays that include true vectorization of overlays in all windows, including the Zoom window. Full precision of vector data is maintained and pixellation is avoided. Vectors can be read from a variety of input files and new vector layers can be created and drawn in a Vector window or over images. Latitude/longitude and map coordinate information can be displayed while interactively tracking vectors. A

Vector Information window allows display of attribute information in real-time as the cursor tracks each vector. You can query vector GIS attribute information directly to generate new layers of selected information with attributes. You can create ArcView

Shape Files and associated

.dbf

attribute files and indexes, or DXF files from internal ENVI

.evf

format. New vector layers generated using ENVI’s robust image processing capabilities, and changes made to vector layers in ENVI are easily exported to industry standard GIS formats.

ENVI Vector windows provide you with a way to view vector data such as USGS

Digital Line Graphs (DLG), USGS DLGs in Spatial Data Transfer Standard (SDTS) format, DXF files, ARC/INFO Interchange files, and ArcView Shape files. You can view, edit, and query attributes associated with ArcView Shape files and can also create your own vector files and attributes. An ENVI Vector window consists of a vector display window or image window and a #N Vector Parameters dialog that controls the appearance of the vectors and interaction with the vector attributes.

Cursor Functions in Vector Windows

Cursor and mouse functions in vector windows work differently than they do in

ENVI display windows. Cursor functions in the vector windows change depending on the mode selected. The following table lists the functions of the mouse buttons when you place the cursor in a Vector window and the Cursor Query mode is active.

See

“Controlling Cursor Modes” in Chapter 4 for cursor functions in the other modes.

More detail on these functions can be found in the following sections.

ENVI Vector Windows

ENVI User’s Guide

Chapter 3: Display Management

221

Use Help

Mouse Button Descriptions to bring up a dialog description of each mouse button.

Mouse Button

Left Button

Middle Button

Right Button

Function

When layer is active (indicated by a check mark next to the layer name under Select Active Layer in the shortcut menu)

— Snap to a near active vector and track map coordinates and Latitude/Longitude. (The coordinates are shown at the bottom of the Vector window.)

When layer is not active (no check mark appears next to the layer name under Select Active Layer in the shortcut menu)

— Pan the display by clicking at the edge of the window.

(The Mode label at the bottom of the Vector window will display Pan with the direction of the pan when the mouse is near the edge of the Vector window.)

Zoom into an area by clicking and dragging to form a zoom box inside the Vector window. Decrease zoom factor with single click inside the window. Click while holding down the

Shift key to zoom into the display centered on the cursor.

Click to display the shortcut menu.

Table 3-5: Function of Mouse Buttons in the Vector Window

Zooming in Vector Windows

Use this procedure to zoom in on a section of the Vector window.

1. Press and hold the middle mouse button at one corner of a box defining the magnify region and drag the corner to make the region the desired size.

Note

Click the middle mouse button while holding down the Shift key to zoom into the display centered on the cursor.

2. Release the middle mouse button. ENVI redraws the enlarged zoom region in the Vector window.

ENVI User’s Guide

ENVI Vector Windows

222

Chapter 3: Display Management

3. To zoom out use one of the following methods.

• Using the mouse — Click the middle mouse button inside the zoomed region. The vector display steps backward through the previous zoom levels with one step per click.

• Using a shortcut menu — Click the right mouse button inside the Vector window and select Previous Range from the shortcut menu. The vector display steps backward through the previous zoom levels.

• Select Reset Range from the shortcut menu to reset all zooming and set the vector display back to the original range.

Panning in Vector Windows

To pan to another region in the Vector window, click the left mouse button near the edge of the Vector window. The Mode label at the bottom of the Vector window will display Pan and the direction of the pan when the mouse is near the edge of the

Vector window.

Cursor Tracking in Vector Windows

If you are attempting image-to-map registration (see

“Registration” in Chapter 10),

you need to find the location of your cursor. If vectors are displayed in an image window, ENVI reports the position of the cursor by displaying it in the Location text box of that window’s associated Vector Parameters dialog. If vectors are displayed in a Vector window, ENVI reports the position of the cursor in the bottom-left text box in the Vector window.

An check mark next to the layer name under Select Active Layer in the shortcut menu of the Vector window indicates that a layer is active. When active, the vector cursor snaps to the nearest vector in that layer. When not active, no snap is applied and the cursor freely tracks position anywhere in the window. In either case, clicking and dragging using the left mouse button in the Vector window causes the map coordinates of the cursor’s location to be listed in Easting, Northing order in the lower right corner of the Vector window. Latitude and longitude are listed directly under the map coordinates.

Vector Options

Vector data often consist of multiple layers of vector data. For example, the following figure shows that the available vector layers include Cities, Counties, Roads, and

States. Use the Vector options, which appears with a Vector window, to control the appearance of vector layers, to add new vectors, export vector layer coordinates for

ENVI Vector Windows

ENVI User’s Guide

Chapter 3: Display Management

223 use in image-to-map registration, and to view, edit, and query vector attributes (see

“Working with Vector Layers” in Chapter 4 for details).

Figure 3-12: Vector Window

Vector Attributes

Vector layers may have attributes associated with them. ENVI can read Shapefile attributes and interact with them. You can use the cursor to select vectors in the

Vector window and highlight the associated attributes or select an attribute and highlight the associated vector. You can do a vector attribute query to create new vector layers with attributes selected using simple mathematical and logical operators. ENVI also allows you to edit the existing attributes or to add new attributes to vectors. Point attribute names can be plotted in the Vector window and point symbol sizes associated with attribute values (see

“Vector Attributes” in Chapter 4 for

instructions).

Note

Currently ENVI only reads Shapefile attributes or attributes added using ENVI functions.

ENVI User’s Guide

ENVI Vector Windows

224

Chapter 3: Display Management

Tools for Maintaining Your Display

ENVI provides the following tools for maintaining your display:

• mouse button descriptions

• display information at the current cursor position

• data information at the current cursor position

• point collection

• maximum display resizing

• display linking

• the ability to close all display and plot windows

Displaying Mouse Button Descriptions

Use Mouse Button Descriptions to view the functionality of the mouse buttons for the window in which the cursor is located. As the cursor is moved from window to window, the mouse button descriptions are updated. The displayed information includes the window type (e.g., display, plot), the function that has the cursor control

(e.g., ROIs, Dynamic Overlay), and the actions for each mouse button (MB1: left mouse button, MB2: middle mouse button; MB3: right mouse button).

Note

If the mouse buttons are not responding as you expect, display the mouse button descriptions to check which function is in control of the cursor.

To display the mouse button description dialog, select one of the following options:

• From the ENVI main menu, select Window

Mouse Button Descriptions or Help

Mouse Button Descriptions.

• From the ENVI main menu, click on Display

WindowMouse Button

Descriptions.

Tools for Maintaining Your Display

ENVI User’s Guide

Chapter 3: Display Management

For either case, the Mouse Button Descriptions dialog appears.

225

Figure 3-13: Mouse Button Descriptions Dialog

Showing Display Information

Use Display Information to view information about the display window in which the cursor is currently located. The information is updated as you move the cursor between the open display windows. The displayed information includes the display number, number of colors used, bands displayed, the type of stretch currently applied to each band, and the sizes and pixel ranges of the image, zoom, and scroll windows.

• From the ENVI main menu or the Main Image window, click on Window

Display Information.

The Display Information window appears.

ENVI User’s Guide

Figure 3-14: Display Information Window

Tools for Maintaining Your Display

226

Chapter 3: Display Management

Displaying Cursor Location/Value

Use Cursor Location/Value in any image window to display the sample (horizontal,

X) and line (vertical, Y) coordinates, the data value of the pixel under the cursor, and the geographic coordinates (for georeferenced data) of the pixel under the cursor.

Select one of the following options to open the Cursor Location/Value window:

• In the Main Image window, double-click with the left mouse button.

• From the Main Image window, select Tools

Cursor Location/Value.

• From the ENVI main menu or the Main Image window, select Window

Cursor Location/Value. For detailed information, see

“Viewing Cursor

Location and Value” in Chapter 4.

Collecting Points

Use Point Collection to collects points (both pixel locations and map locations) from display windows. The points are displayed in a table in the ENVI Point Collection window.

• From the ENVI main menu, select Window

Point Collection, or from the

Main Image window, select Tools

Point Collection.

For detailed information and instructions, see

“Collecting Points” in Chapter 4.

Maximizing Open Displays

To resize all display windows to fit the available screen space, select either:

Window

Maximize Display Windows from the Main Image window, or

Window

Maximize Open Displays from the ENVI main menu.

For example, if four displays are open, each display will be resized to fill one-fourth of the available screen.

Tools for Maintaining Your Display

ENVI User’s Guide

Chapter 3: Display Management

227

Linking Displays

Use display linking to link multiple displays so that all actions in one display are mirrored in the others. Dynamic overlays are active when displays are linked

( “Working with Multiple Dynamic Overlays” in Chapter 4).

To link displays:

• select Window

Link Displays from the ENVI main menu, or

• select Tools

LinkLink Displays from the Main Image window.

Displays may also be linked using the Tools menu in any display or by using the shortcut menus (see

“Linking Images” in Chapter 4 and

“Display Window Shortcut

Menu” in Chapter 4).

Closing all Display Windows

To close all open image displays:

• Select Window

Close All Display Windows from the Display menu or from the ENVI main menu.

Closing all Plot Windows

To close all open plot windows:

• Select Window

Close All Plot Windows.

ENVI User’s Guide

Tools for Maintaining Your Display

228

Chapter 3: Display Management

Tools for Maintaining Your Display

ENVI User’s Guide

Chapter 4:

Interactive Display

Functions

This chapter covers the following topics:

The Display Menu Bar . . . . . . . . . . . . . . . 230

Display Functions . . . . . . . . . . . . . . . . . . . 232

Creating Vector Layers . . . . . . . . . . . . . . . 233

Saving Display Groups . . . . . . . . . . . . . . . 234

Setting Display Preferences . . . . . . . . . . . . 235

Overlays . . . . . . . . . . . . . . . . . . . . . . . . . . . 238

Contrast Stretching and Quick Filtering . . 354

Using Interactive Stretching . . . . . . . . . . . 359

Display Linking and Dynamic Overlays . . 372

Interactive Profiles and Spectral Plots . . . . 377

Extracting Polarization Signatures . . . . . . 403

Color Mapping . . . . . . . . . . . . . . . . . . . . . 404

Using the Pixel Locator . . . . . . . . . . . . . . 410

Collecting Points . . . . . . . . . . . . . . . . . . . 412

Using the Line of Sight Calculator . . . . . . 416

Using the Spatial Pixel Editor . . . . . . . . . 418

Using the Spectral Pixel Editor . . . . . . . . 421

Creating Animations . . . . . . . . . . . . . . . . 422

Using Two-Dimensional Scatter Plots . . . 427

Three-Dimensional Surface Views . . . . . . 438

Display Output Options . . . . . . . . . . . . . . 446

ENVI User’s Guide

229

230

The Display Menu Bar

Chapter 4: Interactive Display Functions

Five menus appear in the Main Image window: File, Overlay, Enhance, Tools and

Window. These menus are collectively titled the Display menu bar. Use the Display menu bar to access common display operations and interactive functions.

Operations and functions include linking image windows; producing X, Y, Z

(spectral), and arbitrary profiles; contrast stretching; color mapping; ROI selection, cursor position and values, two-dimensional scatter plots, surface plotting

(perspectives and draping), and polarization signatures; various overlays including annotation, pixel-based and georeferenced grid lines, image contouring, and vector layers; image animation, changing display window characteristics; printing and outputting images (PostScript, Image [RGB], BMP, HDF, JPEG, JPEG2000, PICT,

SRF, TIFF, or XWD formats).

The Display Menu Bar

Figure 4-1: The Display Menu Bar

ENVI User’s Guide

Chapter 4: Interactive Display Functions

231

Display Window Shortcut Menu

You can access many Display menu bar interactive functions from the shortcut menu in any of the three display windows. Descriptions of the available functions are provided in

“ENVI Image Display Windows” in Chapter 3 and in this chapter.

1. To use the new shortcut menu, right-click anywhere in a display window.

2. From the menu that appears, select an option.

Note

The shortcut menu displays different options depending on whether interactive linking is on or off. In the following figure, the shortcut menu on the left is shown with interactive linking off; on the right, with interactive linking on.

ENVI User’s Guide

Figure 4-2: The Zoom and Main Image Window Shortcut Menus

The Display Menu Bar

232

Display Functions

Chapter 4: Interactive Display Functions

Use the File menu on the Display menu bar to create vector layers for the displayed image, save display groups to a file, open saved display groups, output images to various formats, print display images, and set preferences for your image displays.

Figure 4-3: File Menu Options Available From the Display Menu Bar

Display Functions

ENVI User’s Guide

Chapter 4: Interactive Display Functions

Creating Vector Layers

233

Use Create New Vector Layer from the File menu on the Display menu bar to create a new vector layer that is associated with the displayed image.

Note

You can also create vector layers from within the Available Vectors List or from the

Vector menu on the ENVI main menu. For detailed instructions, see

“Creating New

Layers”

on page 217 and “Creating Vector Layers” on page 966.

1. Select File

Create New Vector Layer from the Display menu bar.

2. Enter a layer name and select output to File or Memory. The Vector

Parameters window appears.

Note

To draw new vectors, select Mode

Add New [Type] from the Vector

Parameters dialog.

For detailed information, see “Working with Vector Layers” on page 327.

ENVI User’s Guide

Creating Vector Layers

234

Saving Display Groups

Chapter 4: Interactive Display Functions

Use Save as Display Group to save a given display group, in its present state, to a file. When a display group is saved, the displayed bands, the window sizes and positions, the stretch, the displayed overlays, any open profiles, and any twodimensional scatter plots associated with the display are all saved in a text file.

1. From the Display menu bar, select File

Save As Display Group.

2. Enter or choose an output filename.

3. Click OK.

The default extension .

grp

is automatically appended to the filename.

Restoring Saved Display Groups

Use Restore Display Group to restore a saved display group.

Note

Files that were not saved to disk (e.g., only in memory) and files that cannot be opened directly using ENVI’s Open Image File function will not be restored.

1. Select one of the following options:

• From the ENVI main menu, select File

Restore Display Group.

• From the Display menu bar, select File

Restore Display Group.

Note

If you restore a saved display group from the ENVI main menu, it will be placed in a new display group. If you restore a saved display group from the

Display menu bar, it will replace the current display.

2. In the file selection dialog, select the .

grp

file.

The display group and its associated windows are displayed.

Saving Display Groups

ENVI User’s Guide

Chapter 4: Interactive Display Functions

Setting Display Preferences

235

Use Preferences to add virtual borders to an image, to edit the characteristics of the border, to change the size of the Main Image, Zoom, or Scroll windows, and to change the color of the Zoom/Scroll window indicator boxes. For a complete overview of ENVI Image Display windows, see

“ENVI Image Display Windows” in

Chapter 3.

Setting Virtual Border Characteristics

To append a virtual border to the image display:

1. From the Display menu bar, select File

Preferences.

2. When the Display Parameters dialog appears, select from the following options:

• To set the default so that each time an image is loaded a virtual border is used, enter the size of the border in pixels in the appropriately positioned text box.

The left box controls the left border, the right the right border, the top the top border, and the bottom the bottom border.

• To change the default border color, select the desired color from the

Border Color button menu.

3. Click OK.

Turning Image Window Scroll Bars On/Off

Use the scroll bars in the border of the Main Image window to move around the image.

1. Double-click the Zoom window cross-hair box with the right mouse button or in the open display, select File

Preferences. The Display Parameters dialog appears.

2. Click the Scroll Bars arrow toggle button to select Yes or No.

3. Click OK.

ENVI User’s Guide

Setting Display Preferences

236

Chapter 4: Interactive Display Functions

Resizing Windows

1. In the open display, select File

Preferences. The Display Parameters dialog appears.

2. Select from the following options:

• To set the size of the Image, Scroll, and/or Zoom windows, enter the size

(in pixels) in the corresponding text boxes.

• To enter a resize factor for the Scroll window, enter it into the Resize

Factor text box.

• To set the zoom factor for the Zoom window, enter it into the Zoom

Factor text box.

3. Click OK.

For additional resizing techniques, see

“Resizing the Main Image Window” on

page 200, “Resizing the Zoom Window” on page 204, and

“Resizing the Scroll

Window” on page 208.

Changing Zoom Window Properties

To change the x or y size (in pixels) of the Zoom window, the zoom factor of the

Zoom window, or the interpolation method used:

1. In the open display, select File

Preferences. The Display Parameters dialog appears.

2. Select from the following options:

• To change the size of the Zoom window, enter the corresponding x and y dimensions (in pixels) in the xsize and ysize text boxes.

• To change the zoom factor, use the arrow increment buttons.

• To change the interpolation method use the Zoom Interp button menu in the Zoom window to select from Nearest Neighbor, Bilinear, Bicubic, or

Optimized Bicubic methods.

3. Click OK.

Setting Display Preferences

ENVI User’s Guide

Chapter 4: Interactive Display Functions

237

Changing Indicator Box Colors

To change the displayed color of the Zoom Window Indicator box, the Main Image

Window Indicator box, and the Zoom window crosshairs:

1. In the open display, select File

Preferences. The Display Parameters dialog appears.

2. Select a color by using one of the following options:

• From the Zoom/Scroll Color button menu, select a color.

• Click on the colored box with the left mouse button to cycle through the color choices.

Note

To cycle backwards, click on the colored box with the middle mouse button.

3. Click OK.

ENVI User’s Guide

Setting Display Preferences

238

Overlays

Chapter 4: Interactive Display Functions

Use Overlay to place annotation (text, polygons, symbols, etc.), classifications, density slices, pixel and map grids, contour lines, regions of interest (ROIs) or vector layers over an image or plot.

Overlays

Figure 4-4: Image Overlay Options From the Overlay Menu

Tip

Use ENVI’s QuickMap feature to quickly overlay grid lines, titles, declination diagrams, North arrows, and borders on georeferenced images. For details, see

“Creating QuickMaps” on page 320.

ENVI User’s Guide

Chapter 4: Interactive Display Functions

239

Showing and Hiding Overlay Dialogs and Layers

When working with overlays (annotation, regions of interest, contours, grid lines, density slices, and vector layers), you can hide the control dialog (e.g., the ROI Tool dialog, the Density Slice dialog, etc.) without erasing the corresponding overlays from your image. When the dialog is hidden, you can hide the associated layers without erasing them.

Hiding Overlay Dialogs

To remove the overlay control dialog from the screen or hide it without erasing overlays from your image, select one of the following options:

• In the overlay control dialog, select Options

Hide Window.

• In the Window Finder, double-click on the window name.

Showing Hidden Overlay Dialogs

To unhide the overlay control dialog, select one of the following options:

• In the Window Finder (see

“Using the Window Finder” on page 183), click on

the window name.

• From the Display menu bar, select Overlay

→ [overlay type].

Hiding Layers

When an overlay control dialog is hidden, you can show or hide the displayed layers.

To hide layers:

• Select Overlay

→ [overlay type...] Hide Layer. All of the layers of the selected overlay type are hidden.

To unhide layers:

• Select Overlay

→ [overlay type...] Show Layer.

ENVI User’s Guide

Overlays

240

Annotating Images

Chapter 4: Interactive Display Functions

Use Annotation to add text, symbols, polygons, lines, polylines, shapes, map information, and grayscale or color bars to images and plots. For classification images, add class keys. Annotation options are similar for images, plots or surface views. Annotations can be saved to files and included in output options.

Annotation can be placed in the Main Image window, the Scroll window, the Zoom window, or the virtual borders of an image.

Tip

Use ENVI’s QuickMap feature to quickly overlay grid lines, titles, declination diagrams, North arrows, and borders on georeferenced images. For details, see

“Creating QuickMaps” on page 320.

Annotating Images

Figure 4-5: Example Annotation in an ENVI Display Group

ENVI User’s Guide

Chapter 4: Interactive Display Functions

241

Note

To use virtual borders, append the border to the image prior to annotating the image

(see “Setting Virtual Display Borders” on page 243).

1. Select one of the following options:

• From the Display menu bar select Overlay

Annotation.

• In any plot, including surface plots and X, Y, or Z profiles, select

Options

Annotation.

2. When the #n Annotation dialog appears (where n is the display being annotated), select Object

→ the desired annotation type.

Note

Text annotation is the default mode.

The functionality of each annotation type is described in the following sections.

Positioning Annotations

1. In the Annotation dialog, select the Main, Scroll, or Zoom window toggle button.

Note

Normal mouse operations in the selected window are disabled. However, normal mouse operations still apply in the other windows. To temporarily suspended annotation, select the Off toggle button. All normal mouse operations are again possible in all windows.

2. Position annotation objects by clicking the left mouse button at the desired site on the image. Refer to the following table for specific mouse button and positioning functions.

3. Use the colored diamond-shaped handle to place the annotation at the desired location. (The handle appears on all annotation types.)

ENVI User’s Guide

Annotating Images

242

Chapter 4: Interactive Display Functions

4. After the annotation is positioned, click the right mouse button to fix the object at that location on the image. The diamond-shaped handle disappears after the annotation is fixed.

Action

Mouse

Button

Position current annotation

Left

Move current annotation Left

Delete current annotation Middle

Right

Interaction

Click and

Release

Click, hold and Drag

Handle

Click and

Release

Click and

Release

Fix current annotation and proceed to the next annotation operation

Prepare to reselect fixed annotation

Reselect annotation

Left

Left

Left

Click and pull down menu

Click and drag to draw box

Click

Where

At desired location

Throughout image

Anywhere in image

Anywhere in image

Object

Selection/Edit

Around annotation object corners

Off toggle button Suspend annotation (all normal functions are returned)

Resume annotation

(normal functions suspended)

Left Click Image, Scroll, or

Zoom toggle button

Table 4-1: Mouse Button Assignments for Annotation

Tip

The text box at the top of the Annotation dialog describes the mouse button functions for the current annotation mode. MB1 is the left mouse button,

MB2 is the middle mouse button, and MB3 is the right mouse button.

Annotating Images

ENVI User’s Guide

Chapter 4: Interactive Display Functions

243

Setting Virtual Display Borders

Use Set Display Borders to append a virtual border to an image. You can place any type of annotation object in the border.

1. Select Options

Display Borders.

2. When the Display Borders dialog appears, enter the desired border width (in pixels) for the left, top, right, and bottom image border in the text boxes with the same relative position.

The image is re-displayed with the designated virtual border.

Note

You can also add Virtual Borders using the Available Bands List (see

“Options in the Available Bands List” on page 195).

Changing Snap Factors

In the Annotation dialog, set the snap factor to use for placing your annotations. The snap factor causes any annotation located within the specified snap distance (in pixels) to snap to the same pixel location. A snap factor of 1 (the default) causes annotation to be placed exactly at the location selected.

1. In the Annotation dialog, select Options

Set Snap Value.

2. In the Set Snap Value dialog, use the increment arrows to select a value or enter the value in the Snap text box.

3. Click OK.

Burning Annotation into Images

To burn the annotation into an image once it has been placed:

1. In the Annotation dialog, select the Off toggle button.

2. From the Display menu bar, select File

Save Image AsPostscript File

(see

“Display Output Options” on page 446).

ENVI User’s Guide

Annotating Images

244

Chapter 4: Interactive Display Functions

Selecting Annotation Object Types

In the Annotation dialog, use the Object pull-down menu to select from the various annotation object types. Text, symbols, shapes, map information, and color ramps are available as annotation objects. Each object has its own annotation options and are described in more detail below.

Working with Text Annotation

1. In the Annotation dialog, select Object

Text.

2. Enter text by typing it in the text box at the bottom of the window.

More than one line of text may be entered at once.

3. Select from the following specific options to change the text characteristics.

Note

The text characteristics will not change in the dialog. To see the changes, click in the image window, but do not fix the annotation in place until you are satisfied with the appearance of the text.

• To change text color, click on the Color button menu and select the desired color.

• To place the text on a solid colored background, use the Back button menu to select a color; to place the text directly on the image without a background (this is the default), select Off.

• To adjust the thickness of the text, enter a new thickness value in the Thick textbox or use the increment arrows to change the value in the Thick parameter box.

• To change the text font, click the Font button menu and select a font.

• To change the size of the text (in pixels), change the value or use the arrow increment buttons in the Size parameter box.

• To change the orientation of the text on the screen (the angle at which it is written), enter the value of the angle in degrees (counterclockwise, with respect to the horizontal [0 degrees]) in the Orien parameter box or toggle the arrow increment buttons.

• To center the text or justify it left or right, choose the appropriate option under the Align button menu.

Annotating Images

ENVI User’s Guide

Chapter 4: Interactive Display Functions

245

4. Position and fix the annotation as described in

“Positioning Annotations” on page 241.

A Note About Fonts

Several font types are available from the Fonts button menu in the Text Annotation window, including special ENVI fonts. Use the ENVI Symbols font type to place mining and cartographic symbols, and ENVI and IDL logos.

ENVI offers the flexibility of allowing you to use any text- or symbol-based

TrueType font when creating annotations. After you download a TrueType font, you can install it so that it is available to ENVI.

Installing TrueType Fonts for ENVI

IDL and ENVI provide access to TrueType fonts through the resource file, ttfont.map

, located in the IDL resource/fonts/tt subdirectory of your IDL installation. The ttfont.map

file contains a listing of available font files. The following figure contains an example of the font resource file.

Figure 4-6: Sample ttfont.map File

Field descriptions within this resource file are described in the following table.

Field

Fontname

Description

This column contains the name of the font that is available when working with features such a QuickMap.

This column contains the TrueType font filename.

Filename

Table 4-2: Field Descriptions of the Font Resource File

ENVI User’s Guide

Annotating Images

246

Chapter 4: Interactive Display Functions

Field

Direct

Object

Description

This column indicates the Direct Graphics scale, a correction factor that is applied when rendering the font on a Direct

Graphics device.

This column indicates the Object Graphics scale, a correction factor that is applied when rendering the font on an Object

Graphics device.

Table 4-2: Field Descriptions of the Font Resource File

Note

For more information on scaling factors, see the “Fonts” Appendix in the IDL

Reference Guide.

How to Install TrueType Fonts

To install TrueType fonts for use with ENVI, complete the following steps:

1. Copy the font file, which will have a

.ttf

extension, to the resource/fonts/tt subdirectory of your IDL installation directory.

Note

On Windows, you can install the font file in your operating system’s Fonts folder. In this case, you do not need to copy the file to the resource/fonts/tt

subdirectory.

Note

Before you modify the

ttfont.map

file, create a backup copy so you can restore the defaults if necessary. Note also that applications that use text may appear different on different platforms if the scale entries in the ttfont.map

file are altered.

2. Modify the ttfont.map

file using any plain text editor, listing the new font that you have added. Include the fields listed in the previous table, separating each field using white space (spaces or tabs).

Note

If you installed the font in your operating system’s Fonts folder, it is not necessary to list the newly installed font in the ttfont.map

file on the

Windows platform.

Annotating Images

ENVI User’s Guide

Chapter 4: Interactive Display Functions

247

3. Save the modified font resource file.

The font is now available for use with ENVI functions.

Working with Symbol Annotation

1. In the Annotation dialog, select Object

Symbol. The available symbols are displayed in the selected font in the window at the bottom of the dialog.

Individual characters in text fonts can also be selected using the Symbol option.

2. Select the desired font or symbol set from the Font menu.

Note

The fonts labeled Misc, Special, and Math show some of the standard symbols available in IDL.

3. Click the left mouse button on the desired symbol. When selected, the symbol is highlighted in red.

4. Select from the options described in

“Working with Text Annotation” to

change the color, line thickness, etc.

5. Position and fix the annotation as described in

“Positioning Annotations” on page 241.

Working with Polygon Annotation

1. In the Annotation dialog, select Object

Polygon.

2. Choose from the methods below to draw the polygon.

• Use the left mouse button (see the following table) to set the vertices of the polygon. Line segments (polygon sides) are drawn between the selected points. Or, draw the polygon by holding down the left mouse button while drawing.

• To delete the last segment drawn, press the middle mouse button.

ENVI User’s Guide

Annotating Images

248

Chapter 4: Interactive Display Functions

• To close the polygon, press the right mouse button. A handle (a small diamond) appears.

Action

Mouse

Button

Choose Polygon vertices

Delete Polygon vertices (while drawing)

Left

Middle

Close Polygon Right

Interaction

Click and

Release

Click and

Release

Where

At desired location

Anywhere in image

Click and

Release

Anywhere in image

Click and drag On the handle Position completed polygon

Move polygon vertices

Left

Left

Delete polygon Middle

Fix current annotation

Right

Click and drag Near or on vertex

Click and

Release

Click and

Release

Anywhere in image

Anywhere in image

Table 4-3: Polygon Annotation

3. Select from the following options to change or adjust the polygon attributes.

• To change the polygon color, select from the Color menu.

• To change the thickness of the polygon border (and fill if line-fill is chosen), enter a value in the Thick parameter box.

• To change the outline line style (solid, dashed, dotted, etc.), click the Line

Style menu and select the desired style.

• To change the orientation of the polygon on the screen, enter the angle in degrees (counterclockwise) at which to display the polygon with respect to horizontal (0 degrees) in the Rotation parameter box. The Rotation value is always reset to 0 after it has been changed.

Annotating Images

ENVI User’s Guide

Chapter 4: Interactive Display Functions

249

4. Use the Fill button menu to set the fill attributes.

• To leave the polygon unfilled, select None.

• To fill the polygon with the polygon color, select Solid.

• To fill the polygon with equally spaced lines, select line, dashed, dotted, etc.

• To change the orientation of the fill lines, enter the value of the angle in degrees (counterclockwise, with respect to the horizontal [0 degrees]), in the Orien parameter box.

• To change the spacing of the lines, enter a value in the Spc parameter box.

5. Position and fix the annotation as described in

“Positioning Annotations” on page 241.

Working with Polyline Annotation

1. In the Annotation dialog, select Object

Polyline.

2. Use the methods described in

“Working with Polygon Annotation” on page 247 to draw polylines.

Note

The right mouse button is used complete a line, but does not close line segments into a polygon.

3. Select from the options described in

“Working with Polygon Annotation” on page 247 to change polyline attributes. The options color, line style,

thickness, and rotation are available.

4. Position and fix the annotation as described in

“Positioning Annotations” on page 241.

Working with Shape Annotation

Use Rectangle or Ellipse to annotate with geometric shapes.

1. From within the Annotation dialog, select Object

Rectangle or Ellipse.

2. Click and drag with the left mouse button to draw the shape.

• To draw a circle, hold down the control key while drawing an ellipse, or draw the circle using the middle mouse button.

• To draw a square, hold down the control key on the keyboard while drawing a rectangle, or draw the square using the middle mouse button.

ENVI User’s Guide

Annotating Images

250

Chapter 4: Interactive Display Functions

• To set or change the size of the shape, grab a corner, an edge, or an axis end point (ellipse) and press and hold down the left mouse button while dragging to the desired size. The size can also be explicitly changed by entering the desired X and Y sizes (in pixels) in the text boxes labeled

xsize: and ysize:.

• To delete the shape, press the middle button.

To fix the object, press the right button as described in Table 4-3 .

3. Select from the options described in

“Working with Polygon Annotation” on page 247 to change shape attributes.

Working with Arrow Annotation

1. In the Annotation dialog, select Object

Arrow.

2. Select from the following steps to draw the arrow.

• To draw an arrow, click and drag with the left mouse button.

• To change the size and orientation, grab an end and press and hold down the left mouse button while dragging to the desired size. The size of the arrow head can also be changed by entering a new value into the Head

Size parameter box.

• To delete the arrow, press the middle mouse button.

• To control the angle of the lines (in degrees) defining the arrow head, enter a value in the Head Angle parameter box.

Note

Entering smaller angles makes a narrower arrow head and larger angles makes a wider head.

3. Select from the options described in

“Working with Polygon Annotation” on page 247 to change arrow attributes.

4. Press the right button to fix the location and characteristics of the arrow once it has been formatted.

Annotating Images

ENVI User’s Guide

Chapter 4: Interactive Display Functions

Working with Scale Bar Annotation

1. From within the Annotation dialog, select Object

Scale Bar.

Note

If the data is not georeferenced, enter a value when the Image Pixel Size dialog prompts you for the image pixel size in meters.

251

2. Select from the following steps and options to position and change the scale bar.

• To position a scale bar in the image, press the left mouse button.

• To delete a scale bar, press the middle mouse button.

• To select which units of the scale bar will be drawn, set the arrow toggle button to On when the desired units are shown in the Scale pull-down text box. A scale bar can be drawn in any combination kilometers, miles, meters, and feet.

• To change the spelling of the scale bar titles, click the Change Scale Bar

Titles button and edit the spelling of the titles.

Note

You can permanently change the spelling of the titles used for scale bar annotation by editing the envi.cfg

file (see “The ENVI Configuration File” on page 1063).

Note

When more than one of the unit types is set to On, multiple scale bars will be drawn.

• To set the height of a scale bar, in pixels, enter the desired value in the

Height parameter box.

• To change the scale bar length, enter the desired length, in scale bar units, in the Length parameter box.

• To change the number of increments shown on the scale bar, enter the number in the Inc parameter box and the number of sub-increments within the first main increment in the Sub Inc parameter box. The length, increment, and sub-increment parameters are formatted for each type of scale bar individually.

ENVI User’s Guide

Annotating Images

252

Chapter 4: Interactive Display Functions

3. Set the scale bar text attributes by selecting from the options described in

“Working with Text Annotation” on page 244.

4. Press the right mouse button to fix the scale bar position and characteristics.

Figure 4-7: Scale Bar Annotation

Working with Color Ramp and Grayscale Ramp Annotation

Use Color Ramp to place a wedge or color table on the image. The color table or wedge represents the currently applied ENVI color table. For a grayscale image the color ramp is a grayscale wedge from the minimum grayscale value to the maximum grayscale value. For a color image, the color ramp shows the distribution of the selected color palette.

Figure 4-8: A Grayscale Ramp Annotation.

1. In the Annotation dialog, select Object

Color Ramp.

2. Select from the following steps and options to position the ramp.

• To position the color ramp, click the left mouse button at the desired location.

• To delete the ramp, press the middle mouse button.

Annotating Images

ENVI User’s Guide

Chapter 4: Interactive Display Functions

253

• To orient the ramp either horizontally or vertically, select from one of the following (A or B) by clicking on the pull-down menu initially labeled

Horz

→:

A. For horizontal orientation, select Horz

→ (horizontal from low values to high values left to right) or Horz

← (horizontal from high to low left to right).

B. For vertical options select Vert

← (vertical from high to low bottom to top) or Vert

→ (vertical from low to high bottom to top).

3. Select from the following options to change the color ramp characteristics.

• To define the ramp width and length, enter the desired value in the parameter boxes labeled Width and Len.

• To place labels on the ramp, enter the minimum and maximum values in the Min and Max parameter boxes.

• To automatically enter minimum and maximum values calculated from the data into the Min and Max parameter boxes, click on the Calculate

Min/Max button, then select the band from which to calculate the values.

The minimum and maximum values will be entered into the parameter boxes and can be edited, if desired.

• To define the increment (number) of labels to place on the ramp, enter the value in the Inc parameter box.

• To set the label precision (the number of significant figures), enter the number in the Precision parameter box. For example, 0.25 is a precision of

2, and .03 is a precision of 1. Labels are placed at the bottom of horizontal ramps and placed to the right of vertical ramps. Set Label attributes by selecting from the options described in

“Working with Text Annotation” on page 244.

4. Press the right mouse button to fix the color ramp once it has been positioned and formatted.

ENVI User’s Guide

Annotating Images

254

Chapter 4: Interactive Display Functions

Working with Map Key, Class Key, and Vector Key Annotation

A map key consists of colored squares and corresponding labels for each map item or class in a classification image. Map keys can be defined interactively and are automatically created as class keys for classification images. Vector keys are automatically created for vector layers in the appropriate colors with the layer names as labels. Vector keys show the vector symbol used for points, a line for polylines, and a square outline for polygons.

1. In the Annotation dialog, select Object

Map Key.

2. Click the left mouse button at the desired location to position the map key.

Note

To delete the map key, press the middle mouse button.

3. Click Edit Map Key Items to define or change items in the map key.

Annotating Images

Figure 4-9: The Edit Map Key Dialog

ENVI User’s Guide

Chapter 4: Interactive Display Functions

255

4. When the Map Key Object Definition dialog appears, select from the list of

Key items.

• To add additional items to the list, click Add Item.

• To delete an item, highlight it in the list and click Delete Item.

• To change the name of the item, enter the new name in the Object Name text box.

• To define the color of the box, select the desired color using the Color menu.

• To add additional colors, enter the DN values in the R, G, and B, text boxes for red, green, and blue respectively. The newly defined color appears as black in the image but will be correct upon output.

• To change the fill type in the box, use the Fill menu.

• To control the fill type, use the Orien and Spc parameter boxes.

• For vector keys, an Object Type button menu is included and has polygon, polyline, and point selections.

• For a vector polygon item, use the Fill button menu and Orien and Space parameter boxes to select the polygon fill type.

• For a vector polyline item, use the Line Style button menu to select different line styles.

• For a vector point item, use the Symbol menu to select the symbol type to be shown in the key.

5. Follow these steps to change other parameters within the Annotation dialog.

• To set a background color select the desired color from the Back pulldown menu in the Annotation dialog.

• To change the text font for the key, the size, and the thickness of the letters, select from the options described in

“Working with Text Annotation” on page 244.

ENVI User’s Guide

Annotating Images

256

Chapter 4: Interactive Display Functions

• To change class colors, see

“Mapping Class Colors” on page 407 for

detailed instructions.

Figure 4-10: The Vector Key Annotation

Saving Map Key Annotation

1. In the Map Key Object Definition dialog, click the Save button.

2. At the prompt, enter an output file name.

ENVI writes the key to a file. Map key files should be saved with the file extension .

key for consistency, but may be saved using other extensions at your discretion.

Restoring Saved Map Key Files

1. In the Map Key Object Definition dialog, click the Restore button.

2. Select the desired input file.

Working with Declination Diagram Annotation

Use the Declination option to place a declination diagram on the image. The declination diagram includes any combination of arrows pointing to true north

(shown with a star), grid north (GN), and magnetic north (MN).

1. In the Annotation dialog, select Object

Declination.

2. Click the left mouse button at the desired location to position the declination diagram.

Note

To delete the declination diagram, press the middle mouse button.

3. Select from the following steps to change the attributes of the declination diagram.

Annotating Images

ENVI User’s Guide

Chapter 4: Interactive Display Functions

257

• To set the angle of the north arrows, enter the values in degrees in the True

North, Grid North, and Magnetic North text boxes.

The angles are not drawn to scale so that the arrows appear separated.

• To set the arrow length in pixels, use the Length parameter box.

• To change the color of the declination diagram, select from the Color button menu.

• To set the background color, select from the Back menu.

• To change the text font for the key, the size, and the thickness of the letters, select from the options described in

“Working with Text Annotation” on page 244.

• To change the line and text thickness, enter a value in the Thick parameter box.

4. Press the right mouse button to fix the position and characteristics of the declination diagram once it has been formatted.

Figure 4-11: A Declination Diagram Annotation

ENVI User’s Guide

Annotating Images

258

Chapter 4: Interactive Display Functions

Working with Image Annotation

Use Image to place other images, such as imported logos or subsampled images,

inside the current image. Do not confuse this option with mosaicking (see “Image

Mosaicking” on page 888).

Tip

Annotation needs to keep a copy of the image in memory so it is not advised to use large images.

1. In the Annotation dialog, select Object

Image.

2. Click Select New Image.

3. When the Annotation Image Input Bands dialog appears, select an RGB or grayscale file from the Available Bands List within the dialog. The R, G, and B text boxes are filled.

• To select a grayscale image, click on the same file name for all three bands.

• To select a spatial subset, click Spatial Subset.

• To perform spatial resampling of the data, enter a resize factor into the

Resize Factor text box.

• To clear the file names in the R, G, and B text boxes, click Reset.

4. Click OK to return to the Annotation dialog and position the image inset.

5. Click the left mouse button at the desired location to position the image.

• To delete the image, click the middle mouse button.

6. Click the right mouse button to fix the image at that location.

Working with Plot Annotation

Use Plot to overlay an ENVI plot on your image.

1. Select Object

Plot.

2. Click Select New Plot.

Note

If only one plot window is open, that plot is automatically selected.

Annotating Images

ENVI User’s Guide

Chapter 4: Interactive Display Functions

259

3. When the Select Plot window appears, select the name of a plot by clicking on it. If you have multiple plot windows opened with the same name, they appear listed in the order in which they were opened.

4. Enter or select the xsize and ysize in the Select Plot window, if desired.

5. Click OK.

6. Place the plot on the image by clicking with the left mouse button, dragging to the desired location, and clicking the right mouse button to fix the annotation in place.

The annotation appears in the image as a red box of the correct size entitled Plot as shown in the following figure, but the plot annotation appears correctly in the output file.

The plots remain as vectors when burned in to the image if you output it to postscript or a printer.

Figure 4-12: Plot Annotation

Note

Plot objects will not appear in the image if output to an image file.

ENVI User’s Guide

Annotating Images

260

Chapter 4: Interactive Display Functions

Annotating Multiple Plots

Use a test image to annotate and output multiple plots on a single page.

1. From the ENVI main menu, select File

Generate Test Data and create a blank white image (see

“Generating Test Data” on page 122 for further

details).

2. Place the plot annotation on the blank image using standard annotation procedures.

The plot colors are automatically reversed to black on white for output.

Working in Selection Mode

Use Selection to move and change the attributes of annotation objects that have been fixed in the image.

1. Select Object

Selection/Edit.

2. Select Options

Show Object Corners.

3. Click and drag with the left mouse button to draw a box around the corner of the object in order to select it.

4. Click the left mouse button on the handle and drag the object to a new location.

5. Change the object’s attributes by entering the new parameters in the

Annotation dialog.

Selection options are:

• To select multiple objects at once, press and drag a box around the objects with the left mouse button.

• When more than one object is selected the previously selected objects remain active.

• When many objects are selected, using a handle to move one moves them all; changing attributes change all the selected objects’ attributes.

• To edit selected vector objects (rectangle, ellipse, polygon, polyline, arrow), click the left mouse button on a vertex and drag it to the desired location.

• To deselect an object, click the middle mouse button on the handle of the object.

• To deselect multiple objects, press and drag with the middle mouse button to draw a box around the objects.

Annotating Images

ENVI User’s Guide

Chapter 4: Interactive Display Functions

261

• To deselect all of the annotation objects within an image, click the right mouse button within the image.

• To select only those objects and deselect any previously active objects, press and drag with the right mouse button to draw a box around objects.

Additional options are available for selected annotation objects under the Selected

menu (see “Annotation Options” on page 261).

Annotation Options

In the Annotation dialog, use the Selected or the Options menu to access annotation options. Options available when working with annotation objects include undoing the last action, joining polygons, swapping the positions of overlapping objects, duplicating or deleting annotation objects, adding virtual borders to an image, turning annotation mirroring on and off, and showing or hiding annotation object corners.

Selecting All Annotation Objects

To select all annotation objects, select Selected

Select All.

ENVI User’s Guide

Figure 4-13: The Annotation Dialog

Annotating Images

262

Chapter 4: Interactive Display Functions

Joining Polygons

Use the Join option to join the overlapping parts of two polygons.

1. Select two polygons to be joined.

2. In the Annotation dialog, choose Selected.

3. Next choose Join.

The underlying polygon’s vertices are changed to match those of the overlying polygon.

Tip

Better results are obtained for polygons that have many vertices (for example, those drawn while holding down the left mouse button). Use the Swap option (see the next section) to bring a polygon to the top.

Swapping Annotation Objects

Use Swap to bring an underlying object to the top.

1. Select the objects to be swapped.

2. Select Selected

Swap.

Duplicating Annotation Objects

Use Duplicate to duplicate existing Annotation objects instead of re-creating them.

1. Select the objects to be duplicated.

2. Select Selected

Duplicate.

3. Position the duplicate objects by dragging the handle to the desired location with the left mouse button.

Deleting Annotation Objects

To delete selected objects:

• Select Selected

Delete.

To delete all of the annotation objects within the image:

• Select Selected

Delete All.

Annotating Images

ENVI User’s Guide

Chapter 4: Interactive Display Functions

263

Undoing Annotation Changes

To undo the changes made to a selected objects:

• Select Selected

Undo.

The undo applies only to the last change made. After a new change is applied, selecting Undo applies to the latest change, etc.

Mirroring Annotation

Use mirroring with rectangles, ellipses, polygons, and polylines only. It is primarily designed for you to build custom filters for FFT filtering (see

“Defining FFT Filters” on page 738).

To mirror shapes and polygons around the center of the image:

• Select Options

Turn Mirror On.

To turn off the mirroring:

• Select Options

Turn Mirror Off.

Showing Object Corners

Use object corners to make it easier to include corners in the selection box while in

Selection mode. Object corners can be shown around all annotation objects except the vectors (rectangle, ellipse, polygon, polyline, and arrow). The corners are plotted as small asterisks around the annotation object.

To show object corners:

• Select Options

Show Object Corners.

To hide object corners:

• Select Options

Hide Object Corners.

ENVI User’s Guide

Annotating Images

264

Chapter 4: Interactive Display Functions

Managing Annotation Files

Use the File menu in the Annotation dialog to save and restore annotation files.

Saving Annotations to Files

1. In the Annotation dialog, select File

Save Annotation.

2. When the new dialog appears, enter the output file name in the text box, or click Choose and enter or select a filename.

3. Select OK to save the annotation to an output file.

Annotation files are saved with the file extension .

ann

for consistency, unless changed to other extensions at your discretion.

Restoring Saved Annotation Files

1. Select File

Restore Annotation.

2. When the file selection window appears with all

.ann

files listed by default, select the appropriate annotation file. ENVI loads and displays the selected file.

Hiding the Annotation Dialog

To hide or show the Annotation dialog without erasing your annotations, see

“Showing and Hiding Overlay Dialogs and Layers” on page 239.

Closing the Annotation Dialog

To close the annotation dialog and remove all the annotation objects from the display:

• Select File

Cancel.

If the annotations in the display have not been saved, an ENVI question dialog appears asking you if you want to save the file.

Annotating Images

ENVI User’s Guide

Chapter 4: Interactive Display Functions

Overlaying Classes

265

Use Classification to overlay classes on a grayscale or color image in a display window, control which classes are displayed, collect statistics, edit the class colors and names, merge classes, and edit classes by adding, deleting, or moving pixels between classes.

Note

A classification image must be generated prior to using this function (see

Chapter 6,

“Classification” ).

1. In the display window of the image you want to overlay the classification results on, select Overlay

Classification. The Interactive Class Tool dialog appears. It lists all the classes and shows their colors and names. The active class is displayed at the top of the dialog. The active class is the class to which any operations (i.e., statistics, editing) are applied.

Figure 4-14: The Interactive Class Tool Dialog

2. Select from the following options to edit and apply classes to your image.

• To resize the dialog, click on a corner and drag.

• To change the active class, click on the colored box next to the class name.

ENVI User’s Guide

Overlaying Classes

266

Chapter 4: Interactive Display Functions

• To display a class on the image click in the On check box next to the class name. Any number of classes can be displayed at once.

• To turn on and display a single class while turning all others off, doubleclick with the left mouse button on the colored box next to class to be displayed.

• To turn it off and display all the other classes, double-click with the left mouse button on that class again.

• To turn all classes off, click the right mouse button on a colored box.

• To turn all the classes on, click again with the right mouse button on any colored box.

Editing Classes

Use the Edit menu to edit classes by adding, deleting, or moving pixels between classes and by drawing polygons, rectangles, or ellipses.

Tip

Save your changes often by selecting File

Save so if you make a mistake you don’t have to recreate everything!

Selecting the Active Class

In the Interactive Class Tool dialog, make sure the active class is the class you want to edit.

To change the active class:

• Click on the colored box next to the desired class name.

If you are editing a class:

• Choose which window to draw in by clicking on the Image, Scroll, or Zoom toggle button.

Setting Mouse Functions to Normal

To set the mouse button functions to normal display mode:

• Select Edit

Mode: No Editing.

Overlaying Classes

ENVI User’s Guide

Chapter 4: Interactive Display Functions

267

Drawing Polygons to Add Pixels

To draw polygons in the selected image and add pixels from the polygon to the selected class:

1. Select Edit

Mode: Polygon Add to Class.

2. Select the desired class to which to add pixels.

3. Draw a polygon on the image using the left mouse button.

• To close the polygon, click the right mouse button.

• To accept the polygon, click the right mouse button again.

The new pixels change to the active class color.

Note

When moving pixels into another class, you will not see changes to the new class color until you turn the class on.

Drawing Polygons to Delete Pixels

To delete pixels from the active class by drawing polygons:

1. Select Edit

Mode: Polygon Delete from Class.

2. Select Edit

Set delete class value.

3. In the dialog, select a class to which the deleted pixels will be assigned.

4. Draw polygons on the image to remove those pixels from the active class.

Setting Polygon Colors

The drawing color is the color used to outline your polygon while drawing. It is not the color the polygon is filled with once it is set. The fill color is the color defined for the class.

To set the drawing color of a polygon:

1. Select Edit

Set polygon draw color.

2. From the Polygon Color menu button, select a color.

3. Click OK.

ENVI User’s Guide

Overlaying Classes

268

Chapter 4: Interactive Display Functions

Selecting Polygon Types

To select what type of polygon you draw:

• Select Edit

Polygon Type: the desired type.

Saving Changes

To save changes:

• Select File

Save.

Undoing Class Changes

To undo all unsaved changes:

1. Select Edit

Undo Changes.

2. In the question dialog, click Yes.

Class Options

Use the Options menu to obtain statistics for classes and to change class colors and names.

Viewing Class Distributions

To produce a report showing the number of pixels and percentage of pixels in each class, select Options

Class distributions.

The report is processed and displayed in the Classification Distribution window. The report is automatically updated as pixels are added or removed from classes during editing.

Editing Class Names and Colors

To change class colors and/or class names, select Options

Edit class

colors/names.

The Class Color Map Editing dialog appears. See

“Mapping Class Colors” on page 407 for detailed instructions.

Overlaying Classes

ENVI User’s Guide

Chapter 4: Interactive Display Functions

269

Merging Classes

To merge one or more classes into a selected base class:

1. In the Interactive Class Tool dialog, select Options

Merge classes.

The Interactive Merge Classes dialog box appears.

2. Select the base class by clicking on the desired class name.

3. Select the classes to merge into the base class by clicking on the desired class names.

4. Click OK.

The next time you open the Class Distributions dialog, it will be updated.

Plotting Mean Spectra

To plot a mean spectrum for the active class:

• Select Options

Mean for active class. If the Input File Associated with

Classification Image dialog appears, select the input file to calculate the statistics from and click OK. The dialog appears only if an input file hasn’t been set previously.

To plot the mean spectrum for all classes:

• Select Options

Mean for all classes.

ENVI computes the statistics and displays the mean spectra in a Class Means plot window.

Plotting Statistics

To plot the statistics for the active class:

• Select Options

Stats for active class. If the Input File Associated with

Classification Image dialog appears, select the input file to calculate the statistics from. The dialog appears only if an input file hasn’t been set previously.

ENVI User’s Guide

Overlaying Classes

270

Chapter 4: Interactive Display Functions

To plot the statistics for all classes:

• Select Options

Stats for all classes. ENVI computes the statistics and displays a plot window. The mean spectrum is in white, the +/– one standard deviation is in green, and the minimum and maximum spectra are in red.

Tip

To get a text report and more detailed statistics for your classes, select

Classification

Post ClassificationClass Statistics.

Changing the Statistics File

To change the statistics data file associated with the statistics:

1. Select Options

Associated stats data file.

2. In the Input File Associated with Classification Image dialog, select the filename. Click OK.

Setting Class Transparency

To set a class transparency factor that allows the underlying image to show through the overlying classes perform the following steps.

Note

This option is only available in 24-bit color mode.

1. Select Options

Class Transparency.

2. Enter a transparency factor and click OK.

A transparency factor of 0 allows no underlying image to show through the classes; the classes are opaque. A transparency factor of 100 shows only the underlying image with no overlying classes. A transparency factor of 50 shows half underlying image and half overlying classes.

Overlaying Classes

ENVI User’s Guide

Chapter 4: Interactive Display Functions

271

Saving Classification Images

1. In the Interactive Class Tool dialog, select File

Save Changes to File.

Note

Selecting Yes in the next step will write over the existing classification file.

2. In the question dialog, click Yes.

The current filename is written over by the changed file.

Saving Classification Displays as Images

To output the image with the classes overlaid:

• Select File

Save Image As the desired output.

To print the image with the classes overlaid:

• Select File

Print.

Note

Only the classes that are turned on appear in the output.

The classification overlay will be listed in the Graphics Overlay Selections list of the Change Graphics Overlay Options dialog as <Displayed Class Overlay>. For

more information, see “Setting Graphics Overlay Options” on page 455.

Hiding the Interactive Class Tool

To hide or show the Interactive Class Tool dialog without erasing your classes, see

“Showing and Hiding Overlay Dialogs and Layers” on page 239.

Closing the Interactive Class Tool

To close the Interactive Class Tool and quit the function:

• Select File

Cancel.

ENVI User’s Guide

Overlaying Classes

272

Plotting Contour Lines

Chapter 4: Interactive Display Functions

Use the Contour Lines option to overlay contour lines on an image. You can generate contour lines from a displayed image or from a different image. For example, you can extract contour lines from a digital elevation model and overlay them on another co-registered displayed image.

Figure 4-15: DEM Contours Overlain on a Landsat TM Image

1. From the Display menu bar, select Overlay

Contour Lines.

2. When the Input Contour Band dialog appears, click on the band from which the contours will be generated.

Note

Only bands that are the same size as the displayed image are available.

3. Once the contour source image has been defined, the #n Contour Plot dialog appears (where n is the originating display number). Eight default contour levels are listed under Defined Contour Levels. These levels are defined using a minimum and maximum data value calculated using the Scroll window and shown in the Min and Max text boxes.

Plotting Contour Lines

ENVI User’s Guide

Chapter 4: Interactive Display Functions

273

4. Enter the desired minimum and maximum values in the appropriate text boxes.

Note

Clicking Reset returns the range to its initial values.

5. Next to the Window label, select the Image and/or Scroll check boxes to designate the window where the contours will be plotted.

6. Click Apply to plot the contours.

Editing Contour Levels

To edit individual contour levels perform the following steps.

1. In the Contour Plot dialog, click on a specific contour in the Defined

Contours Levels list.

Figure 4-16: The Display Contour Plot Dialog

2. Click Edit Level.

3. Change the value to be contoured by entering the desired value in the Level text box.

ENVI User’s Guide

Plotting Contour Lines

274

Chapter 4: Interactive Display Functions

4. Assign a label to be plotted with the contour by entering the desired text in the

Label text box.

5. Specify the color for the selected contour, the line style, and the thickness by choosing the desired parameter and changing the value.

6. Click OK to make the changes to the levels in the Defined Contour Levels list.

7. Click Apply to replot the contours on the image.

To add new levels or set default levels, see “Contour Level Options” on page 274.

Removing Levels

To remove a level from the Defined Contours List:

1. Click on a specific contour level to select it.

2. Click Delete Level.

3. Click Apply to replot the contours.

Clearing Levels

To clear all the levels from the Defined Contours List, click Clear Levels.

Contour Level Options

Use the Options pull-down menu to add new levels, set default levels, and change the contour band.

Contour Overlay Labeling

You can label all of the contour lines overlaid on a DEM with a simple procedure:

1. In the menu of a DEM display, select Overlay

Contour Lines.

2. When the Contour Plot dialog appears, select Options

Label Contours

with Level Value.

3. Click Apply.

Each contour is labeled with its elevation value, and the labels are added to the image display.

Plotting Contour Lines

ENVI User’s Guide

Chapter 4: Interactive Display Functions

Removing Contour Labels

You can remove the contour labels by doing the following:

Warning

This action clears the labels associated with the contours. This action cannot be undone.

275

1. Select Options

Reset Contour Labels.

2. Click Apply.

Adding Contour Levels

1. In the Contour Plot dialog, select Options

Add New Levels.

Figure 4-17: Add Contour Levels Dialog

2. When the Add Contour Levels dialog appears, enter an individual contour or ranges of contours by specifying a value in the Start Level text box.

3. Specify the increment between contours by entering a value in the Level Inc parameter box.

4. Enter a value in the # parameter box to specify the number of contours.

5. Select from the following steps to set the attributes of the contour.

• To change the thickness, select from the Thick menu.

• To change the line style, select from the Style menu.

ENVI User’s Guide

Plotting Contour Lines

276

Chapter 4: Interactive Display Functions

• To change the color, select from the Color menu.

• Click on the arrow toggle button to change the contour colors from Use

same color for each level, which plots all the contours in the same color, to Increment colors for each level, which plots each contour level in a different color. The different colors of contour levels will follow the list of graphic colors.

6. Click OK to enter the new contours into the Defined Contour Levels list.

7. Click Apply to plot the contours.

Selecting New Contour Sources

Specify a new image from which to generate levels by selecting the New Contour

Band option:

1. Select Options

New Contour Band.

2. When the standard ENVI file selection dialog appears, select the desired file or band name from which to generate the new levels.

Setting the Number of Default Levels

1. Select Options

Set Number of Default Levels.

2. Enter the desired number of default contour levels.

Applying Default Levels (Single Color)

Use Apply Default Levels (same color) to reset the Defined Contour Levels list to the default levels determined by the Min and Max values and the number of default levels. When you select this option, all levels are plotted in a single color.

1. Select Options

Apply Default Levels (same color).

2. Click Apply to plot the contours.

Applying Default Levels (Multi Colors)

Use Apply Default Levels (multi color) to reset the Defined Contour Levels list to the default levels determined by the Min and Max values and the number of default levels. When you select this option, the contours are plotted in multiple colors:

1. Select Options

Apply Default Levels (multi color).

2. Click Apply to plot the contours.

Plotting Contour Lines

ENVI User’s Guide

Chapter 4: Interactive Display Functions

277

Managing Contour Files

Use the File menu to save defined contour levels, restore previously saved levels, export the contours to ENVI Vector Files (

.evf

), and to close the dialog.

Saving Contour Levels to Files

1. In the Contour Plot dialog, select File

Save Levels.

2. Enter an output filename with the default filename extension of

.lev

for consistency.

Restoring Saved Contour Levels

1. Select File

Restore Levels.

2. When the standard ENVI file selection dialog appears with all files with the

.

lev extension listed by default, select the desired file name.

Exporting Contours to ENVI Vector Files (

.evf

)

When exporting contour lines to an EVF file, you can export the elevation values and the contour labels as attributes. As attributes, they will appear in the Layer Attributes table for the EVF file.

1. From within the Contour Plot dialog, select File

Output Contours to

EVFs.

2. When the Output Contours to EVF Parameters dialog appears, select from the following new options:

• To output the elevation values as an attribute of the EVF file, select Yes next to the Output Elevation as Attribute? label.

• To output the contour labels as an attribute of the EVF file, select Yes next to the Output Labels as Attribute? label.

The elevation values are output as double-precision numeric and the labels are output as text.

ENVI User’s Guide

Plotting Contour Lines

278

Chapter 4: Interactive Display Functions

The output EVFs appear in the Available Vectors List.

Note

If your file is larger than the tile size, then it is subsampled to fit within a single tile

(see “Image Tile Size” on page 1074). For example, if your image is 2048 x 2048

pixels and the tile size is set to 1 Mbyte, that image is subsampled to 1024 x 1024 pixels and the contours are calculated and then output. Therefore the resolution of the output EVF may not be the same as the contour overlay.

Hiding the Contour Plot Dialog

To hide or show the Contour Plot dialog without erasing your contours, see

“Showing and Hiding Overlay Dialogs and Layers” on page 239.

Closing the Contour Plot Dialog

To close the Contour Plot dialog and remove the contours from the image:

• Select File

Cancel.

Plotting Contour Lines

ENVI User’s Guide

Chapter 4: Interactive Display Functions

Interactive Density Slicing

279

Use Density Slice to select data ranges and colors for highlighting areas in your grayscale image. The data ranges used in the density slice coloring can be from the displayed image or from another image of the same size.

1. From the Display menu bar, select or Overlay

Density Slice or

Tools

Color Mapping Density Slice. The Density Slice Band Choice dialog appears. It lists all of the bands that have the same spatial size as the image in the display window.

2. Select the band to use for the density slice data ranges by clicking on the bandname. The #n Density Slice dialog (where n is the display number used to start the function) appears with eight default ranges listed under Defined

Density Slice Ranges. The ranges are defined using a minimum and maximum data value calculated from the Scroll window and shown in the Min and Max text boxes.

Figure 4-18: The Density Slice Dialog

3. Enter the desired minimum and maximum values in the appropriate text boxes to change the density slice range. To reset the data range to the initial values, click Reset.

ENVI User’s Guide

Interactive Density Slicing

280

Chapter 4: Interactive Display Functions

4. Select whether the density slice colors are applied to the image window, scroll window, or both windows by selecting the desired check boxes next to

Windows at the bottom of the dialog.

5. Click Apply to apply the selected ranges and colors to the image.

• To remove a range from the list, select the data range and click Delete

Range.

• To clear the list of density slice ranges, click Clear Ranges.

Editing Data Ranges

To change the range values or color of a density slice:

1. In the Density Slice dialog, highlight a data range and click Edit Range. The

Edit Density Slice Range dialog appears. The dialog choices are different depending on whether you are using a 24-bit or 8-bit display.

2. Select one of the following options:

• If you have an 8-bit display, enter the desired minimum and maximum values and select a color from the Colors menu.

• If you have a 24-bit display, select RGB, HLS, or HSV as your color system from the System button menu. Use the slider bars or the arrow increment buttons to set you own color definitions.

3. Click OK to make the changes to the range in the Defined Density Slice

Ranges list.

4. Click Apply to apply the new ranges and colors to the image.

Interactive Density Slicing

ENVI User’s Guide

Chapter 4: Interactive Display Functions

281

Density Slice Options

Use the Options menu to add new ranges, set default ranges, and set the number of default ranges to be used.

Adding Ranges

To add new ranges to the list in the Density Slice dialog:

1. Select Options

Add New Ranges.

2. When the Add Density Slice Ranges dialog appears, enter the Range Start value, Range End, and Number of Ranges desired in the appropriate text boxes.

3. Choose the starting color from the Colors menu. The colors of multiple ranges will follow the list of graphics colors.

4. Click OK to return to the Density Slice dialog. The determined ranges are listed in the dialog and can be edited as desired.

5. Click Apply to apply the density slicing colors to the image.

Changing Bands

1. In the Density Slice dialog, select Options

Change Density Slice Band.

The Density Slice Band Choice dialog appears.

2. Change the band used for the density slice data ranges by clicking on the bandname.

The new density slice coloring is automatically applied.

Setting Defaults

To enter the desired number of default ranges used:

• Select Options

Set Number of Default Ranges and enter the desired value.

Resetting Defaults

To reset the Defined Density Slice Ranges list to the default ranges and colors determined by the Min and Max values and number of set default ranges:

1. Select Options

Apply Default Ranges.

2. Click Apply to apply these ranges and colors to the display.

ENVI User’s Guide

Interactive Density Slicing

282

Chapter 4: Interactive Display Functions

Managing Density Slice Files

Use the File pull-down menu to save density slices, restore density slices, export density slice ranges to vector files, or export density slice ranges to a class image.

Saving Density Slices

To save the current list of density slice ranges and colors to a file:

1. In the Density Slice dialog, select File

Save Ranges.

2. Enter an output filename with a default extension of

.dsr

for consistency.

Restoring Saved Density Slices

To restore previously saved density slice ranges and colors:

1. Select File

Restore Ranges.

2. Select the desired input file.

Exporting Density Slice Ranges to a Vector File

To export density slice ranges to an ENVI Vector File (

.evf

):

1. From the Density Slice dialog, select File

Output Ranges to EVFs. The

Output Ranges to EVFs dialog appears. This dialog contains the following items.

Select Ranges for EVFs — This list contains the possible ranges that are available for exporting. Highlight one or more ranges to select them for export.

Select All Items and Clear All Items — These buttons allow you to select or deselect all the ranges in the list.

Interactive Density Slicing

ENVI User’s Guide

Chapter 4: Interactive Display Functions

283

Output — This toggle button allows you to specify that the ranges are to be exported as a single vector layer (Single Layer), or as separate layers

(One Layer per Range), one per range.

Output Result to — These radio buttons are used to specify how the exported data is stored. If File is selected, the output vectors are stored on disk in an ENVI vector file. You must specify a filename for the saved output in the Enter Output Filename text box. The default file extension for the ENVI Vector File format is

.evf

. If Memory is selected, the output vectors are stored in memory.

2. When you are satisfied with your selections, click OK in the dialog to export the density slice ranges to an ENVI Vector File (

.evf

).

Exporting Density Slice Ranges to a Class Image

To export density slice ranges to an ENVI classification image (class image):

1. From the Density Slice dialog, select File

Output Ranges to Class Image.

The Output Ranges to Class Image dialog appears.

2. In the following Output Result to section, choose either File or Memory. If

File is selected, the output image is stored on disk in an ENVI image file. You must specify a filename for the saved output in the Enter Output Filename text box. If Memory is selected the output image is stored in memory.

3. When you are satisfied with your selection, click OK in the dialog to export the ranges to an ENVI classification image (class image).

Hiding the Density Slice Dialog

To hide or show the Density Slice dialog without erasing your color tables, see

“Showing and Hiding Overlay Dialogs and Layers” on page 239.

Closing the Density Slice Dialog

To close the Density Slice dialog and reset the original color table:

• Select File

Cancel.

ENVI User’s Guide

Interactive Density Slicing

284

Grid Lines

Chapter 4: Interactive Display Functions

Use Grid Lines to overlay one or more grids on an image. Grids can be pixel-based or map-coordinate and/or latitude/longitude based (for georeferenced images). Each image display can have its own set of grids, which are displayed in the Main Image,

Scroll, and Zoom windows.

Tip

Use ENVI’s QuickMap feature to quickly overlay grid lines, titles, declination diagrams, North arrows, and borders on georeferenced images. For details, see

“Creating QuickMaps” on page 320.

Grid Lines

Figure 4-19: A Pixel-based Image Grid

ENVI User’s Guide

Chapter 4: Interactive Display Functions

285

Figure 4-20: Multiple Grid (Pixel, Map, Geographic) Coordinates on a

Georeferenced Image

Pixel-Based Image Grids

Images that have not been referenced to map coordinates can only have pixel-based grids. In this case, the grid spacing is specified in pixels (from (1, 1) in the upper left corner) and the grid lines are labeled with the pixel coordinates.

ENVI User’s Guide

Grid Lines

286

Chapter 4: Interactive Display Functions

Georeferenced Image Grids

Georeferenced images have grids that are based on map coordinates or geographic coordinates (latitude/longitude). The image is assumed to already be in the appropriate map projection prior to displaying the grid. The grid spacing is specified in projection units (normally meters), based on the reference pixel given in the image header file. The grid coordinates are labeled with the appropriate map coordinates.

Overlaying Grid Lines

1. Select Overlay

Grid Lines. The Grid Line Parameters dialog appears and the image is re-displayed with a virtual border if one is not already applied.

2. Select the desired check boxes next to the Window label at the bottom of the dialog to plot the grid lines in the Image window and/or the Scroll window.

3. To select the grids to be displayed, click the On/Off arrow toggle buttons next to the labels Pixel Grid, Map Grid, and Geographic Grid.

If the image is not georeferenced, then the Map and Geographic coordinate grids will not be available. If your image is georeferenced, both the Map and

Geographic grids are turned on initially.

Note

To hide or show the Grid Line Parameters dialog without erasing your classes, see

“Showing and Hiding Overlay Dialogs and Layers” on page 239.

Setting Pixel and Map Grid Spacing

Grid spacing is in number of pixels for pixel-based grids and in meters for map coordinate grids.

• In the Grid Line Parameters dialog, enter values into the text boxes labeled

Grid Spacing.

Setting Geographic Grid Spacing

1. In the Grid Line Parameters dialog, click on the DMS

DD button to change between degrees-minutes-seconds and decimal-degrees for the geographic grids.

2. In the Spacing text boxes, enter the desired spacing in degrees-minutesseconds or decimal-degrees.

3. Click Apply to plot the grids on the image.

Grid Lines

ENVI User’s Guide

Chapter 4: Interactive Display Functions

287

Grid Line Options

Use the Options menu in the Grid Line Parameters dialog to change the characteristics of all three grids and to change the display borders.

Changing Borders

To change the display borders size and color:

1. Select Options

Set Display Borders.

2. Enter the desired border size for the left, top, right and bottom in pixels.

3. Select the desired color from the Border Color menu.

Editing Grid Characteristics

To change colors, label size and font, and other grid characteristics:

1. Within the Grid Line Parameters dialog, select Options

Edit

Pixel/Map/Geographic Grid Attributes.

2. When the Edit Map Attributes dialog appears, select from the following steps to change the characteristics of the labels, lines, box, and corners.

• To turn on and off the plotting of the specific grid elements on the displayed image, toggle the On/Off arrow toggle buttons next to each element name.

• To plot grid labels outside the image in the virtual border, turn on Labels.

Ticks are also placed along the edges of the image adjacent to the labels.

• To change the color, click Colors and select a color.

• To change the thickness of the label, enter a value in the Thick text box.

• To change the font of the labels, select from the Font menu.

• To change the size, enter a value in the Charsize text box.

• To control the distance of the labels from the edge of the image for each grid type, use the Dist parameter. Larger numbers are farther from the edge.

• The X-axis Labels and Y-axis Labels arrow toggle buttons toggle between horizontal (H) or vertical (V) display of labels for both the X and

Y grid axes independently.

• To plot X and Y grid lines, turn on the Lines option.

ENVI User’s Guide

Grid Lines

288

Chapter 4: Interactive Display Functions

• To draw a Neat Line box around the image, turn on the Box option.

• To plot tick marks at each grid intersection, turn on Corners.

• To set the line type for the grid and box lines (solid, dotted, dashed, etc.), select from the Style menu.

• To set the thickness of the items, enter the value in the Thick parameter box.

3. Click OK when the grid line attributes are set.

4. Click Apply to plot the grid lines on the image.

Managing Grid Files

Use the File pull-down menu to save and restore grid setups.

Saving Grid Parameters

To save the grid parameter settings to a file:

1. Select File

Save Setup.

2. When the Output Grid Parameters dialog appears, enter an output filename.

Note

Grid setup files should be saved with the file extension

.grd

for consistency, but may be saved using other extensions.

Restoring Saved Grid Setups

1. Select File

Restore Setup.

2. When the file selection window appears with all .

grd files listed by default, select the grid file.

3. Click OK.

Saving Grid Lines

See

“Display Output Options” on page 446 for instructions to burn Grid Lines into

images. The virtual border is automatically added to the image and the grid labels are burned in around the outside of the image.

Grid Lines

ENVI User’s Guide

Chapter 4: Interactive Display Functions

Defining Regions of Interest

289

Regions of interest (ROIs) are portions of images, either selected graphically or selected by other means such as thresholding. The regions can be irregularly-shaped and are typically used to extract statistics for classification, masking, and other operations. ENVI allows selection of any combination of polygons, points, or vectors as a region of interest. Multiple regions of interest can be defined and drawn in any of the Main Image, Scroll, or Zoom Windows. Regions of Interest can be grown to adjacent pixels that fall within a specified pixel value threshold.

Figure 4-21: Polygon, Polyline, and Rectangle ROIs in the Three Display

Windows

ENVI User’s Guide

Defining Regions of Interest

290

Chapter 4: Interactive Display Functions

Note

ROIs are explicitly related to the spatial size of the image in which they are defined.

If you open, or have opened, images of equal spatial size with their associated ROI

Tool dialogs, ROIs drawn in one image will be displayed in all other image displays of the same spatial size. You can edit or delete shared ROIs from within any of the

ROI Tools dialogs.

1. Select one of the following options:

• From the Display menu bar of the image that you want to add ROIs to, select Overlay

Region of Interest or ToolsRegion of Interest

ROI Tool.

• Make the display group of the image you want to add ROIs to active and select Basic Tools

Region of InterestROI Tool from the ENVI main menu.

2. The #n ROI Tool dialog appears, where n is equal to the display number.

Figure 4-22: The ROI Tool Dialog

3. Select whether ROI definition will take place in the Main Image window, the

Scroll window, or the Zoom window of the selected display by selecting the

Image, Scroll, or Zoom toggle button.

4. Draw ROIs as described in

“Drawing ROIs” on page 291.

You can also add, edit, and create additional ROIs as described in the following sections.

Defining Regions of Interest

ENVI User’s Guide

Chapter 4: Interactive Display Functions

291

Turning off ROI Definition

When the ROI Definition function is enabled, actions such as zooming, panning and other display operations are not enabled.

To enable these interactive mouse operated functions without leaving ROI Definition, click the Off toggle button in the ROI Tool dialog.

Drawing ROIs

The following ROI types are available in ENVI:

• Polygon

• Polyline

• Point

• Rectangle

• Ellipse

• Multi-Part (donut)

A single region can contain any combination of the six ROI types. Each type has a different set of mouse button assignments.

The mouse assignments and drawing options are explained in the following sections and summarized in the following table.

ROI Type

Polygon or

Polyline

Action

Define endpoints

Remove last endpoint

Delete entire polygon/polyline

Close polygon or end polyline

Accept polygon or polyline

Mouse

Button

Left

Middle

Middle

Right

Right

Interaction

Click or Press and drag

Click

Click on defined polygon/polyline

Click

Click

Table 4-4: ROI Mouse Operations

ENVI User’s Guide

Defining Regions of Interest

292

Chapter 4: Interactive Display Functions

ROI Type

Point

Rectangle or

Ellipse

Multi Part

Action

Mouse

Button

Select point

Delete point

Left

Middle

Delete all points in ROI Right

Define shape Left

Delete shape

Accept shape

Accept multi part ROI

Middle

Right

Right

Interaction

Click on pixel

Click on pixel

Click

Press and drag

Click within shape

Click

Click three times after the ROI_Type

Multi

Part: On option is set.

Table 4-4: ROI Mouse Operations (Continued)

Note

If you have multiple images of the same size displayed and their associated ROI

Tools dialogs open at the same time, any ROIs drawn in one image display will also be displayed in the others.

Drawing Polygons

The polygon mode is the default method for ROI definition. Use polygons to outline a region of interest with connected line segments.

1. In the ROI Tool dialog, select ROI_Type

Polygon.

2. Click the left mouse button in the active window to establish an initial endpoint for an outlining segment. As the mouse is moved to select another endpoint, a line is shown to exactly indicate the position of the current segment.

3. Click the left mouse button again to define the segment, which is drawn in the selected color.

Note

For continuous drawing, hold the left mouse button down and move the cursor.

Defining Regions of Interest

ENVI User’s Guide

Chapter 4: Interactive Display Functions

293

4. Choose additional segments in the same manner until the entire region of interest is outlined.

Note

To erase the last segment defined at any point during the segment selection process, click the middle mouse button.

5. Click the right mouse button to draw the last segment and automatically close the polygon.

6. Move the polygon to the desired location by clicking on the diamond-shaped handle and dragging with the left mouse button.

7. Click the right mouse button to accept the polygon. As the polygon is completed, the total number of pixels contained in the ROI is listed in the ROI

Tool table (along with other ROI properties). For more information on the ROI

Tool table, see

“Editing ROI Attributes” on page 296.

Note

You may draw multiple polygons for each ROI. Each successive polygon is drawn as above and its pixels added to the total for the region. When completed, the polygon is filled with a solid color by default.

8. To delete entire polygons from the ROI at any time, click the middle mouse button while the cursor is on the desired polygon.

9. When you are satisfied with the new ROI, select File

Cancel to dismiss the

ROI Tool dialog or click the New Region button to define another region of interest.

Drawing Polylines

The polyline mode is similar to the polygon mode except that a multi-segment vector is drawn rather than a closed polygon. The regions enclosed by the defined line segments are not selected and filled upon completion. Only the pixels comprising the line segments themselves are selected.

1. In the ROI Tool dialog, select ROI_Type

Polyline.

2. Click the left mouse button to define the endpoints of connected line segments.

• To remove the previous segment, click the middle mouse button.

• For continuous drawing hold down the left mouse button while drawing.

3. Click the right mouse button to end the process of defining a polyline.

ENVI User’s Guide

Defining Regions of Interest

294

Chapter 4: Interactive Display Functions

4. Use the handle on the polyline to move the line.

Note

To erase the entire polyline, click the middle mouse button on any pixel of a previously-defined polyline.

5. Click the right mouse button to accept the polyline.

6. When you are satisfied with the new ROI, select File

Cancel to dismiss the

ROI Tool dialog or click the New Region button to define another region of interest.

Drawing Points

Use the point mode to select or delete individual pixels under the cursor.

Tip

For best results, add Point ROIs in the Zoom window.

1. In the ROI Tool dialog, select ROI_Type

Point.

2. Click the left mouse button to add the pixel currently under the cursor to the

ROI.

• To delete a previously-selected pixel (currently under the cursor) from the

ROI, click the middle mouse button.

• To delete all pixels in the currently-selected point mode ROI, click the right mouse button.

3. When you are satisfied with the new ROI, select File

Cancel to dismiss the

ROI Tool dialog or click the New Region button to define another region of interest.

Drawing Rectangles and Ellipses

Use the rectangle and ellipse modes to draw rectangles and ellipses as ROIs.

1. In the ROI Tool dialog, select ROI_Type

Rectangle or Ellipse.

2. Click the left mouse button and drag the cursor to the desired size of the rectangle or the ellipse.

Note

To draw a square or circle, click and drag while holding the middle mouse button.

Defining Regions of Interest

ENVI User’s Guide

Chapter 4: Interactive Display Functions

295

3. Grab the diamond-shaped handle in the rectangle or ellipse and move the shape to the desired location.

Note

To delete the shape, click the middle mouse button on the rectangle or ellipse.

4. Click the right mouse button to accept the shape into the ROI.

5. When you are satisfied with the new ROI, select File

Cancel to dismiss the

ROI Tool dialog or click the New Region button to define another region of interest.

Drawing Multi Part ROIs

Use multi part mode to draw ROIs with holes in them, or donut ROIs.

1. Select ROI_Type

Polygon, Rectangle, or Ellipse.

Note

You cannot draw Multi Part ROIs using point or polyline ROIs.

2. Select ROI_Type

Multi Part:On.

3. Draw the base ROI using the drawing methods for the specific ROI type as described in the previous sections.

Note

The ROI does not become filled in until you click the right mouse button a second time.

4. Draw any number of additional ROIs or parts within the first ROI to create holes. Again, the ROIs do not become filled in when you click the right mouse button the second time.

Note

Holes cannot cross the path of any other polygon within its group.

5. After adding parts to the ROI, click the right mouse button a third time to accept the multi part ROI.

The base ROI becomes filled in, and the parts are removed to reveal holes in the base

ROI.

ENVI User’s Guide

Defining Regions of Interest

296

Chapter 4: Interactive Display Functions

Editing ROI Attributes

You can view or edit any ROI properties with the Available Regions of Interest table in the ROI Tool dialog. The table contains the following columns:

Current Selection — This column uses an asterisk to signify the currently active ROI. You can specify the currently active ROI in this column by clicking in the cell of the desired ROI’s row.

ROI Name — This column contains the name of each ROI. The ROI names can be edited by clicking in the cells of this column.

Color — This column contains the color assigned to each ROI. You can use any of the following methods to change the color of an ROI.

• Right-click in its cell to display the color shortcut menu.

• Left-click in its cell to enter a valid ENVI graphics color name. All of the valid color names are provided in the color shortcut menu. If the color entered in the cell is not valid, it is replaced by a default color.

• Left-click in its cell to enter an RGB triplet (such as 255, 0, 0 for red). If an

RGB triplet is provided, the closest valid ENVI graphics color is used.

You can also set the default ENVI colors for all the ROIs by right-clicking in the Color column title and selecting the Assign default colors option from the resulting shortcut menu. This shortcut menu can also be used to set all the

ROIs to the same color.

• Pixels — This column displays the total number of image pixels for each ROI.

The values in this column cannot be edited.

• Polygons, Polylines, and Points — These columns display the total number of

ROI types and the number of pixels in each ROI type. The values in these columns cannot be edited.

Defining Regions of Interest

ENVI User’s Guide

Chapter 4: Interactive Display Functions

297

Fill — This column specifies the fill pattern for each polygon ROI. You can change the fill pattern of a polygon ROI by right-clicking in the cell of the fill pattern to be changed. This action displays the fill pattern shortcut menu. You can set the same fill pattern for all of the polygon ROIs by right-clicking in the column title.

Orien and Space — These columns display the orientation and spacing of stripes in non-solid filled polygon ROIs. If the fill pattern for polygon ROIs exists and is non-solid, you can change these values by right-clicking in these cells to display their shortcut menus. You can set the same value for all of the non-solid filled polygon ROIs by right-clicking in the column title for each property.

Creating New Regions

You can draw multiple regions of interest in any image display window.

Note

If you have multiple images of the same size displayed and their associated ROI

Tools dialogs open at the same time, any ROIs drawn in one image display will also be displayed in the others.

1. To start a new ROI, click New Region in the ROI Tool dialog. A new name appears in the Available Regions of Interest table. The new region uses the next color in the graphics colors list by default.

2. Select the ROI type and draw the ROI.

3. Edit the ROI as needed.

ENVI User’s Guide

Defining Regions of Interest

298

Chapter 4: Interactive Display Functions

ROI Options

In the ROI Tool dialog, you have many options to choose from when working with

ROIs: inputting ASCII points into an ROI, creating multiple regions of interest, reporting ROI statistics, measuring distances and area, reporting the areas of the

ROIs, loading, erasing, deleting, plotting means, merging regions, reconciling ROIs, and performing band thresholds to ROIs.

Note

If the ROI is displayed in more than one image (of the same spatial size), any edits will be reflected in all of those images.

Hiding and Showing ROIs

Hiding an ROI removes it from the display, but the region of interest is still defined.

To hide a selected ROI overlay from the selected image:

• Select one or more ROIs in the Available Regions of Interest table and then click Hide ROIs. To re-display these ROIs on the image, click Show ROIs.

The Show ROIs dialog appears. This dialog enables you to select which ROIs are re-displayed on the image and in the table.

To hide all ROI overlays from the current display:

• Click Select All and then click Hide ROIs.

Deleting ROIs

Use the Tools menu in the Main Image display, the Delete button in the ROI Tool dialog, or the Basic Tools menu on the ENVI main menu to delete ROIs.

Warning

If the ROI to be deleted is displayed in more than one image (for images of the same spatial size), deleting it from one deletes it from all. Once the ROIs are deleted, they cannot be recovered unless they have been saved to a file.

Deleting ROIs from the ROI Tool dialog

• To delete a selected ROI, select one or more ROIs in the Available Regions of

Interest table and then click Delete.

• To delete all ROIs listed in the ROI Tool dialog and remove them from the system, click Select All and then click Delete.

Defining Regions of Interest

ENVI User’s Guide

Chapter 4: Interactive Display Functions

299

Note

The ROIs are deleted from all displays of the same spatial size and from their associated ROI Tools dialogs.

The unsaved ROIs are erased from the displays and deleted from the system. The

ROIs do not appear in the ROI Tool dialogs after being deleted.

Deleting Saved ROIs

To delete regions that are not currently displayed:

1. Select one of the following options:

• From the ENVI main menu, select Basic Tools

Region of Interest

Delete ROIs.

• From the Display menu bar, select Tools

Region of InterestDelete

ROIs.

2. When the Delete Regions dialog appears, click on the names of the regions to be deleted.

3. Click OK to permanently delete those ROIs.

Locating Defined ROIs

To center the zoom window over the first pixel defined in an ROI:

1. In the ROI Tool dialog, select an ROI in the Available Regions of Interest table and click Goto.

2. Continue clicking on Goto to move the zoom window over each pixel contained in that ROI.

Displaying ROI Statistics

1. In the ROI Tool dialog, select one or more ROIs in the Available Regions of

Interest table.

2. Click the Stats button.

The ROI Statistics Results dialog appears. This dialog is very similar to the Statistics

Results dialog (see “Producing Statistics Reports” in Chapter 5) and contains the

same functionality. However, the ROI Statistics Results dialog also contains additional sections for reporting multiple instances of statistical information:

ENVI User’s Guide

Defining Regions of Interest

300

Chapter 4: Interactive Display Functions

The File pull-down menu contains the following additional options:

Save current ROI result to ENVI stats file... — This option enables you to save the statistics report for the ROI specified in the Stats for section of the

ROI Statistics Results dialog to an ENVI statistics file. When this option is selected, the Save Current ROI Result to ENVI Stats File dialog appears. In the

Enter Output Stats Filename[.sta] section of this dialog, use either the text box or the Choose button to specify the name of the statistics file. The default file extension for ENVI statistics files is

.sta

. The statistics report is saved to the specified file when you click the OK button.

Save current ROI result to text file... — This option enables you to save the statistics report for the ROI specified in the Stats for section of the ROI

Statistics Results dialog to a text file. When this option is selected, the Save

Current ROI Result to Text File dialog appears. In the Enter Output Text

Filename[.txt] section of this dialog, use either the text box or the Choose button to specify the name of the text file. The statistics report is saved to the specified file when you click the OK button.

Tip

The resulting text file is tab-delimited for easy import into external spreadsheet programs, such as Excel.

Save all ROI results to ENVI stats files... — This option enables you to save the statistics reports for all the ROIs to separate ENVI statistics files. When this option is selected, the Save All ROI Results to ENVI Stats Files dialog appears. In the Enter Output Root Filename section of this dialog, use either the text box or the Choose button to specify the root name of the statistics files.

The default file extension for statistics files is

.sta

. The statistics report for each class or region is saved to individual files when you click the OK button.

The individual files have the same root name that you specified and are appended with their appropriate ROI number.

Save all ROI results to text file... — This option enables you to save the statistics report for all the ROIs to a text file. When this option is selected, the

Save All ROI Results to Text File dialog appears. In the Enter Output Text

Filename[.txt] section of this dialog, use either the text box or the Choose button to specify the name of the text file. The statistics report is saved to the specified file when you click the OK button.

Defining Regions of Interest

ENVI User’s Guide

Chapter 4: Interactive Display Functions

Tip

The resulting text file is tab-delimited for easy import into external spreadsheet programs, such as Excel.

301

This Stats for pull-down menu button contains a list of the available ROIs. The ROI

Statistics Results dialog reports the calculated statistics (in both the plot and text sections) of the ROI specified by this menu. To compare statistics for different ROIs with the current ROI shown in the Statistics Results dialog, use the Options

Copy

results to new window option to create a copy of the ROI Statistics Results dialog for the current ROI, then use the Stats for menu to display a different ROI in the newly created dialog.

The Select Plot pull-down button also contains the following additional options:

Mean for all ROIs — This option displays a plot of the means of all the ROIs.

Stdev for all ROIs — This option displays a plot of the standard deviations of all the ROIs.

Eigenvalues for all ROIs — This option displays a plot of the eigenvalues of all the ROIs.

Histogram for all ROIs — This option and its submenu display a plot of the histogram of all ROIs for a chosen band of data.

Displaying ROI Statistics for All Regions

To display the statistics for all defined regions of interest, choose Select All and then click Stats in the ROI Tool dialog. An ROI Statistics Results dialog containing the statistics for all the ROIs appears.

Growing ROIs

You can grow regions of interest to neighboring pixels using a specified threshold.

The threshold is determined by specifying a number of standard deviations away from the mean of the drawn region. You can use either 4 or 8 neighboring pixels to determine the growth pattern. It is calculated using the displayed band for a grayscale display, or the red band for a color display.

Note

All grown regions of interest are output as points, regardless of the starting ROI type.

1. In the Available Regions of Interest list, click on the name of the ROI to be grown.

ENVI User’s Guide

Defining Regions of Interest

302

Chapter 4: Interactive Display Functions

Note

Within the current image window, neighboring pixels that fall within the standard deviation threshold will be included in the grown region. Adjacent pixels outside the current image window, regardless of pixel value, will not be included in the ROI.

2. Click the Grow button. The new grown ROI is shown in the display window. A prompt asks if you want to keep the resulting grown ROI.

3. Select Yes to grow the ROI with all of the points shown. Select No to return the

ROI to its original size. If No is selected, the Region Growing dialog appears.

• In the Region Growing dialog, change the values of the standard deviation multiplier and the number of neighbors, if desired, and click OK to grow the ROI with the new parameters.

• Click on Cancel in the Region Growing dialog to exit the growing option without changing the original ROI.

Converting Shape-Based ROIs to Raster

Use the Pixel button to convert polygons, ellipses, rectangles, and polylines to a collection of editable points. This allows you to remove single points from polygons, rectangles, etc.

1. Draw a polygon or other ROI shape, or select an existing ROI to be converted into a collection of points.

2. Click the Pixel button in the ROI Tool dialog.

3. Select ROI_Type

Point from the ROI Tool dialog menu bar.

You can now edit individual pixels within the ROI using standard point editing techniques with the mouse.

Inputting ASCII Data into ROIs

You can input ASCII data points into a new or an existing ROI, select the ROI type, and select the associated map projection information if needed.

Tip

To input the ASCII data points into a new region, click New Region before completing the following procedure.

1. In the ROI Tool dialog, select ROI_Type

Input Points from ASCII.

Defining Regions of Interest

ENVI User’s Guide

Chapter 4: Interactive Display Functions

303

2. When the Enter ASCII Points Filename dialog appears, select an input ASCII filename.

3. When the Input ASCII File dialog appears, enter the column numbers for the X and Y point coordinates.

4. Select the type of ROI that the points define by clicking on the button menu next to the These points comprise label.

Note

For polygon and polyline ROIs, the ASCII points define the vertices of the

ROI.

5. Select whether the input coordinates are Pixel Based or Map Based.

Note

If you select Map Based, select the projection type and enter the zone and datum information as necessary by clicking on the Zone... and Datum... buttons.

6. Click OK.

Loading all Regions

To load all regions currently defined for all images with the same spatial dimensions as the currently selected display as shown in the Display # field, select Options

Load All Regions.

Merging Regions

To merge multiple defined regions of interest into one:

1. Select Options

Merge Regions.

The Merge ROIs dialog appears with two lists of all defined regions.

2. Under Choose Base ROI to Merge, click on the name of a region.

3. Under the Choose ROIs to Merge list, select the names of the regions to merge into the base region.

ENVI User’s Guide

Defining Regions of Interest

304

Chapter 4: Interactive Display Functions

4. Click the arrow toggle button next to Delete Merged ROIs? label to select whether or not you want the individual regions being merged to be deleted after they are merged. The color of the other ROIs change to that of the base

ROI and the other names are removed from the Available Regions of Interest list.

5. Click OK.

Intersecting Regions

Use Intersect Regions to create a point type region of interest that contains only the points where two or more ROIs intersect in an image.

1. In the ROI Tool dialog, select Options

Intersect Regions.

2. In the ROI Intersection dialog, click on the names of the intersecting ROIs to be included in the new ROI, then click OK.

Note

In the ROI Intersection dialog, only select regions that intersect. If a nonintersecting ROI is selected, an error will occur.

The new ROI appears in the Available Regions of Interest list. It is a point type

ROI and is displayed under any overlying polygon ROIs.

Tip

If you can’t see the new point ROI in the image display, erase all other ROIs and redisplay the new ROI.

Note

You can calculate ROI intersections on-the-fly and use them when building a mask.

For more information, see

“Including ROI Intersections” on page 531.

Defining Regions of Interest

ENVI User’s Guide

Chapter 4: Interactive Display Functions

305

Reporting ROI Areas

To get a report of the area covered by each ROI in one of these units: meters, kilometers, feet, yards, miles or nautical miles:

1. In the ROI Tool dialog, select Options

Report Area of ROIsdesired

units.

2. If the pixel size of the image is not stored in the header, a dialog will appear.

Enter the X and Y pixel size in meters.

The ROI Area Info dialog appears, listing each ROI name and corresponding area. To save ROI Area Information to an ASCII File, perform the following steps.

1. In the ROI Area Info dialog, select File

Save Text to ASCII.

2. Enter a filename.

Reporting ROI Measurements

Use the ROI Measurement Tool to produce a report on the distance between points in a polygon or polyline, and to get perimeter and area measures for polygons, rectangles, and ellipses.

Figure 4-23: The ROI Measurement Report Dialog

Note

To take measurements of an image without using the ROI functions, see

“Using the

Measurement Tool” on page 497.

ENVI User’s Guide

Defining Regions of Interest

306

Chapter 4: Interactive Display Functions

1. In the ROI Tool dialog, select Options

Measurement Report. The ROI

Measurement Report dialog appears with the measurements reported. The measurements differ depending on the active ROI type.

2. Draw the ROIs as described in “Drawing ROIs” on page 291 for specific ROI

types.

• For Polygon mode, the distance between the vertices are listed and the perimeter and total area are reported when the polygon is closed.

• For Polylines, the distance between the vertices are listed and the total distance is given when the polyline is completed.

• No distance measures are given when in Point mode.

• In Rectangle mode, the lengths of the sides, the perimeter, and total area are reported.

• In Ellipse mode, the circumference and total area are reported.

Selecting Measurement Units

In the ROI Measurement Report dialog, use the Units menu to select the unit the ROI is measured in. The choices are pixels, meters, kilometers, feet, yards, miles, and nautical miles.

1. Select Units

the desired unit.

2. If the pixel size of the image is not stored in the header, and you select any unit except pixel, complete these steps when the Input Display Pixel Size dialog box appears.

A. In the X Pixel Size and Y Pixel Size text boxes, type the size of the pixels in your image.

B. From the Units button menu, select the unit type. Click OK.

Measuring ROI Area

In the ROI Measurement Report dialog, use the Area menu to measure the area of the

ROI in acres, hectares, or units

2

(e.g., meters

2

).

• Select Area

Acres or Hectares.

ROI Measurement Options

In the ROI Measurement Report dialog, use the Options menu to select whether the measurement information is reported as line segments (the default) or as point coordinates.

Defining Regions of Interest

ENVI User’s Guide

Chapter 4: Interactive Display Functions

307

To get a listing of the vertices coordinates:

• Select Options

Report as Points. The coordinates will be reported as a pixel location (Pixel (x,y)).

To get a listing of the line segment distances:

• Select Options

Report as Segments.

For images that are georeferenced, you may list the coordinates as map coordinates or as latitude and longitude coordinates by selecting Options

Georef Map (x,y) or

Georef (Lat/Lon).

To output the list of coordinates to a file:

• Select File

Save Points to ASCII.

Saving Measurement Reports

In the ROI Measurement Report dialog, use the File menu to save the ROI measurement report to an ASCII file and to close the dialog.

To save the measurement report:

1. In the ROI Measurement Report dialog, select File

Save Points to ASCII.

2. Enter an output filename.

Reconciling ROIs

In the ROI Tool dialog, use Reconcile ROIs to apply ROIs defined in one image size to different sized images.

Note

Using Reconcile ROIs, ROIs can only be reconciled to images with the same pixel size as the original image. To reconcile ROIs to an image with a different pixel size, use Reconcile ROIs via Map.

1. Select one of the following options:

• In the ROI Tool dialog, select Options

Reconcile ROIs.

• From the Display menu bar, select Tools

Region of Interest

Reconcile ROIs.

ENVI User’s Guide

Defining Regions of Interest

308

Chapter 4: Interactive Display Functions

• From the ENVI main menu, select Basic Tools

Region of Interest

Reconcile ROIs.

Figure 4-24: The Reconcile ROIs Parameters Dialog

2. When the Reconcile ROIs Parameters dialog appears, choose the ROIs to be reconciled by selecting from the following options:

3. To manually designate the spatial dimensions for the new ROIs:

A. Enter the difference in pixels between the origin of the image where the

ROIs were drawn and the origin of the new image into the xoffset and

yoffset text boxes.

B. Enter the number of samples and lines in the new image into the appropriate text boxes.

4. To have ENVI calculate the x and y offsets and the number of samples and lines automatically:

A. Click Set Values from Source/Destination Files.

B. When the file selection dialog appears, choose the file where the ROI was originally drawn and click OK.

C. When the next file selection dialog appears, select a destination file for the

ROIs and click OK.

Defining Regions of Interest

ENVI User’s Guide

Chapter 4: Interactive Display Functions

309

5. In the Reconcile ROIs Parameters dialog, click OK.

The ROIs are listed in the ROI Tool dialog and are automatically loaded onto the new image.

Reconciling ROIs via Map

Use Reconcile ROIs via Map to use ROIs defined in one georeferenced image in another overlapping georeferenced image, regardless of differences in image or pixel sizes between the two images.

1. Select one of the following options:

• In the ROI Tool dialog, select Options

Reconcile ROIs via Map.

• From the Display menu bar, select Tools

Region of Interest

Reconcile ROIs via Map.

• From the ENVI main menu, select Basic Tools

Region of Interest

Reconcile ROIs via Map.

2. When the Reconcile ROIs via Map Parameters dialog appears, select the desired ROIs by clicking on the names.

3. Click OK.

4. Select the georeferenced file to which you want the ROIs reconciled and click

OK.

The ROIs are listed in the ROI Tool dialog and automatically loaded onto the new image.

Converting Band Values to ROIs

Use Band Threshold to ROI to convert specific image values and ranges of values to

Regions of Interest.

1. Select one of the following options:

• In the ROI Tool dialog, select Options

Band Threshold to ROI.

• From the Display menu bar, select Tools

Region of InterestBand

Threshold to ROI.

• From the ENVI main menu, select Basic Tools

Region of Interest

Band Threshold to ROI.

2. When the Band Threshold to ROI Input Band dialog appears, select a band to threshold.

ENVI User’s Guide

Defining Regions of Interest

310

Chapter 4: Interactive Display Functions

3. When the Band Threshold to ROI Parameters dialog appears, select from the following options.

• To make an ROI using those pixels greater than or equal to the entered minimum value, enter only the Min Thresh Value.

• To select those pixels less than or equal to the entered maximum value, enter only the Max Thresh Value.

• To select pixels that fall within a specified range of values, enter both a minimum and a maximum threshold value.

• To assign an ROI name, edit the ROI Name text entry.

• To change the color of the ROI, select the desired color from ROI Color menu.

4. Click OK to extract the thresholded pixels. A warning dialog appears and list the number of pixels that satisfy the threshold criteria.

5. Click OK to accept and load the ROI.

The region is listed in the ROI Tool dialog as a Thresh Bandname, where Bandname is the name of the band used to extract the ROI. The number of pixels in the region are also listed.

Calculating Buffer Zone Images for ROIs

Use Calculate Buffer Zone to calculate a buffer zone image from the original image.

In the resulting buffer zone image, every pixel has a floating point or integer value that is defined as the distance from that pixel to the nearest pixel of the selected ROI.

You designate a maximum distance value and the result is that any pixels with a distance larger than that value are set to the maximum distance value +1.

1. In the ROI Tool dialog, select Options

Calculate Buffer Zone. The Buffer

Zone Image Parameters dialog appears.

Note

If the image has more than one ROI associated with it, the Input Buffer Zone

ROIs dialog appears. Click on the names of the ROIs to be included in the buffer zone image calculation and click OK.

Note

If you select more than one ROI, the distance calculated will be from the pixel to the nearest selected ROI.

Defining Regions of Interest

ENVI User’s Guide

Chapter 4: Interactive Display Functions

311

2. Click the Maximum Distance arrow increment buttons to set the maximum distance to measure, or type the value (in pixels) into the corresponding text box.

Note

Any pixels with a distance larger than this value will be set to the maximum distance value +1.

3. From the Distance Kernel button menu, select either Floating Point or

Integer output.

4. Select output to File or Memory.

5. Click OK.

Creating Class Images from ROIs

Use Create Class Image from ROIs to convert selected ROIs into an ENVI classification image. The class colors will be the same as the ROI colors.

1. Select one of the following options:

• From the Display menu bar, select Tools

Regions of InterestCreate

Class Image from ROIs.

• In the ROI Tools dialog, select Options

Create Class Image from

ROIs.

• From the ENVI main menu, select Classification

Create Class Image

from ROIs.

• From the ENVI main menu, select Basic Tools

Region of Interest

Create Class Image from ROIs.

2. The Classification Image from ROIs dialog appears.

3. In the list of ROIs, select the ROIs to use by clicking on the ROI names.

4. Click OK. The Classification Image from ROIs Parameters dialog appears.

Note

To change the output classification image DN (Digital Number) value of an

ROI, click on the ROI and use the arrow toggle buttons to enter a new DN value.

5. Enter an output filename and click OK.

The resulting classification image filename appears in the Available Bands List.

ENVI User’s Guide

Defining Regions of Interest

312

Chapter 4: Interactive Display Functions

Computing ROI Separability

The Compute ROI Separability option computes the spectral separability between selected ROI pairs for a given input file. Both the Jeffries-Matusita and Transformed

Divergence separability measures are reported. These values range from 0 to 2.0 and indicate how well the selected ROI pairs are statistically separate. Values greater than

1.9 indicate that the ROI pairs have good separability. For ROI pairs with lower separability values, you should attempt to improve the separability by editing the

ROIs or by selecting new ROIs. For ROI pairs with very low separability values (less than 1), you might want to combine them into a single ROI. For more information, see the following reference:

J.A. Richards, 1999, Remote Sensing Digital Image Analysis, Springer-Verlag,

Berlin, p. 240.

The following steps show how you can use the Compute ROI Separability option to compute the spectral separability between selected ROI pairs.

1. Select one of the following options:

• In the ROI Tools dialog, select Options

Compute ROI Separability.

• From the Display menu bar, select Tools

Regions of Interest

Compute ROI Separability.

• From the ENVI main menu, select Basic Tools

Region of Interest

Compute ROI Separability.

2. When the file selection dialog appears, select the input file and perform any spectral subsetting. The ROI Separability Calculation dialog appears.

3. In the dialog, select ROIs for the separability calculation.

4. Click OK. The separabilities are calculated and reported in a report dialog.

Both the Jeffries-Matusita and Transformed Divergence values are reported for every ROI pair. The bottom of the report shows the ROI pair separability values listed from the least separable pair to the most separable.

5. To save the report to an ASCII file, select File

Save Text to ASCII.

Defining Regions of Interest

ENVI User’s Guide

Chapter 4: Interactive Display Functions

313

Managing ROI Files

Use the File menu in the ROI Tool dialog to save and restore ROI information to an

ENVI ROI file (default file extension

.roi

) and to export ROIs to ENVI vector files

(

.evf

).

Saving ROIs to Files

To save regions of interest currently in memory to a file:

1. Select one of the following options:

• In the ROI Tool dialog, select File

Save ROIs.

• From the Display menu bar, select Tools

Region of InterestSave

ROIs to File.

• From the ENVI main menu, select Basic Tools

Region of Interest

Save ROIs to File.

2. When the Save ROIs to File dialog appears, click on the desired ROI names in the scrollable list with the left mouse button.

Note

Only ROIs that were defined in images with the same dimensions as those in the current display appear in the ROI list. ROIs of other dimensions remain in memory.

3. Enter a filename or choose an existing output filename (with the extension

.

roi

for consistency).

4. Click OK to save the ROI file.

Restoring Saved ROIs

1. To restore all of the saved ROIs, select one of the following options:

• In the ROI Tool dialog, select File

Restore ROIs.

• From the Display menu bar, select Tools

Region of InterestRestore

Saved ROI File.

• From the ENVI main menu, select Basic Tools

Region of Interest

Restore Saved ROI File.

ENVI User’s Guide

Defining Regions of Interest

314

Chapter 4: Interactive Display Functions

2. When the file selection dialog appears, select the ROI file.

The ROI is loaded into the display group and ROI Tool dialog of every image of the same spatial size.

Selecting Multiple ROIs for Restoration

You can restore multiple selected regions of interest from the Enter ROIs Filenames dialog when restoring saved ROIs.

1. Select one of the following options:

• In the ROI Tool dialog, select File

Restore ROIs.

• From the Display menu bar, select Tools

Region of Interest Restore

Saved ROI File.

• From the ENVI main menu, select Basic Tools

Region of Interest

Restore Saved ROI File.

2. When the file selection dialog appears, choose from the following options to select multiple ROIs.

• To select a group of files that are listed consecutively, click on the first file in the group, press and hold the Shift key, and click the last file in the group. Or, click and drag the cursor over the group of items with the left mouse button. The items are selected when they are highlighted.

• To select multiple files that are not listed consecutively, press and hold the

Ctrl key on your keyboard and click on each desired file.

The selected ROIs are loaded into the display group and ROI Tool dialog of every image of the same spatial size.

Subsetting Data via ROIs

To subset an image file based on the bounding box (i.e., the area encompassing) an

ROI or group of ROIs currently drawn on an image, follow these steps:

1. In the ROI Tool dialog, select File

Subset Data via ROIs.

2. When the Input File selection dialog appears, select the file to be subset.

Defining Regions of Interest

ENVI User’s Guide

Chapter 4: Interactive Display Functions

The Spatial Subset via ROI Parameters dialog appears.

315

Figure 4-25: The Spatial Subset via ROI Parameters Dialog

Note

To apply spectral subsetting to the input file, click Spectral Subset and use standard ENVI methods.

3. Select the input ROIs by clicking on the ROI names.

4. Use the arrow toggle button to select whether or not to mask pixels that do not fall within the ROI. If you select Yes, enter a background value.

5. Select output to File or Memory.

6. Click OK.

The resulting subsetted file is listed in the Available Bands List.

ENVI User’s Guide

Defining Regions of Interest

316

Chapter 4: Interactive Display Functions

Exporting ROIs to ENVI Vector Files

Use Export ROIs to EVF to export ROIs to ENVI vector files (

.evf

). All of the

ROIs selected are exported as separate records in a single layer. If the file associated with the ROI is georeferenced, the vector layer will be in the same projection.

1. Select one of the following options:

• In the ROI Tool dialog, select File

Export ROIs to EVF.

• From the Display menu bar, select Tools

Region of InterestExport

ROIs to EVF.

• From the ENVI main menu, select Basic Tools

Region of Interest

Export ROIs to EVF.

2. When the Export Regions to EVF dialog appears, select the desired ROIs to export by clicking on the ROI names.

3. Select how ROI points should be treated—each point as a separate vector record or with all points as one vector record.

4. Enter the desired layer name in the Layer Name text box.

5. Select output to File or Memory.

Exporting ROIs to the n-D Visualizer

Use Export ROIs to n-D Visualizer to export selected ROIs to the n-D Visualizer so you can see the distribution of the points within your ROIs and between your ROIs.

This option is very useful for checking the separability of your classes when you use

ROIs as input into supervised classifications.

1. Select one of the following options:

• In the ROI Tools dialog, select File

Export ROIs to n-D Visualizer.

• From the ENVI main menu, select Basic Tools

Regions of Interest

Export ROIs to n-D Visualizer.

2. When the Select Input Data File dialog appears, select the input file that the

ROIs are associated with and click OK. The n-D Visualizer Input ROIs dialog appears.

3. Select a ROI to export by clicking on the ROI name. To select all of the ROIs, click Select All Items.

4. Click OK. An n-D Visualizer window and n-D Controls dialog appear.

5. Click on the band numbers to select those bands for rotation.

Defining Regions of Interest

ENVI User’s Guide

Chapter 4: Interactive Display Functions

317

6. Click Start. The pixels for the selected ROIs appear in the n-D Visualizer window in the same colors as the ROIs.

Note

For good classification results using these ROIs, the groups of pixels for the different ROIs should be separate from each other and should not overlap.

Note

If the pixels overlap, edit the groups of pixels by selecting the appropriate colors from the Class menu to add pixels to an ROI or by selecting White to remove pixels from an ROI.

7. Select Options

Export Class or Export All to export the colored pixels back to the ROI Tool dialog so they can be imported into classifications.

For more information and detailed instructions for the n-D Visualizer, see “The n-

Dimensional Visualizer” on page 763.

Exporting ROIs to ASCII

Use Output ROIs to ASCII to output ROIs to an ASCII text file. You can edit the

ASCII file format prior to output by selecting the parameters to include in the file.

You can also output map information, latitude and longitudes, and band data values for every ROI location. Prior to output, you can select which parameters to include in the ASCII file. The output is formatted into columns for easy input into spread sheets.

For an example of an ROI ASCII file, see

“Example of ASCII Output” on page 319.

1. Select one of the following options:

• In the ROI Tool dialog, select File

Output ROIs to ASCII.

• From the Display menu bar, select Tools

Region of InterestOutput

ROIs to ASCII.

• From the ENVI main menu, select Basic Tools

Region of Interest

Output ROIs to ASCII.

2. When the file selection dialog appears, select the input file and perform any spectral subsetting.

3. Click OK.

4. Select the ROIs to output.

ENVI User’s Guide

Defining Regions of Interest

318

Chapter 4: Interactive Display Functions

Note

To select which parameters to output, see the following section.

5. Enter or choose an output filename and click OK.

Editing ASCII Output Format

You can specify which parameters are included in the ASCII output.

1. In the Output ROIs to ASCII Parameters dialog, click the Edit Output ASCII

Form button. The Output ROI Values to ASCII dialog appears. By default, all parameters are selected for output.

2. Set parameters by selecting/deselecting the corresponding check box:

• To include a label with the output, leave the Point # check box selected.

• To include the ROI location information in the output, leave the ROI

Location check box selected. Use the ROI Location arrow toggle button to select whether the ROI location is output by one-dimensional locations or by sample/line. Pointers to each of the pixels contained in the selected

ROIs are output to the ASCII file. The pointers are the one-dimensional addresses to the pixel locations in the file where a one-dimensional address equals the line number times the number of samples plus the sample number.

• To include geographic location information for georeferenced data, leave the Map Location check box selected. Use the Map Location arrow toggle button to designate output of the geographic locations in normal or scientific notation. Use the arrow increment buttons to set the number of significant digits.

• To include geographic (lat/lon) location information for georeferenced data, leave the Geo Location check box selected. Use the Geo Location arrow toggle button to designate output of the geographic locations in normal or scientific notation. Use the arrow increment buttons to set the number of significant digits.

Note

Map and Geo are not available for non-georeferenced data.

• To include the band DN values for all input bands, leave the Bands check box selected. Each band value will fall in its own column in the output

ASCII file.

Defining Regions of Interest

ENVI User’s Guide

Chapter 4: Interactive Display Functions

319

Example of ASCII Output

Here is an example of ROIs output to an ASCII file:

;ENVI Output of ROIs (3.4) [Mon Apr 17 17:00:26 2000]

;Number of ROIs: 1

;File Dimension: 512 x 512

;

; ROI name: Region #1

; ROI rgb value: {255, 0, 0}

; ROI npts: 409

; ID X Y Map X Map Y Lat Lon B1 B2 B3 B4 B5 B6

1 179 243 282977.65 4899997.33 44.222839 -107.716970 11 10 9 46 16 10

2 180 243 283006.15 4899997.33 44.222848 -107.716614 9 10 8 47 15 7

3 178 243 282949.15 4899997.33 44.222831 -107.717327 10 10 8 48 14 8

4 178 244 282949.15 4899968.83 44.222574 -107.717315 10 10 8 48 13 6

5 179 244 282977.65 4899968.83 44.222583 -107.716959 10 11 10 46 16 8

6 177 244 282920.65 4899968.83 44.222566 -107.717671 10 10 8 47 13 6

7 180 244 283006.15 4899968.83 44.222591 -107.716602 10 9 8 48 14 6

8 181 244 283034.65 4899968.83 44.222600 -107.716246 9 9 7 48 12 6

9 182 244 283063.15 4899968.83 44.222608 -107.715889 10 10 8 47 14 7

10 183 244 283091.65 4899968.83 44.222617 -107.715533 9 10 7 49 14 6

11 184 244 283120.15 4899968.83 44.222625 -107.715177 9 9 6 50 12 4

12 176 245 282892.15 4899940.33 44.222301 -107.718016 10 10 8 47 15 8

13 177 245 282920.65 4899940.33 44.222310 -107.717660 10 10 8 46 14 8

14 178 245 282949.15 4899940.33 44.222318 -107.717303 10 10 7 48 13 6

15 179 245 282977.65 4899940.33 44.222327 -107.716947 10 10 8 47 15 8

Hiding the ROI Tool Dialog

To hide or show the ROI Tool dialog without erasing your ROIs, see

“Showing and

Hiding Overlay Dialogs and Layers” on page 239.

Closing the ROI Tool Dialog

To close the ROI Tool dialog and quit the function:

• Select File

Cancel.

Note

Newly-created regions of interest are retained in memory even after the ROI Tool dialog is dismissed (unless regions were specifically deleted using the Delete button).

ENVI User’s Guide

Defining Regions of Interest

320

Creating QuickMaps

Chapter 4: Interactive Display Functions

Use the QuickMap feature to simplify the process of creating a map product in

ENVI. You can quickly add grid lines, scale bars, titles, north arrows, declination diagrams, and logos to your image to make a quick output map. Once you have set all of your parameters, you can save the settings as a QuickMap template that you can use on other images. After the output map is created, you can make additional changes with the Main Image interactive overlay capabilities (e.g, annotation) and you can output the map to Postscript or to a standard printer.

The following figure show an example QuickMap display.

Creating QuickMaps

Figure 4-26: A QuickMap Image

ENVI User’s Guide

Chapter 4: Interactive Display Functions

Note

Extremely small images may result in QuickMap displays too small to accommodate multiple annotation objects.

321

1. From the Available Bands List, display a georeferenced image.

Note

To use the QuickMap feature, you must have a georeferenced image displayed.

2. From the Display menu bar, select File

QuickMapNew QuickMap.

3. When the QuickMap Default Layout dialog appears, enter the page size, select

Portrait or Landscape page orientation, and enter your desired output map scale.

Note

To change the map scale, enter a new value in the Scale text box, or use the arrow increment buttons.

4. Click OK. The QuickMap Image Selection window appears.

5. Select from the following options to select the image subset to be used in the

QuickMap:

• Resize and move the red box outline (drag from a corner to resize, click and drag the middle of the box to move).

• Enter x and y sizes, in inches, in the Image Size text boxes, or use the arrow increment buttons to select dimensions.

• Click the Spatial Subset button and use standard ENVI spatial subset methods.

Note

You cannot enlarge the red box to a size that causes the output image size to be larger than what will fit on the selected page size at the selected map scale.

6. Click OK.

ENVI User’s Guide

Creating QuickMaps

322

Chapter 4: Interactive Display Functions

The #n QuickMap Parameters dialog appears, where n is the number of the associated display group.

Figure 4-27: QuickMap Parameters Dialog

Setting QuickMap Parameters

1. When the QuickMap Parameters dialog appears, select from the following options:

• To add a title to the top of the map, type the text in the Main Title text box.

• To add text to the lower left or lower right corners of the map, type the text into the corresponding text boxes.

• To automatically load the map projection information from the ENVI header into either the Lower Left or Lower Right text boxes, right-click in the text box and select Load Projection Info.

• To change the font used for any title, select a new font from the corresponding button menu and enter or select the point size.

Creating QuickMaps

ENVI User’s Guide

Chapter 4: Interactive Display Functions

323

• To set the justification for any title, select from the corresponding button menu. Center is the default.

• To change the grid line parameters (thickness, style, color, etc.), click the

Additional Properties button.

• To add scale bars and grid lines, leave the corresponding check boxes selected and edit the parameters as needed.

• To add a logo and adjust its placement, click the Edit Logo Files and

Placements button. Locate the file containing the logo (the file must contain three bands of byte data: red, green, and blue). Use the QuickMap

Logo File Parameters dialog to change the logo size and position. Click

OK to return to the QuickMap Parameters dialog.

• To add a North arrow, leave the corresponding check box selected and select an arrow type from the North Arrow Type button menu.

• To add a declination diagram, click the Declination Values button. In the

Declination Diagram Values dialog, enter the values and click OK.

• To return to the QuickMap Image Selection window and edit the image subset or map scale, click the Change Mapping Parameters button.

2. In the QuickMap Parameters dialog, click Apply. ENVI automatically adds a virtual border to your QuickMap image, places your selected titles and annotation onto your image, and produces a map, which is displayed as a new standard ENVI Display Group. The QuickMap Parameters dialog remains open.

Note

If you added a logo, it will appear as a red box with an RGB label on the map, but will appear correctly when printed.

3. Use the QuickMap Parameters dialog to edit the map. Click Apply to view the changes.

Note

To edit the borders, add more annotation or overlay elements, or edit the existing map elements, use standard ENVI interactive display functions as described in this chapter.

ENVI User’s Guide

Creating QuickMaps

324

Chapter 4: Interactive Display Functions

Printing QuickMaps

QuickMaps can be easily printed:

• In the QuickMap Main Image window, select File

Print, choose Output

QuickMap to Printer or Standard Printing, and click OK.

The Output QuickMap printing will scale the output correctly for the parameters that you entered at the start of QuickMap. Standard printing does not take into consideration the page size and map scale you entered when you created the

QuickMap.

Note

If you selected a large page size during QuickMap setup, you might first test the output on a small scale by using the standard printing option, then use the

QuickMap printing option to print to a larger page.

Additional QuickMap Output Options

To output the map directly to an image or Postscript file, select the corresponding command from the File menu in the map Main Image window as described later in this chapter.

QuickMap Templates

After creating a QuickMap, you can save the parameters in a template file to be used on other georeferenced images of the same dimension and pixel size.

• In the QuickMap Parameters dialog, click Save Template, enter a filename

(ENVI will add a

.qm

extension), and click OK.

Note

Use QuickMap templates only on images of the same dimension and pixel size of the image from which the template was created.

To open and apply an existing map template:

1. From the georeferenced image, select File

QuickMapfrom Previous

Template or click the Restore Template button in the QuickMap Parameters dialog, and then click Apply to apply the QuickMap to the image.

To edit template parameters, see

“Setting QuickMap Parameters” on page 322.

Creating QuickMaps

ENVI User’s Guide

Chapter 4: Interactive Display Functions

Overlaying Vectors

325

Use ENVI Vector Tools to view vector data such as USGS Digital Line Graphs

(DLG), USGS DLGs in Spatial Data Transfer Standard (SDTS) format, DXF files,

ARC/INFO Interchange files, and Shapefiles. ENVI provides two ways of displaying and working with vectors:

• Using the menu selections in the Image display group and the Vector

Parameters dialog (shown in the following figure).

Figure 4-28: Image Display Group (left) and Vector Parameters Dialog (right)

ENVI User’s Guide

Overlaying Vectors

326

Chapter 4: Interactive Display Functions

• Using the vectors by themselves in a Vector window with the same menu bar as the Vector Parameters dialog and the new shortcut menu selections (see

“Working with the Vector Window” in Chapter 11 for more details).

Overlaying Vectors

Figure 4-29: The Vector Window with Menu Bar

ENVI User’s Guide

Chapter 4: Interactive Display Functions

327

The method for overlaying vectors onto an image display is discussed in the sections that follow.

Tip

The Mouse Button Descriptions window is useful when working with vectors because it provides information about the function of each mouse button at any given cursor location.

Use Vectors to overlay vector layers on an image, to control the appearance of the vectors, and to interact with the vector attributes. Also ENVI’s interactive vector functions can be used to edit and query attributes associated with shapefiles and to create your own vector files and attributes.

Opening Vector Layers

Each image display can have its own vectors, which are displayed in the Main Image,

Scroll, and/or Zoom windows.

To read vector data from disk files, see “Opening Vector Files” on page 63.

To read USGS DLG files from tape, see “Reading USGS DLG Tapes” on page 150.

To open vector layers from the Available Vectors List, see “The Available

Vectors List” on page 212 .

Working with Vector Layers

In the Main Image window, select Overlay

Vectors to bring up the Vector

Parameters dialog. When vectors are overlaid on an image display they can be plotted in the Image window and/or Scroll and Zoom windows. You can use the Vector

Parameters dialog to:

• Control the appearance of vector layers

• Add new vectors

• Export vector layer coordinates for use in image-to-map registration

• View, edit, and query vector attributes.

Vector data often consist of multiple layers of vector data.

ENVI User’s Guide

Overlaying Vectors

328

Chapter 4: Interactive Display Functions

For example, the following figure shows that the available vector layers include

Roads and Trails, Hydrography, Pipe & Trans Lines, and Railroads.

Figure 4-30: Vector Parameters Dialog

Selecting Image Display Windows for Vectors

When you overlay vectors on an image, they can be plotted in the Image window,

Zoom window, and/or Scroll window. You can also edit existing vectors or add new vectors in any of the three display windows.

• To select which window is used for editing or adding vectors, click on the

Window: radio button at the top of the Vector Parameters dialog for the desired display window type.

• To select the image display windows to plot the vectors in, click in the desired

Image, Scroll, or Zoom check boxes at the bottom of the Vector Parameters dialog.

Overlaying Vectors

ENVI User’s Guide

Chapter 4: Interactive Display Functions

329

Using Vector Options in the Shortcut Menu

Display windows with vector overlays have many options which can be accessed by right-clicking in the display window chosen for the overlay (Image, Scroll, or Zoom) and selecting from the shortcut menu that appears. The options available in the shortcut menu will change depending on the cursor mode selected (see

“Controlling

Cursor Modes” on page 335 for more information).

Figure 4-31: Display Window With Vector Overlay Shortcut Menu

If you have many display windows open and the Vector Parameters dialog associated with the current display window is hidden behind other windows, you can use the display window shortcut menu to find its Vector Parameters dialog and bring it to the front.

To do this, right-click anywhere in the display window and select <Find Vector

Parameters> from the shortcut menu.

ENVI User’s Guide

Overlaying Vectors

330

Chapter 4: Interactive Display Functions

Using the Available Vector Layers List

The Available Vector Layers list in the Vector Parameters dialog contains the vector layers currently available for display. Use the Available Vector Layers list to interact with all of your individual vector layers. If your overlaid vectors are displayed in a

Vector window, the active/available layers are viewable under the Vector window shortcut menu.

Selecting the Active Vector Layer

The active vector layer is the layer to which all editing or queries are performed.

To select the active vector layer from the Main Image window:

• Click the right mouse button inside the Main Image window to bring up the shortcut menu and select which layer is active by choosing Select Active

Layer

desired layer name from the Main Image window shortcut menu.

To select the active vector layer from the Vector Parameter dialog:

• Click on the layer name in the Available Vector Layers list to highlight it and make it active.

Overlaying Vectors

Figure 4-32: Main Image Window Shortcut Menu for Active Layer

ENVI User’s Guide

Chapter 4: Interactive Display Functions

331

Turning Layers On/Off

In the Vector Parameters dialog, an asterisk next to a layer name indicates that the layer is On, which means it will be plotted when the Apply button is clicked. If an asterisk is not next to a layer name, then the layer is Off. The default for each layer is

On.

To turn layers on and off:

• Double-click the left mouse button on the layer name in the Available Vector

Layer list.

Or you can use a shortcut menu to turn layers on and off:

1. Click on the layer name in the Available Vector Layers list to highlight it, and then right-click to bring up the shortcut menu.

2. In the shortcut menu, use the Select Active Layer option and click on a layer to make it the active layer.

3. Right-click again to bring up the shortcut menu, and select the Active Layer

Off/On.

Setting the Current Layer Color

The color shown next to Current Layer in the Vector Parameters dialog is the color of the currently selected layer.

• To cycle forward through the available colors, click on the colored box with the middle mouse button.

• To cycle backwards through the color selections, click on the colored box with the left mouse button.

• To select the color from a list, click on the colored box with the right mouse button and select a color table from which to choose the color.

• To apply the selected color to the selected vector, click Apply.

• If your vectors are displayed in a Vector window, use Edit

Edit Layer

Properties to change the color (see

“Changing Vector Layer Display

Properties” on page 333).

ENVI User’s Guide

Overlaying Vectors

332

Chapter 4: Interactive Display Functions

Setting the Current Highlight Color

The color shown in Current Highlight box is the color that will be used to highlight a vector when it is clicked on in a vector attributes table (see

“Vector Attributes” on page 346) or to highlight an existing vector when it is edited (see

“Controlling Cursor

Modes” on page 335).

• To cycle forward through the available colors, click on the colored box with the middle mouse button.

• To cycle backwards through the color selections, click on the colored box with the left mouse button.

• To select the color from a list, click the right mouse button and select the desired color.

Exporting Vector Coordinates

To export the current vector cursor coordinates to the image-to-map registration function:

• Click the Export button in the Vector Parameters dialog.

Note

The Export button only works if the image is registered to a map.

Overlaying Vectors

ENVI User’s Guide

Chapter 4: Interactive Display Functions

333

Changing Vector Layer Display Properties

Use the options in the Edit Vector Layers dialog to change the appearance of vector layers.

1. Select Edit

Edit Layer Properties in the Vector Parameters dialog. The

Edit Vector Layers dialog appears/

Figure 4-33: The Edit Vector Layers Dialog

2. When the Edit Vector Layers dialog appears, select the vector to edit by clicking on its name in the Layer Names list.

• To edit the layer color, linestyle, and line thickness, click on the appropriate button menu and select from the different options.

ENVI User’s Guide

Overlaying Vectors

334

Chapter 4: Interactive Display Functions

• To change the polygon fill type and style, click on the Polygon Fill button menu select from the options shown in the following table.

Option Description

None

Solid

Leave the polygon unfilled.

Fill the polygon with the polygon color.

line, dashed,

dotted, etc.

Fill the polygon with equally spaced lines.

Orien

Spc

Change the orientation of the fill lines, enter the value of the angle in degrees

(counterclockwise, with respect to the horizontal [0 degrees]) in the provided parameter box.

Change the spacing of the lines, enter a value in the provided parameter box

Table 4-5: Polygon Fill Options

• To select the symbol used to plot points, click on the Point Symbol button menu and select a symbol type.

• To designate the size of the symbol, enter a size into the Symbol Size text box.

Plotting Attribute Names

To plot attribute names with the vector points and to associate attribute names with symbols:

1. In the Edit Vector Layers dialog, select the layer name and click on the

Advanced button. The Point Attribute Relationships dialog appears.

2. Click in the Associate attribute name with symbol check box.

3. Use the Attribute button menu to select the desired column name to plot from the attribute table.

4. Select left, middle, or right alignment, font type, text size and orientation using the appropriate parameters.

5. Click OK to return to the Edit Vector Layers dialog.

For more information about attributes, see “Vector Attributes” on page 346.

Overlaying Vectors

ENVI User’s Guide

Chapter 4: Interactive Display Functions

335

Plotting Vector Points Based on Attribute Values

To plot vector points with different symbol sizes based on attribute values:

1. In the Edit Vector Layers dialog, select the point layer name and click on the

Advanced button. The Point Attribute Relationships dialog appears.

2. Click in the Associate attribute value with symbol size check box.

3. From the Attribute button menu, select the name of the attribute table column that contains the data to be used to scale the symbol size.

Note

The attribute table column must contain numeric values.

4. Select the minimum and maximum symbol size to use.

5. Click OK to return to the Edit Vector Layers dialog.

Applying Vector Layer Edits

After selecting from the options in the Edit Vector Layers dialog, apply the changes to the vectors and exit the dialog by clicking OK.

Controlling Cursor Modes

Use the Mode menu in the Vector Parameters dialog to control the cursor mode in a

Main Image window. Use the cursor mode to select vectors and to highlight their corresponding attributes in the attribute table, to edit existing vectors, to add new vectors, to input vector points from an ASCII file, or to delete vectors. Cursor modes include Cursor Query, Edit Existing Vectors, and Add New Vectors.

Select the cursor mode using Mode

cursor mode from the Vector Parameters dialog, or choose Select Mode

cursor mode using the Main Image window shortcut menu.

Tip

Use Help

Mouse Button Descriptions to bring up a dialog that describes each mouse button function in each cursor mode.

ENVI User’s Guide

Overlaying Vectors

336

Chapter 4: Interactive Display Functions

Selecting Vectors

To use the cursor to select a vector and to see the corresponding vector attribute information:

1. Click on the desired vector layer in the Available Vector Layers list to make it active.

2. In the Vector Parameters dialog, select Options

Vector Information or

Edit

View/Edit Attributes, then select ModeCursor Query.

3. Click with the left mouse button on the desired vectors in the Main Image display. The attributes associated with the selected vectors are displayed in the

Vector Information dialog and highlighted in the vector attributes table.

Editing, Adding, and Removing Vector Nodes

Use these options to change the location of vector nodes, to add vector nodes to existing vectors, and to remove vector nodes.

1. In the Available Vector Layers list, click on the vector layer to be edited.

2. Select Mode

Edit Existing Vectors in the Vector Parameters dialog.

3. Click on a vector with the left mouse button to highlight it (see “Setting the

Current Highlight Color” on page 332).

4. To change the location of existing vector nodes, click and drag the diamond shaped handles using the left mouse button.

Note

To undo all changes, click with the middle mouse button.

5. To add vector nodes to the existing layer, click with the right mouse button on the location of the new node, then select Add Node [1] from the Vector window shortcut menu.

• A new node appears. You cam left-click and drag the new node to move it to the desired location.

Overlaying Vectors

ENVI User’s Guide

Chapter 4: Interactive Display Functions

337

• To change the number of nodes added, right-click and select Number of

Nodes to Add from the Vector window shortcut menu. Enter the desired number of nodes to be added in the text box and click OK.

• To add the nodes specified, position the cursor at the desired location and right-click the mouse to bring up the shortcut menu. From the shortcut menu, select Add Nodes [N], where N is the number specified previously. when the selection is made, the N nodes are placed in the Vector window.

6. To delete an existing vector node, click on the node with the right mouse button and select Delete Node from the shortcut menu. The selected node is removed and the two nearest nodes are connected.

• To delete a range of nodes at once, right-click on one node and select

Mark Node from the shortcut menu. Perform the same step to mark the node at the other end of the range, and all nodes in between are selected as well. Right-click again, and choose Delete Marked Nodes from the shortcut menu.

Note

To clear marked nodes, select Clear Marked Nodes from the shortcut menu.

7. Select Accept Changes from the shortcut menu to save the changes to the vector file. These changes can be undone by selecting Edit

Undo Last

Edit.

Splitting and Joining Polyline Vectors

To split or join polyline vectors, do the following:

1. Click on the vector layer name containing the polylines in the Available

Vector Layers list of the Vector Parameters dialog.

2. In the Vector Parameters dialog, select Mode

Edit Existing Vectors.

3. Select the polyline vector by clicking on it with the left mouse button. The vector is highlighted and the nodes are shown with diamond shaped handles.

4. To split the polyline vector, right-click on a node and select Mark Node from the shortcut menu. Right-click again and select Split Vector from the shortcut menu and the marked node becomes two nodes. These nodes are the endpoints of the two newly split polylines. They can now be separated and moved by clicking and dragging with the left mouse button.

5. To join polyline vectors, select one polyline vector in the active layer by leftclicking on it. Select a second polyline vector by left-clicking on it. Now right-

ENVI User’s Guide

Overlaying Vectors

338

Chapter 4: Interactive Display Functions

click to bring up the shortcut menu and choose Join Vectors. The highlighted polylines are joined into a single vector.

6. To save your changes to the vector file, right-click and select Accept Changes from the shortcut menu.

Note

Accepted changes can be undone by selecting Undo Last Edit from the shortcut menu.

Deleting Vectors from Layers

1. Select the vector layer from which the vector will be deleted, either by highlighting it in the Available Vector Layers list or by right-clicking in the

Main Image window to bring up the shortcut menu and then choosing Select

Active Layer

→ layer name.

2. Select Mode

Edit Existing Vectors in the Vector Parameters dialog.

3. Click on the vector to delete using the left mouse button. The vector is highlighted.

4. Select Delete Selected Vector from the Main Image window shortcut menu.

Note

The deleted vectors can be returned by selecting Undo Last Edit from the shortcut menu.

Undoing Vector Changes

To undo the last edit, addition, or deletion:

• Select Edit

Undo Last Edit in the Vector Parameters dialog.

To undo all edits, additions, or deletions:

• Select Edit

Undo All Edits in the Vector Parameters dialog.

Saving Changes

To save changes made to vectors:

• Select Edit

Save Changes Made to Layer in the Vector Parameters dialog.

Note

Saved changes cannot be undone.

Overlaying Vectors

ENVI User’s Guide

Chapter 4: Interactive Display Functions

Adding New Vectors

To add new vectors to an existing layer:

1. In the Available Vector Layers list, click on the vector layer to which the vectors will be added.

2. In the Vector Parameters dialog, select Mode

Add New Vectors.

3. Specify the vector type: polygon, polyline, rectangle, ellipse, or point by choosing one of the following options:

• Select Mode

vector type

• Select the vector type from the shortcut menu in the Vector window.

Note

To draw donut polygons (polygons with holes in them), select

Mode

Multi Part: On.

339

4. Left-click to define points, polygon or polyline vertices; or click and drag to draw rectangles or ellipses.

Note

To undo only the last point added, click once with the middle mouse button.

5. Right-click to get a diamond-shaped handle which can be used to move the vector position.

Note

To delete the highlighted or selected vector, click the middle mouse button.

6. Right-click to access the shortcut menu, then select Accept New Polygon to add the new vector.

• To remove the new vector, select Remove New Polygon from the shortcut menu.

ENVI User’s Guide

Overlaying Vectors

340

Chapter 4: Interactive Display Functions

• To turn on the node handles for editing purposes, select Node Handles On from the shortcut menu.

• If you are defining new points, you can either accept them as individual points by choosing Accept as Individual Points, or as multiple points in a single record by choosing Accept as Multi Point from the shortcut menu.

Note

The newly added vectors can be removed by selecting Edit

Undo Last

Edit.

Adding ASCII Points to Vector Layers

To read points from an ASCII file (e.g., GPS points) and add them to a vector layer:

1. Select the vector layer to which the points will be added from either the

Available Vector Layers list, or by right-clicking and choosing Select Active

Layer

layer name in the shortcut menu.

2. In the Vector Parameters dialog, select Mode

Add New Vectors.

3. Right-click in the Main Image window and select Input Points from ASCII from the shortcut menu.

4. When the Input ASCII File dialog appears, select the x and y column numbers.

5. In the Input ASCII File dialog, use the These points comprise menu button to select the type of vector the points define, a polygon, polyline, group of points

(as one vector), or individual points.

6. If your vectors are georeferenced, select the projection of the ASCII points.

7. Click OK to add the points to the vector layer.

Overlaying Vectors

ENVI User’s Guide

Chapter 4: Interactive Display Functions

341

Vector Layer Options

Use the Options menu in the Vector Parameters dialog to import additional vector layers, arrange the display order of the layers, place annotation in the vector window, change the plot parameters, get vector information, and to undo and save changes to vector layers.

Toggle On/Off Crosshair Cursor

Use Toggle Cursor On when in Cursor Query mode to leave the crosshair cursor on the display. This toggle feature can be accessed using either one of the following methods.

• Select Options

Toggle Cursor On/Off to turn on or turn off the crosshair cursor in the display.

• Select Mode

Cursor Query, then right-click in the Main Image window and select Toggle Cursor On/Off in the shortcut menu.

Loading Additional Vectors

Use this procedure to load additional vectors from files that are already open in the

Available Vectors List.

1. In the Vector Parameters dialog, select Options

Import Layers.

2. When the Import Vector Layers dialog appears, select the vector files to be imported by clicking on the desired filenames.

3. Click OK.

The selected layers appear in the Available Vector Layers list of the Vector

Parameters dialog and are displayed automatically.

Select Active Layer

Use Select Active Layer to select which of the vector layers you are working on.

This can be accessed using any of the following methods.

• From the Vector Parameters dialog, click on the desired layer name in the

Available Vector Layers list.

• From the Main Image window shortcut menu, choose Select Active Layer

desired layer name.

ENVI User’s Guide

Overlaying Vectors

342

Chapter 4: Interactive Display Functions

Changing Layer Display Order

All vectors are drawn in the order that they are listed in the Available Vector Layers list. Use this procedure to change that order.

1. In the Vector Parameter dialog, select Options

Arrange Layer Order.

2. When the Vector Layer Ordering dialog appears, click on a layer name and drag it to the desired plot order precedence.

3. Click OK.

4. In the Vector Parameters dialog, click Apply.

The vector layers are redrawn using the new display order.

Removing Vector Layers

To remove vector layers using the Vector Parameter dialog:

• Select Options

Remove Layers, then choose which layers to remove by clicking on the layer names and click OK.

From the Main Image window shortcut menu:

• Choose Remove Layers and select which layers to remove by clicking on the layer names. To remove only the active layer, select Remove Active Layer from the Main Image window shortcut menu.

Vector Information

Use Options

Vector Information from the Vector Parameter dialog to view vector attributes. For more details, see

“Viewing Vector Attributes” on page 346.

Calculating Areas under Vectors

To calculate an area under a vector:

1. Select a vector in the Available Vector Layers list.

2. Choose an area unit in the Options

Report Area of EVFs submenu. If the pixel size is unknown, the Input Display Pixel Size dialog appears.Use this dialog to provide the x and y pixel sizes (for the units specified) and then click

OK.

The calculated area for all EVFs is displayed in the EVF Area Info dialog. You can save the information in this dialog to an ASCII text file or exit out of the dialog through its File menu

Overlaying Vectors

ENVI User’s Guide

Chapter 4: Interactive Display Functions

343

Adding Annotation to Vector Displays

To add annotation for vectors overlaid on an image display:

• Select Overlay

Annotation from the Display window menu bar.

Managing Vector Layer Files

From the Vector Parameters dialog, use the selections found under the File menu to open new vector files, save and restore vector template files, export vector layers to

ROIs or to a Shapefile, and output the vector display window.

Opening Additional Vector Files

1. From the Vector Parameters dialog, select File

Open Vector Filevector

file type.

2. When the standard file selection dialog appears, select the vector file (see

“Opening Vector Files” on page 63 for details).

Creating Empty Vector Layers

Use Create New Layer to create a new and empty layer.

1. Select File

Create New Layer.

2. When the New Vector Layer Parameters dialog appears, enter a layer name and select output to File or Memory. If you select File, you must enter an output file name.

3. Click OK.

The layer name appears in the Available Vector Layers list.

Saving Vectors to Template Files

You can save the current vector setup to a template file for repeated use.

1. In the Vector Parameters dialog, select File

Save Layers to Template.

2. Enter an output template filename with the extension

.vec

for consistency.

ENVI saves your current vector setup, including the loaded vectors, colors, linestyle and thicknesses, to a file with the extension

.vec

.

ENVI User’s Guide

Overlaying Vectors

344

Chapter 4: Interactive Display Functions

Restoring Layers from Saved Templates

1. Select File

Restore Layers from Template in the Vector Parameter dialog.

2. Select a

.vec

file.

The associated vector files are automatically opened, if needed.

Note

Vectors maintained only in memory cannot be saved and restored.

Exporting Vector Locations to GCPs

If you have a vector file for the area of an image to be map-registered, you can extract the map coordinates directly from the vector data and load them into the Ground

Control Points (GCP) Selection dialog by clicking with the left mouse button on a location and selecting Export Map Location from the Main Image window shortcut menu. For details, see

“Entering Map GCPs from Vector Windows” on page 869.

Exporting Vector Layers to ROIs

When exporting vector layers to Regions of Interest (ROIs), you can choose to create one ROI containing all of the vectors, or create one ROI for each vector.

Warning

Exporting layers to ROIs can create very large ROIs.

1. Choose one of the following options:

• From the Available Vectors list, select File

Export Layers to ROI.

• From the Vector Parameters window, select File

Export Active Layer

to ROIs.

2. When the Export Vector Data to ROI dialog appears, select either the Convert

all vectors to one ROI or Convert each vector to a new ROI option.

Overlaying Vectors

ENVI User’s Guide

Chapter 4: Interactive Display Functions

345

Exporting Vector Layers to Shapefiles

Use Export Active Layer to Shapefile to export vector layers to a shapefile (

.shp

), an index file (

.shx

), and a data base file (

.dbf

):

1. Select the vector layer to be exported by choosing Select Active Layer and clicking on the layer name in the Available Vector Layers list in the Vector

Parameters dialog.

2. Select File

Export Active Layer to Shapefile in the Vector Parameters dialog.

3. When the Output Layer to Shapefile dialog appears, enter the desired output filename and click OK.

Note

Each shapefile can contain only one type of vector (polygon, point, etc.). If multiple vector types are present in the layer being exported, you are prompted to provide different output filenames for each vector type.

Calculating Buffer Zone Images for Vectors

Use Calculate Buffer Zone to calculate a buffer zone image in which the value of every pixel is defined as the distance from that pixel to the selected vector layers, in units of pixels. If your vectors are overlaid on a display window, the displayed image is used to create the output buffer zone image. If the vectors are displayed in a vector window, you must select an associated file to use for the calculation. You can specify a maximum distance value. Any resulting pixels with a distance larger than that value are set to the maximum distance value +1.

1. In the Vector Parameters dialog, select File

Calculate Buffer Zone.

• If you have more than one vector layer open, the Buffer Zone Input Layers dialog appears. Click on the names of the layers to be included in the buffer zone image and click OK. The Buffer Zone Image Parameters dialog appears.

Note

If you select more than one layer, the distance will be calculated from the pixel to the nearest selected layer.

2. Click the Maximum Distance arrow increment buttons to set the maximum distance to measure, or type the value (in pixels) into the corresponding text box.

ENVI User’s Guide

Overlaying Vectors

346

Chapter 4: Interactive Display Functions

Note

Any pixels with a distance larger than this value will be set to the maximum distance value +1.

3. From the Distance Kernel button menu, select Floating Point or Integer output.

4. Select output to File or Memory. If you select File, you must enter an output file name.

5. Click OK.

Vector Attributes

Vector layers may have attributes associated with them. ENVI reads shapefile and

MapInfo Interchange file attributes. The attributes are stored in a dBASE II table

(

.dbf

) for shapefiles and in a

.mid

file for MapInfo.

Use the ENVI attribute table to view, edit, sort, and save vector attribute data. Use the

Vector Attribute functions to create new vector layers based on attribute values, to add new attributes to vectors, to plot point attribute names in vector windows, and to

associate point symbol sizes with attribute values (see “Changing Vector Layer

Display Properties” on page 333).

Viewing Vector Attributes

1. In the Vector Parameters dialog, select the vector layer by clicking on the layer name in the Available Vector Layers list.

2. In Vector Parameters, make sure Mode

Cursor Query is selected.

3. In Vector Parameters, select Options

Vector Information. The Vector

Information dialog appears.

4. In the Main Image window, left-click on the desired vectors. The associated attributes are displayed in the Vector Information dialog.

Creating New Vector Layers from Attributes

To make a new vector layer using a simple mathematical and logical attribute query expression perform the following steps:

1. Select the vector layer by clicking on the layer name in the Available Vector

Layers list in the Vector Parameters dialog.

2. In the Vector Parameters dialog, select Edit

Query Attributes. The Layer

Attribute Query dialog appears.

Overlaying Vectors

ENVI User’s Guide

Chapter 4: Interactive Display Functions

347

3. Click the Start button. The Query Condition dialog appears and allows you to enter a query expression.

4. Select the attribute item to query by using the attributes name pull-down menu.

5. Select one of the following mathematical expressions from the pull-down menu:

Expression

>

>=

<

<=

==

!=

Description

greater than greater than or equal less than less than or equal equals not equals

Table 4-6: Mathematical Expression Options

6. Enter a query value in the text box. The value can be a string (case sensitive) or numeric value depending on the attribute type.

7. To make a more complicated query expression using logical operators, choose from the following options:

• Click AND and follow steps 4 through 6 to do a query that must satisfy both entered mathematical expressions.

• Click OR and follow steps 4 through 6 to do a query that must satisfy one of the entered mathematical expressions.

• Click Delete to delete the last lines of the query expression entered.

• Click Clear to clear the entire query expression.

8. Enter a query layer name in the appropriate text box.

9. Select output to File or Memory. If you select File, you must enter an output file name.

10. Click OK.

The new layer appears in the Available Vector Layers list of the Vector Parameters dialog.

ENVI User’s Guide

Overlaying Vectors

348

Chapter 4: Interactive Display Functions

Adding Attributes to Vectors

To add attributes to a vector layer that does not have any:

1. Select the vector layer by clicking on the layer name in the Available Vector

Layers list of the Vector Parameters dialog.

2. Select Edit

Add Attributes in the Vector Parameters dialog. The Attribute

Initialization dialog appears with one field defined.

3. Select from the following options to edit, add, or delete field parameters.

• Change the field name using the Name text box.

• Select the field type from the Type pull-down menu.

Available types include character, numeric, logical, and date. The logical field contains a single character, either a Y or N, T or F, or ?.

• Enter the width of the field in the table in the Width box.

• Enter the number of digits to the right of the decimal in the Decimal

Count box for a numeric field.

• Click on Add Field to add a new field to the Defined Attribute Fields list.

• Select a field name from the Defined Attribute Fields list and click Delete

Field to remove the field from the list.

4. Click OK.

Overlaying Vectors

ENVI User’s Guide

Chapter 4: Interactive Display Functions

349

The Attribute Table

Use the attribute table to view, edit, sort, and save vector attribute data. The attributes table shows the attribute names at the top of each column and the attribute record number at the left of each row. The attribute table has two pull-down menus, File and

Options.

Highlighting Attribute Data

To select data in the attribute table:

1. Select the vector layer by clicking on the layer name in the Available Vector

Layers list in the Vector Parameters dialog.

2. Select Edit

View/Edit/Query Attributes in the Vector Parameters dialog.

The attributes table appears.

Figure 4-34: A Vector Attribute Table

3. Click with the left mouse button on the desired vectors in the Main Image window.

ENVI User’s Guide

Overlaying Vectors

350

Chapter 4: Interactive Display Functions

The associated attributes are highlighted in the attribute table.

Highlighting Vectors

To highlight the vector that corresponds to a selected attribute record:

• Click on the attribute record number. The Main Image window centers on the corresponding vector and it is highlighted in the Current Highlight color.

To highlight vectors that correspond to multiple attribute records:

• Hold down the Shift or Ctrl key while clicking on the attribute record numbers. All the selected vectors will be highlighted in the Current Highlight color.

Highlighting based on Layer Query

To highlight items in both the attributes table and the corresponding vectors based on a query for the current vector layer:

1. From the Layer Attributes dialog, select Options

Query Layer.

2. Click on the Start button.

3. Follow the directions for the query expression given in “Creating New Vector

Layers from Attributes” on page 346.

Items in the attributes table that satisfy the query are highlighted and the corresponding vectors are highlighted.

Note

The results from the vector query can be saved to a new vector layer, see

“Saving

Selected Records to a New Vector Layer” on page 352.

Editing Single Attribute Values

To edit a single attribute value, double-click in the desired attribute field and enter the new value.

Adding New Attribute Columns

To add new columns to the attribute table:

• Select Options

Add Record Columns. In the resulting Attribute

Initialization dialog, enter the new attribute information.

Overlaying Vectors

ENVI User’s Guide

Chapter 4: Interactive Display Functions

351

Deleting Attribute Columns

To delete an attribute column from the table:

• Click on the column name to highlight the column and select Options

Delete Record Column.

Sorting Table Information

Sort the attribute table using the values or strings in a column (in a forward, reverse, or original order).

1. Click on the column name to sort.

2. Select Options

Sort by selected column forward, Sort by selected

column reverse, or Sort by original order.

Replacing Attributes with a Single Value

To replace cells in the same column with a single value:

1. Select one of the following options:

• To replace the entire column, click on the column name.

• To replace specific selected cells, click and drag with the cursor to highlight the specific cells.

2. Select Options

Replace selected cells with value.

3. When the Replace Table Cells with Value dialog appears, enter the desired string or numeric value and click OK.

Replacing Attributes with ASCII Data

To replace cells in the same column with values from an ASCII file:

1. Select one of the following options:

• To replace the entire column, click on the column name.

• To replace specific selected cells, click and drag with the cursor to highlight the specific cells.

2. Select Options

Replace selected cells with ASCII values.

3. Select the desired input ASCII filename.

4. When the Input ASCII File dialog appears, select the desired column number

(strings can only have one column), and starting and ending row numbers.

ENVI User’s Guide

Overlaying Vectors

352

Chapter 4: Interactive Display Functions

5. Click OK to enter the data into the attribute table.

Saving Selected Records to a New Vector Layer

To save the selected records or query results to a new vector layer:

1. In the Layer Attributes dialog, select File

Save Selected Records to new

Layer.

2. Enter a layer name and an output filename and click OK.

Saving Selected Records to an ASCII file

To save the selected records or query results to an ASCII file:

1. From the Layer Attributes dialog, select File

Save Selected Records to ASCII.

2. Enter an output filename and click OK.

Saving Changes

To save changes made to the attribute table:

• Select File

Save Changes.

Warning

Saving changes overwrites the existing attribute file.

Saving Attribute Tables to ASCII Files

1. In the Attribute Table, select File

Save Records to ASCII.

2. When the Output Records to ASCII dialog appears, enter an output filename.

Closing Attribute Tables

To close the attribute table:

• Select File

Cancel.

Overlaying Vectors

ENVI User’s Guide

Chapter 4: Interactive Display Functions

353

Hiding the Vector Parameters Dialog

When working with vectors in an Image display, to hide or show the Vector

Parameters dialog without erasing your vector layers, see “Showing and Hiding

Overlay Dialogs and Layers” on page 239.

Closing Vector Displays

To close the Vector Parameters dialog and to erase vectors from an image display, do the following:

• Select File

Cancel from the Vector Parameters dialog menu bar.

ENVI User’s Guide

Overlaying Vectors

354

Chapter 4: Interactive Display Functions

Contrast Stretching and Quick Filtering

Use Enhance to perform quick contrast stretches, to perform interactive contrast stretching using histograms and to apply quick filter enhancements to displayed data.

These enhancements are not applied to the data files. Use contrast stretching to adjust the color or grayscale range of a selected image so it fills the computer display’s dynamic range and improves the contrast in the image. Available stretching options allow you to do this using both linear and non-linear methods.

When an image is first displayed, default stretch is determined in one of three ways:

• An ENVI look-up-table (LUT) is automatically applied to the data if a LUT was saved previously (see

“Saving Stretch LUTs” on page 370).

• If a LUT does not exist for the displayed bands, the default stretch defined in the

.hdr

file is used (see

“ENVI Header Format” on page 1077).

• If no default stretch is defined in the

.hdr

file, the default stretch defined in the envi.cfg

file is applied (see

“Configuration File Details” on page 1063).

ENVI provides both default quick stretching and interactive stretching.

Figure 4-35: Interactive Stretching and Filtering Options

Contrast Stretching and Quick Filtering

ENVI User’s Guide

Chapter 4: Interactive Display Functions

Applying Display Filters

355

Use Filter to choose sharpening, smoothing, and median filters. These filters are applied to the displayed data only and can be used to quickly enhance the displayed data.

To apply a filter to your displayed data:

• Select Enhance

Filterfilter type.

For more filtering functions and information, see Chapter 8, “Filters”

.

Sharpening Filters

The sharpening filters perform a high pass convolution on the data in the image displays windows (Image, Scroll, and/or Zoom). Three types of sharpening filters are available, each one with a differing amount of data add-back. The number in brackets next to the Sharpen menu item is the kernel center value. Therefore, the sharpening filters with higher numbers in the brackets have a larger amount of the original data added back to the filtered image.

Note

When using the sharpening filters with unsigned integer data, the result may not be properly displayed due to the underflow of negative numbers. To avoid this, use

Filter

Convolutions and Morphology from the ENVI main menu bar instead.

Smoothing Filters

The smoothing filters perform a low pass convolution on the data in the display windows. Two smoothing filters are available: the Smooth [3x3] filter uses a 3x3 kernel size, and the Smooth [5x5] filter uses a 5x5 kernel size. The larger kernel size results in more smoothing.

Median Filters

The median filters replace the center pixel value with the median value in the kernel.

Two median filters are available, with kernel sizes of 3x3 and 5x5. These filters can help reduce salt and pepper type noise or speckle.

ENVI User’s Guide

Applying Display Filters

356

Chapter 4: Interactive Display Functions

Applying Default (Quick) Stretches

Select from several default stretching options that use the data from the Main Image window, the subsampled Scroll window, or the Zoom window.

From the Display menu bar, select Enhance

Linear, Linear 0–255, Linear 2%,

Gaussian, Equalization, or Square Root to stretch the displayed image using statistics from the Main Image window [Image], the Scroll window subsampled data

[Scroll], or the Zoom window data [Zoom].

Tip

You can also apply quick stretches from within the Interactive Contrast Stretching

dialog (see “Stretch Types” on page 361.)

Quick Linear Stretch

The quick Linear stretch uses the data minimum and maximum to perform a linear contrast stretch (no clipping). This is particularly useful for displaying images with only a few data values, where clipping might saturate all of the values.

Quick Linear 0–255 Stretch

The quick Linear 0–255 stretch does not actually stretch the data—it displays the actual DN values of the pixels as computer screen display values that range from 0 to

255, where 0 indicates no brightness and 255 indicates maximum brightness.

When you use the Linear 0–255 stretch, you will most likely produce an image that does not have many gray levels or colors because the data was not stretched to fill the display’s dynamic range.

Quick Linear 2% Stretch

The quick Linear 2% stretch applies a linear method with a 2% clip on both ends of the displayed data.

Quick Gaussian Stretch

The quick Gaussian stretch applies a Gaussian method with a mean of DN 127 and the data values at

± 3 standard deviations set to 255 and 0, respectively.

Applying Default (Quick) Stretches

ENVI User’s Guide

Chapter 4: Interactive Display Functions

357

Quick Equalization Stretch

The quick Equalization stretch applies a histogram equalization method to the displayed data.

Quick Square Root Stretch

The quick Square Root stretch takes the square root of the input histogram and then applies a linear stretch.

ENVI User’s Guide

Applying Default (Quick) Stretches

358

Matching Histograms

Chapter 4: Interactive Display Functions

Use Histogram Matching to automatically match the histogram of one displayed image to another displayed image. This function makes the brightness distribution of the two images as close as possible. The resulting histogram of the display where the function was started is changed to match the current (source) histogram of the selected image display. The histogram source is selected as the input histogram. You can use this feature on both grayscale and color images.

Note

To perform Histogram Matching, you must have at least two images displayed.

1. Begin in the Main Image window of the histogram that you want to change.

Select Enhance

Histogram Matching from the Main Image menu bar. The

Histogram Matching Input Parameters dialog appears.

2. In the Match To list, select the display number of the image with the histogram you want to match to.

3. Under Input Histogram, select the source of the input histogram by selecting the appropriate toggle button: Image, Scroll (subsampled data), Zoom, Band

(all pixels), or a ROI (region of interest).

4. Click OK.

The display stretch changes to match the selected histogram.

Note

To see how the histogram matched, select Enhance

Interactive

Stretching in the image where you applied the histogram match.

The resulting dialog shows two histograms in the Output Histogram plot: the imported histogram in red and the matched output histogram in white.

Matching Histograms

ENVI User’s Guide

Chapter 4: Interactive Display Functions

Using Interactive Stretching

359

Use Interactive Stretching to stretch your image data by interacting with histograms.

1. From the Display menu bar, select Enhance

Interactive Stretching. An

Input and an Output histogram appear in the Interactive Contrast Stretching dialog. They show the current input data and applied stretch respectively. Two vertical dotted lines mark the current minimum and maximum values of the stretch. For color images, the color of the histogram matches the color of the selected band (the red band is displayed by default). At the bottom of the

Interactive Histogram window, the stretch type and the histogram source are listed.

Note

To view the histogram for the green or blue bands of a color image, click the

G or B toggle button.

2. You can choose to have stretching or histogram changes applied to your images automatically, by selecting Options

Auto Apply. To have changes applied to your image only when you click the Apply button, deselect the Auto

Apply by clicking Options

Auto Apply and toggling the feature off.

See

Setting Stretch Parameters for details on how to set the stretch parameters.

Viewing Data Details

To view the current DN, and the number of pixels, percentage, and cumulative percent of pixels for that specific DN, press and hold the left mouse button within the histogram and drag the resulting white cross-hair cursor.

ENVI User’s Guide

Using Interactive Stretching

360

Chapter 4: Interactive Display Functions

Setting Stretch Parameters

Use the Options menu and interactive mouse functions to set preferences for your stretch and to view details in the Interactive Histogram window.

Changing Min/Max Stretch Values

To change the minimum and maximum stretch values, click with the left mouse button on either of the dotted stretch bars and drag them to a new location. Or, enter the values in the text boxes at the top of the dialog.

Tip

When specifying the minimum and maximum parameters in the text boxes, enter either the actual values desired (for example, 37 for the minimum and 68 for the maximum) or a percentage of the data (for example, 2% for the minimum and 98% for the maximum). You can set the histogram values outside the data range but the stretch values can only fall within the values shown on the input histogram.

When the values are entered, the output histogram updates to reflect the changes made to the input histogram and shows the distribution of the data with the new stretch applied.

Figure 4-36: The Interactive Contrast Stretching dialog.

Using Interactive Stretching

ENVI User’s Guide

Chapter 4: Interactive Display Functions

361

Locking Stretch Bars

1. To lock the distance between the minimum and maximum stretch bars, select

Options

Stretch Bars:Locked. The distance between the stretch bars is locked and you can move the two bars as one.

2. To unlock the bars, select Options

Stretch Bars:Unlocked.

Stretch Types

Use the Stretch_Type menu in the Interactive Contrast Stretching dialog to select from a list of all available types of interactive stretches.

Applying Linear Contrast Stretches

Linear contrast stretching is the default interactive stretch. A linear stretch sets a minimum and maximum input value to 0 and 255 respectively and all other values in between are linearly aligned to intermediate output values.

1. From within the Interactive Contrast Stretching dialog, select

Stretch_Type

Linear Contrast Stretch.

2. To determine the minimum and maximum input value move the minimum and maximum vertical bars (dotted white lines) on the input histogram to the desired location using the left mouse button or enter the minimum and maximum input values by entering the desired DN values or a percentage of the data (for example, 5% for minimum and 95% for maximum) in the Stretch text boxes.

Note

For information about interacting with the Interactive Histogram window, see

“Plotting Histograms in an ENVI Plot Window” on page 369.

3. Click Apply to apply the stretch to the displayed data. To re-display the original stretch select Options

Reset Stretch.

The selected stretch can also be permanently applied to the displayed image as described in

“Converting Stretched Data” on page 369.

ENVI User’s Guide

Using Interactive Stretching

362

Chapter 4: Interactive Display Functions

Applying Piecewise Linear Contrast Stretches

A piecewise linear contrast stretch can be interactively defined by using the mouse to position points in the input histogram. Linear segments connect the points to provide linear stretching between them.

1. Select Stretch_Type

Piecewise Linear. A transfer function is plotted on the input histogram.

2. Click the middle mouse button anywhere in the Input Histogram plot to add a node to the transfer function. Line segments are plotted to connect the endpoints to the plotted node symbol.

• To move the position of a point, click the left mouse button on the symbol and drag it to a new position.

• To delete points, click on the symbol with the right mouse button.

• To enter input and output values manually, select Options

Edit

Piecewise Linear.

3. The resulting histogram is plotted in the output display. The output histogram shows the distribution of data with the new stretch applied.

4. Click Apply to apply the stretch to the displayed data.

For information about interacting with the Interactive Histogram window, see

“Plotting Histograms in an ENVI Plot Window” on page 369).

Applying Gaussian Contrast Stretches

The default Gaussian stretch is centered at a mean DN of 127 with the data values 3 standard deviations set to 0 and 255.

1. Select Stretch_Type

Gaussian.

2. Enter minimum and maximum values for the stretch. The output histogram shows the selected Gaussian function as a red curve. The stretched data distribution is shown superimposed in white on the red Gaussian function. To enter the desired number of standard deviations manually, select

Options

Set Gaussian Stdv.

3. Click Apply to apply the stretch to the displayed data.

Using Interactive Stretching

ENVI User’s Guide

Chapter 4: Interactive Display Functions

363

Applying Histogram Equalization Contrast Stretches

To automatically scale the data to equalize the number of DNs in each histogram bin:

1. Select Stretch_Type

Equalization. The input histogram shows the unmodified data distribution. The output histogram shows the equalization function as a red curve, and the stretched data distribution is shown superimposed in white.

2. Click Apply to apply the stretch to the displayed data.

For information about interacting with the Interactive Histogram window, see

“Plotting Histograms in an ENVI Plot Window” on page 369).

Applying Square Root Contrast Stretches

To take a square root of the input histogram and then apply a linear stretch:

1. Select Stretch_Type

Square Root. The input histogram shows the unmodified data distribution. The output histogram shows the square root function as a red curve, and the stretched data distribution is shown superimposed in white.

2. Click Apply to apply the stretch to the displayed data.

Applying Arbitrary Contrast Stretching and Histogram

Matching

Use Arbitrary to draw any shape histogram on top of the Output Histogram or match a histogram from another image.

1. Select Stretch_Type

Arbitrary. The Input Histogram shows the unmodified data distribution.

2. Draw the output histogram in the Output Histogram window by clicking the left mouse button to draw segments of the output histogram, or by drawing with the left mouse button depressed. The arbitrary histogram appears in green.

To erase the histogram, click the middle mouse button.

3. Click the right mouse button to accept the output histogram and match the data statistics to the drawing. The output histogram shows your histogram in red and the matched data function as a white curve.

4. Click Apply to apply the stretch to the displayed data.

ENVI User’s Guide

Using Interactive Stretching

364

Chapter 4: Interactive Display Functions

Matching Histograms

Also use the Arbitrary Contrast Stretching function to match a histogram from one image to the histogram of another.

1. Grab either the input or output histogram from one plot by clicking on the

Input Histogram or Output Histogram text label at the top of the plot using the left mouse button.

2. Drag the name into the other output histogram and release the button. The imported histogram will be plotted in red and the output histogram will be stretched to match the imported histogram.

3. Click Apply to apply the stretch to the displayed data.

Defining Look-Up-Tables

A user-defined look-up-table stretches each input DN to an output value. It can be restored (see

“Restoring Stretch LUTs” on page 370) or defined interactively.

1. Select Stretch_Type

User Defined LUT.

2. Select Options

Edit User Defined LUT. When the edit dialog appears, a list of the input DN values and their corresponding output stretch values is

Using Interactive Stretching

ENVI User’s Guide

Chapter 4: Interactive Display Functions

shown under the Edit User Defined LUT label. These values reflect the current stretch.

365

Figure 4-37: The Edit User-Defined LUT dialog

3. Click on the value to be edited.

4. When it appears in the Edit Selected Item: text box, enter the desired value and press the Enter or Return key. To reset the look-up-table to the values it had when the function was initiated, click Reset.

5. Click OK.

6. Click Apply to apply the stretch to the displayed data.

ENVI User’s Guide

Using Interactive Stretching

366

Chapter 4: Interactive Display Functions

Defining Histogram Source Information

Input histogram information can be extracted from the Main Image window, from the

Scroll window (subsampled), from the Zoom window, from the entire image band (all pixels of the data), or from a user defined region-of-interest (ROI).

• Select Histogram_Source

desired input data source.

The output histogram, and thus the resulting stretch, changes based upon the source of the input histogram.

Using Zoom Window Data

When the Zoom window is selected as the data input source choose from the following additional options:

To view histograms for different portions of the image:

• Moving the zoom box in the Main Image window:

To view Histograms for the Zoom window in real time.

• Click and hold the left mouse button inside the zoom box in the Main Image window and drag the box to a new location. The input and output histograms are automatically updated as the box moves. Changing the size of the zoom box changes the pixels displayed, which also changes the histograms.

Setting Histogram Parameters

Use the Histogram Parameters dialog and interactive mouse functions to set preferences for your histograms.

Changing Histogram Vertical Scale

To change the vertical scale of the histograms:

• Click the middle mouse button at the desired maximum Y value anywhere within the plot to be scaled.

To reset the vertical scale to the original Y value:

• Click the middle mouse button below the X axis of the plot to be reset.

Using Interactive Stretching

ENVI User’s Guide

Chapter 4: Interactive Display Functions

367

Changing Histogram Min/Max

The input histogram minimum and maximum values can be changed. Values can be selected either inside or outside the actual data range. Any subsequent clipping using histogram percentages will consider the histogram using the new minimum and maximum data values.

1. In the Interactive Histogram window, select Options

Histogram

Parameters. The #n Histogram Parameters dialog appears (where n designates the number of the source display).

2. Enter minimum and maximum values for the histogram.

3. Press the Enter or Return key. To restore the original range, click the Reset

Histogram button.

Setting the Number of Bins

1. In the Interactive Histogram window, select Options

Histogram

Parameters. The #n Histogram Parameters dialog appears (where n is the number of the source display).

2. In the Maximum Bins text box, enter the maximum limit for the number of bins used in the histogram.

Using the Same Range with New Data

To set your preference for whether the range you entered is retained when new data is loaded:

• Select Options

Auto Reset Histogram On or Auto Reset Histogram Off.

Or in the Interactive Histogram window:

• Select Options

Histogram Parameters. The #n Histogram Parameters dialog appears (where n is the number of the source display), then click the

Auto Reset Histogram arrow toggle button to select Yes or No.

ENVI User’s Guide

Using Interactive Stretching

368

Chapter 4: Interactive Display Functions

Interactive Stretching Options

Options when working with interactive stretching include setting the floating point precision, resetting the stretch parameters to the original settings, and applying stretches.

Setting Floating Point Precision

If your data is floating point, you can set the number of significant digits to display:

1. In the Interactive Histogram window, select Options

Set Floating Point

Precision.

2. In the dialog, use the arrow buttons to change the number of digits of precision or enter a number into the text box.

3. Click OK.

Resetting Stretches

To reset the stretch to what it was initially:

• Select Options

Reset Stretch.

Applying Stretches

If you selected Options

Auto Apply:Off:

• Click Apply to apply the stretch parameters.

Note

You can also set the Interactive Stretch Auto Apply option in the ENVI main preferences file. For information, see the description of Miscellaneous preferences under

“Setting ENVI Preferences” in Chapter 2.

Using Interactive Stretching

ENVI User’s Guide

Chapter 4: Interactive Display Functions

369

Managing Interactive Stretches

Use the File menu in the Interactive Histogram window to output histograms, save and restore LUTs, convert stretched data, and to plot histograms in an ENVI plot window.

Converting Stretched Data

Use Export Stretch to convert data from one type to any other ENVI-supported data type (for example, byte to floating point, integer to byte, etc.) and to save the displayed data (with the current stretch applied) as an output file.

1. In the Interactive Contrast Stretching dialog, select File

Export Stretch.

2. When the Output Stretch Parameters dialog appears, select a spatial subset if desired.

3. Select the desired output data type from the Output Data Type button menu.

4. Enter the output data range (minimum and maximum) in the appropriate text boxes.

5. Click File or Memory to select either output to file or memory.

If you choose File, enter an output file name.

6. Click OK.

A status box indicates the processing progress.

Plotting Histograms in an ENVI Plot Window

Use this procedure to plot a histogram in a new ENVI plot window. When the histogram is plotted in a new window, you can apply ENVI’s interactive plot functions, such as saving and annotation (see

“Using Interactive Plot Functions” on page 387 for instructions).

1. From the ENVI main menu bar, select Window

Start New Plot Window

(see

“Starting New Displays” on page 184).

2. Grab the Input Histogram or Output Histogram text label at the top of the plot with the left mouse button and drag the name into the new plot window.

ENVI User’s Guide

Using Interactive Stretching

370

Chapter 4: Interactive Display Functions

Saving Histograms

Standard ENVI output options include Image, PostScript, BMP, HDF, JPEG, PICT,

SRF, TIFF, and XWD formats.

• Select File

Save Plot AsPostscript or Image File. To print the

Interactive Histogram window, select File

Print.

The interaction is similar to that for saving plots, but no annotation is allowed. For

instructions, see “Display Output Options” on page 446.

Saving Stretch LUTs

Stretch Look-up-Tables (LUTs) can be saved to either an ASCII format file or an

ENVI format file.

To save a LUT, select File

Save Stretch to LUT ASCII LUT or ENVI

Default LUT in the Interactive Contrast Stretching dialog.

• Choosing ASCII LUT saves the look-up-table to a file as a single column of

ASCII data with the parameters Binsize and Data Min at the top of the file. The first value in the data column corresponds to the LUT value for the input data minimum. The next value is the LUT value for the input data minimum plus the binsize and the remaining values in the column are saved in the same manner up to the input data maximum value.

• Choosing ENVI Default LUT saves the LUT to an ENVI binary format file.

This file is automatically named with the input filename and a .

lut

extension and saved in the same directory as the input file (or in the alternate header directory). When the data band is displayed in ENVI, this LUT will be automatically used as the default stretch.

Restoring Stretch LUTs

1. To restore a previously saved LUT, select File

Restore LUT Stretch in the

Interactive Contrast Stretching dialog.

2. If no default .

lut

file exists for the band displayed, select either an ENVI binary LUT file or an ASCII LUT file containing one column of look-up-table data when the standard ENVI input file selection dialog appears.

If no Binsize or Data Min parameters are contained in the file, it is assumed that the binsize equals one and the data minimum is zero.

Using Interactive Stretching

ENVI User’s Guide

Chapter 4: Interactive Display Functions

Interactive Analysis Tools

371

Use the Tools menu to access ENVI’s interactive analysis tools. ENVI interactive analysis tools are generally related to a specific display or require significant interaction. Use the tools to link image displays, extract Z profiles and spectral plots, extract polarization signatures, draw Regions of Interest, apply color maps and density slices, edit pixels interactively, extract measurement, calculate line of sight, create animations, form two-dimensional scatter plots, and view three-dimensional surface plots.

ENVI User’s Guide

Figure 4-38: Interactive Analysis Tools in the Tools Menu

Interactive Analysis Tools

372

Chapter 4: Interactive Display Functions

Display Linking and Dynamic Overlays

Use image linking and dynamic overlays to overlay portions of multiple images simultaneously (or flicker images) and to perform identical operations on multiple images from within a single image window.

Linking Images

Use Link to link and unlink images. When images are linked, actions such as moving the zoom box, the scroll box, changing the zoom factor, or resizing one image window are mirrored in all other linked image windows. Ideally, images should only be linked when they are the same size or when one image is a subset of the other image. However, ENVI allows you to specify the link pixel regardless of the relationship between images.

1. From the Display menu bar, select Tools

LinkLink Displays.

Note

To use the link function, you must have at least two image windows open.

The Link option is not available when only one image is displayed.

2. When the Link Displays dialog appears, select from the list of available displays by using the arrow toggle button for each available display to select

Yes or No.

3. Specify the link pixel for each image by specifying the Link xoff (x offset) and

yoff (y offset) parameters in pixels measured from the upper left (1,1) corner of each image.

4. Select the base image for the link by choosing the appropriate display from the

Link Size/Position menu.

5. Toggle the Dynamic Overlay to be On or Off for your linked images. When

Dynamic Overlay is On, clicking the left mouse button in one display overlays the image from the linked display.

6. You can set the Transparency level of the overlay in the Link Displays dialog from 0 to 100%. In this case, 0% results in the second display completely masking the display in which the mouse button was clicked, and 100% results in a completely transparent overlay. A transparency factor of 50 shows half underlying image and half dynamic overlay.

7. Click OK to execute the link settings. All other images are sized and positioned to correspond to the base image.

Display Linking and Dynamic Overlays

ENVI User’s Guide

Chapter 4: Interactive Display Functions

373

If you already have images linked and want to link another image:

• Open the Link Displays dialog and select Yes for that display using the arrow toggle button.

To remove a single display window from the link:

• Select Tools

Link Unlink Display in that image window. The other windows remain linked.

Working with Multiple Dynamic Overlays

Use Dynamic Overlays for real-time overlay and toggling (flickering) of multiple grayscale or color images. By default, dynamic overlays are activated automatically when two or more windows are first linked. Multiple overlays are active in all linked image windows simultaneously and in each Zoom window.

Note

Dynamic Overlays do not work with Geographic Link or with an image that is georeferenced with non-zero rotation.

ENVI User’s Guide

Figure 4-39: Example of Dynamic Overlays

Display Linking and Dynamic Overlays

374

Chapter 4: Interactive Display Functions

The following steps show how to use dynamic overlays.

1. From the Display menu bar, select Tools

LinkLink Displays. The Link

Displays dialog appears.

2. The displays to be linked are toggle-selected in this dialog. Select OK to apply the link.

3. When the displays are linked, the Dynamic Overlay can be toggled On and

Off using the following Display menu selections:

• Select Tools

LinkDynamic Overlay On, or

• Select Tools

LinkDynamic Overlay Off.

4. Select from the following options and see

“Mouse Actions with Dynamic

Overlays On” on page 375 for a summary of mouse button functions when

dynamic overlays are on and

“Mouse Actions with Dynamic Overlays Off” on page 375 for a summary of mouse button functions when two images are

linked but dynamic overlays are turned off.

To show a second linked image (the overlay) in the first image (the base):

• Click the left mouse button in any of the linked images.

To cause the multiple overlays to cycle, successively displaying each linked image as an overlay on the base image:

• Hold down the left mouse button and simultaneously click the middle mouse button. You can also cycle through all the linked images by holding down the left mouse button and pressing the n key on your keyboard.

To move the overlays around inside a specific image and compare the two images:

• Click and hold the left mouse button and move the cursor in the image (see

“Mouse Actions with Dynamic Overlays On” on page 375).

To change the size of the overlay:

• Press the middle mouse button and drag the corner of the overlay and release the button. After resizing, use the left mouse button to reposition the overlay.

To do a quick comparison of the images:

• Repeatedly click and release the left mouse button to activate the overlay effect. Select Tools

LinkDynamic Overlay Off to turn off the

flickering feature (see “Mouse Actions with Dynamic Overlays Off” on page 375).

Display Linking and Dynamic Overlays

ENVI User’s Guide

Chapter 4: Interactive Display Functions

375

When displays are linked, the Zoom window can still be repositioned by clicking and dragging using the left mouse button when the cursor is within the zoom box outline in the Main Image window (see

“Mouse Actions with Dynamic Overlays Off” on page 375).

To save to memory the image in the Image Window display with the dynamic overlay shown:

• Press the p key on your keyboard while holding down the left mouse button. The resulting image appears in the Available Bands List.

Mouse Actions with Dynamic Overlays On

The following table specifies the mouse actions for when dynamic overlay is on.

Mouse Button

Left

Middle

Right

Left + Middle

Action

Click and drag the overlay (exception - the zoom box functions as shown in the following table).

Resize the overlay.

Click to display the shortcut menu.

Cycle multiple overlays.

Table 4-7: Mouse Functions for Linked Images with Dynamic Overlays

Mouse Actions with Dynamic Overlays Off

The following table specifies the mouse actions for linked images when dynamic overlay is off.

Mouse Button

Left

Middle

Right

Action

Clicking and dragging inside the zoom window box causes repositioning of the selected zoom window. The portion of the image displayed in the zoom window is updated when released.

Position the current pixel at the center of the zoom window.

Click to display the shortcut menu.

Table 4-8: Mouse Functions for Linked Images without Dynamic Overlays

ENVI User’s Guide

Display Linking and Dynamic Overlays

376

Chapter 4: Interactive Display Functions

Linking Multi-Resolution Georeferenced Images

Use Geographic Link to link display windows and vector windows containing georeferenced data. When linked, all displayed georeferenced images and Vector windows update to the current cursor map location when you move the cursor. This function works regardless of the projection, pixel size, and rotation factor of each data set.

Note

This function does not provide any on-the-fly re-projection, resampling, or dynamic overlay. To re-project and resample data sets to the same projection and resolution, see

“Layer Stacking” on page 470.

To create a geographic link:

1. Select Tools

LinkGeographic Link from the Main Image Display menu bar.

2. In the Geographic Link dialog, select the displays to link and click the arrow buttons beside the display to select On for the displays to be linked.

3. Click OK. When you move the cursor in one georeferenced Image or Vector window, the cursor in all other georeferenced images and vector windows will move to the same map location.

To turn a geographic link off:

1. Select Tools

LinkGeographic Link.

2. Click the arrow buttons beside the display names to select Off for the displays to be unlinked.

3. Click OK.

Display Linking and Dynamic Overlays

ENVI User’s Guide

Chapter 4: Interactive Display Functions

Interactive Profiles and Spectral Plots

377

ENVI allows extraction of horizontal (X), vertical (Y), spectral (Z for individual pixels), and arbitrary profiles.

The profiles are displayed in separate plot windows and the X, Y, and Z profiles can be active simultaneously. The mouse is used to move a crosshair and select the profiles interactively. The profiles are standard ENVI plots and have associated controls and options described in detail in

“Using Interactive Plot Functions” on page 387.

ENVI’s Z profile capabilities provide integral spectrum analysis. Spectra can be extracted from any multispectral data set including MSS, TM, GEOSCAN (24 bands), GERIS (63 bands), and AVIRIS (224 bands).

Tip

To show the entire data range, you should turn the Auto Scale Y-Axis on when plotting profiles (select Options

Auto Scale Y-Axis On).

See the following sections for detailed instructions.

Extracting X and Y (Horizontal and Vertical) Profiles

The X profile is automatically extracted for pixels that fall along the horizontal cursor line, while a Y profile is extracted for pixels that fall along the vertical cursor line.

If a color composite image is displayed, X and Y profiles are plotted for all three images in their corresponding colors (RGB). If only one band is displayed, the profile of that band will be plotted in white. A vertical line is used to mark the current line or sample location of the crosshair in the X or Y profile respectively.

1. From the Display menu bar, select Tools

ProfilesX Profile or Y

Profile.

A crosshair appears in the Main Image and Zoom windows at the current pixel and a plot window appears with a profile for the current horizontal or vertical crosshair.

2. Click the left mouse button on another pixel to extract a new profile. The horizontal, vertical, and spectral profiles are updated continuously as the current pixel location is moved.

ENVI User’s Guide

Interactive Profiles and Spectral Plots

378

Chapter 4: Interactive Display Functions

Note

To activate continuous real-time browsing, click and hold the middle mouse button in the Main Image window and drag the zoom box to the desired location.

Figure 4-40: X and Y Profiles

3. Once the X or Y profile has been extracted, click and hold the left mouse button in the profile plot and drag the cursor to mark the current position on the profile with cross-hair cursor in the image. The zoom box crosshair concurrently tracks the location in the profile on the Scroll, Main and Zoom window and the Main and Zoom images are updated to match the position of the cursor along the profile.

Extracting Z Profiles

Use ENVI’s Z profiles to interactively plot the spectrum (all bands) for the pixel under the cursor. Spectra can be extracted from any multispectral data set including

MSS, TM, and higher spectral dimension data such as GEOSCAN (24 bands),

GERIS (63 bands), and AVIRIS (224 bands).

Vertical Plot bars in the Z Profile window show which band or RGB bands are currently displayed in the display window. The bands shown in the display window can be interactively changed by moving the plot bars to new band positions.

For data sets with fewer than approximately 50 spectral bands, the extraction and plotting of spectra are fast enough that a BSQ data file can be used. For higher spectral dimension data sets such as hyperspectral data, use of a BIL or BIP file

Interactive Profiles and Spectral Plots

ENVI User’s Guide

Chapter 4: Interactive Display Functions

379 allows real-time extraction of spectra (see

“Converting Data (BSQ, BIL, BIP)” on page 472).

Note

Use of the BIL data format is recommended for hyperspectral data sets because it produces a response similar to the BIP data for spectral plotting and browsing and yet is much faster than BIP format for image display.

1. From the Display menu bar, select Tools

ProfilesZ Profile (Spectrum).

2. Select a pixel in either the Main Image window or the Zoom window to plot the corresponding spectrum in the plot window. A vertical line (plot bar) on the plot marks the wavelength position of the currently displayed band. If a color composite image is displayed, three colored lines appear, one for each displayed band in the band’s respective color (RGB).

Figure 4-41: Z (spectral) Profile Plots (left) Landsat Thematic Mapper (Right)

AVIRIS

Changing the Displayed Bands

Use this procedure to change the currently displayed bands in the image display window.

1. Change the plot bars to the desired bands by clicking and dragging the plot bars with the left mouse button.

2. Double-click the left mouse button within the Z Profile plot window to load the new bands into the display window.

ENVI User’s Guide

Interactive Profiles and Spectral Plots

380

Chapter 4: Interactive Display Functions

Browsing Spectra

To perform spectral browsing:

• Click the middle mouse button in the zoom box, then hold left mouse button down and drag the box across the image.

Plotting Average Spectra

Use this procedure to plot an average spectrum calculated from a box of pixels around the cursor.

1. Select Options

Set Z Profile Avg window.

2. Enter the desired box size, in pixels, in the Window Size text boxes.

The average box size can also be set in the ENVI file header (see

“Editing ENVI

Headers” on page 104).

Plotting Multiple Spectra

To plot multiple Z profiles (spectra) over each other in the Spectral Profile plot window:

• Select Options

Collect Spectra.

See

“Using Interactive Plot Functions” on page 387 for a description of the other plot

options.

Extracting Additional Z Profiles

A Z profile for the pixel under the cursor in the display window can be extracted from an additional file and plotted in a new plot window. After an additional Z profile input file is selected, the spectra are plotted as you are spectral browsing in the display

window just like the data Z profile. See “Extracting Z Profiles” on page 378 for

details about Z profile interactions.

1. From the Display menu bar, select Tools

ProfilesAdditional Z Profile.

2. Select the desired input file name for the additional Z profile.

Interactive Profiles and Spectral Plots

ENVI User’s Guide

Chapter 4: Interactive Display Functions

381

3. Select a pixel in either the Main Image window or the Zoom window to plot the spectrum for the additional file in a new plot window.

Note

An additional Z profile filename can be set in the data header file so that every time the Z profile function is started, both the data Z profile and additional Z profile will be plotted. The two plot windows will appear with one on top of the other so you will have to move one window.

Creating Arbitrary Profiles (Transects)

Use this procedure to specify or create transects along which arbitrary profiles will be drawn on the Main Image Display, Scroll, or Zoom windows. Multiple, simultaneous arbitrary profiles are supported. The arbitrary profiles will be numbered and color coded on the display.

1. From the Display menu bar, select Tools

Profiles Arbitrary Profile

(Transect).

2. When the #n Spatial Profile Tool dialog appears, click on the Image, Scroll, or

Zoom toggle button to designate which window to extract the profile from.

3. Click the left mouse button in the image to start the transect in the selected window.

4. Click the left mouse button again at each new vertex of the profile.

Note

To start over, click the middle mouse button to delete the entire transect prior to completion.

5. Click the right mouse button to select the final vertex and complete the transect. A handle (color diamond shape) is placed on the drawn transect.

• To move the transect, click and drag the handle with the left mouse button.

• To delete the transect, click the middle mouse button.

ENVI User’s Guide

Interactive Profiles and Spectral Plots

382

Chapter 4: Interactive Display Functions

6. To extract and display the profile in a plot window, click the right mouse button.

Note

If the transect is extracted from a three band color composite image, then three profiles will be displayed in the plot window. The red band profile will be a solid line, the green band profile will be a dotted line, and the blue band profile will be a dash-dot line.

7. Click the left mouse button in the profile plot window and move the cursor to mark the current position on the profile with a cross-hair cursor in the image.

Note

The zoom box concurrently tracks the location in the profile on the Scroll,

Main and Zoom windows, and the Main and Zoom images will be updated to match the position of the cursor along the profile.

8. To define another arbitrary profile, click the left mouse button in the Main

Image, Scroll, or Zoom window again to define the new vertices. The new profile will be drawn and plotted in a new color in a new plot window.

Saving Transects to an Annotation Files

Use this procedure to save arbitrary profile lines drawn on the image to an annotation file.

1. From the Spatial Profile Tool menu, select File

Save Annotation.

2. When the file selection dialog appears, enter a filename.

Saving Spatial Profile Information to an ASCII File

All of the information associated with each spatial profile can be saved to an ASCII file. To save the points of the transect from a specified spatial profile to an ASCII data file, perform the following steps:

1. In the Extracted Profiles: section of any Spatial Profile Tool, click on the spatial profile whose transect points you want to save to an ASCII file.

2. Select File

Save Transect Points to ASCII....

The Save Transect Points to ASCII dialog appears. This dialog contains the following items:

Select Bands to Save — This list contains the bands of the image. The spatial profile values from the selected bands will be saved with the

Interactive Profiles and Spectral Plots

ENVI User’s Guide

Chapter 4: Interactive Display Functions

383 transect point locations to the ASCII file. Highlight one or more bands to select them to be saved.

Select All Items — This button allows you to select all the bands in the list at the same time.

Clear All Items — This button allows you to deselect any/all bands currently selected in the list.

Enter Output Filename — This text box and its Choose button are used to provide the name of the output file for the transect points and their related band profile values. You can either enter a filename in the text box or use the Choose button to browse for an existing directory or file.

Regardless, a filename must be specified in the Enter Output Filename text box for the transect points to be saved to an output file.

3. When you are satisfied with your selections, click OK to save the transect points to the specified ASCII file.

The resulting text file contains the following information.

• Point Column — The index number describing the location of the point within the transect.

• X and Y Columns — The point location in pixel values.

• Distance Column — This is a value describing the distance of each point with respect to the beginning point of the transect. The distance for the last point is equal to the length of the transect.

• Band Columns — These columns contain the pixel values at each point in the transect for each band selected.

If the image contains georeferencing information, the text file also includes the following projection information.

• Map X and Map Y Columns — The point location in map projection units.

• Latitude and Longitude Columns — The point location in geographic latitude and longitude coordinates in decimal degrees.

• The rest of the columns contain the pixel values at each point in the transect for each band selected.

ENVI User’s Guide

Interactive Profiles and Spectral Plots

384

Chapter 4: Interactive Display Functions

Activating the Measurement Tool

1. From the Spatial Profile Tool menu, select Options

Measurement Report.

The Profile Measurement Report dialog appears with a list of the distances between the vertices and the total distance when the profile is completed.

2. Choose from options under the Units, Area, and Options pull-down menus in the Profile Measurement Report dialog to change the units used to report the distances and areas, or select whether to report the segment distances or the

point coordinates. See “Reporting ROI Measurements” on page 305 for more

details.

3. Select File

Save Points to ASCII to save the measurement information to a file.

Creating a Transect from Polyline Vectors

Polyline vectors from the Available Vectors List can now be used with the Spatial

Profile Tool; polygon and point vectors are not accepted. To create a transect from vectors opened in ENVI, do the following.

1. In the Spatial Profile Tool, select Options

Create Transect from Vector.

The Import Vector Layers dialog appears. This dialog contains the following items:

Select Vector Layers to Import — This list contains the possible vector layers that are available for import. The vector layers available for import are derived from the open vector layers in the Available Vectors List.

Highlight one or more vector layers to select them for import. The number corresponding to the vector layers selected is shown in the Number of

selected items: field.

Select All Items — This button allows you to select all the vector layers in the list.

Clear All Items — This button allows you to deselect all the vector layers currently selected in the list.

2. When you are satisfied with your selections, click OK to create transects from the selected vector layers.

The transects produce spatial profiles listed in the Extracted Profiles: section of the

Spatial Profile Tool. The resulting spatial profiles are individually displayed in new plot windows.

Interactive Profiles and Spectral Plots

ENVI User’s Guide

Chapter 4: Interactive Display Functions

385

Creating a Transect from Map-Based or Pixel-Based Endpoints

In addition to selecting transect endpoints by clicking on the image, you can specify the starting and ending points of a transect using text boxes in a dialog. If your image data does not contain any associated map information, the endpoints are specified as paired x and y pixel locations. If the image data contains map information, the endpoints are specified based on map (UTM, geographic, or other projection) locations.

To create a transect from endpoints using the Spatial Profile Tool, perform the following steps:

1. Select Options

Create Transect from Endpoints.

If your image has no associated map information, the Enter Transect Endpoints dialog appears with the following items:

Start X — The x pixel location for the starting point of the transect.

Start Y — The y pixel location for the starting point of the transect.

End X — The x pixel location for the ending point of the transect.

End Y — The y pixel location for the ending point of the transect.

If there is map information associated with your image, a different Enter

Transect Endpoints dialog appears with the following sections:

Data Points — This toggle button allows you to provide the endpoints as map-based (with map projection coordinates) or pixel-based (with pixel locations). Selecting the pixel-based option initiates the Enter Transect

Endpoints dialog. When map information is available for the image, the default setting is map-based.

First Map Coordinate — The starting geographic or map-based coordinate of the transect.

Second Map Coordinate — The ending geographic or map-based coordinate of the transect.

2. When you are satisfied with your selections, click OK to create a transect from the specified endpoints.

The transect produces a spatial profile that is listed in the Extracted Profiles: section of the Spatial Profile Tool dialog. The resulting spatial profile is displayed in a new plot window.

ENVI User’s Guide

Interactive Profiles and Spectral Plots

386

Chapter 4: Interactive Display Functions

Creating a Transect from ASCII Files

The Spatial Profile Tool can also accept and use transect data from an ASCII data file.

To access this functionality, perform the following steps from the Spatial Profile Tool dialog.

1. Select Options

Create Transect from ASCII Data.

2. Use the Enter ASCII Points Filename dialog to open an ASCII data file. The

Input ASCII File dialog appears.

3. Use the Input ASCII File dialog to specify the parameters of the input ASCII file.

If you are creating a transect from an ASCII file previously saved using the

File

Save Transect Points to ASCII option in the Spatial Profile Tool, see

“Saving Spatial Profile Information to an ASCII File” on page 382 for more

information on the format of this file.

4. Click OK to create a transect from data imported from the ASCII file.

The transect produces a spatial profile, which is listed in the Extracted Profiles: section of the Spatial Profile Tool. The resulting spatial profile is displayed in a new plot window.

Interactive Profiles and Spectral Plots

ENVI User’s Guide

Chapter 4: Interactive Display Functions

Using Interactive Plot Functions

387

Plot windows in general provide several interactive analysis capabilities including moving plots between windows, data input and output, plot output, editing, annotation, and other options.

Mouse Button Functions in Plot Windows

The following table shows the mouse button functions available in ENVI plot windows.

Action

Mouse

Button

Left

Interaction Where

Display line-cursor, data point location and X, Y values

Resize plot window

Click and hold, drag

Inside plot window over data plot

Move plots to new window

Rescale X, Y plot ranges

Left

Left

Middle

Click and drag Corner of plot window

Click and drag to new window

On plot label

Click and drag From any point inside the plot frame diagonally to form box containing desired subset

Click Inside plot window Reset to previous X, Y plot ranges

Set Y Axis to Data Range

Toggle plot name labels

Delete specific data plot

Middle

Middle

Right

Right

Click

Click

Click

Left of plot frame

Inside plot window

On plot label

Table 4-9: Mouse Button Functions in ENVI Plot Windows

ENVI User’s Guide

Using Interactive Plot Functions

388

Chapter 4: Interactive Display Functions

Displaying an X-Y Cursor

To display an X-Y line-cursor:

• Click and hold the left mouse button within the plot. The line cursor snaps to the closest data point when multiple plots are displayed. The X and Y values of the point will be listed in the lower left corner of the plot in the color corresponding to the selected data set.

To continuously display the line-cursor, data marker, and data values:

• Move the cursor with the left mouse button depressed.

Displaying Plot Data Labels

To toggle data labels on and off:

• Click the right mouse button within the plot to display the shortcut menu and select Plot Key.

To edit the plot data label see

“Editing Y Plot Data Values” on page 396.

To delete a plot from the plot window:

• Click the right mouse button on that data label to display the shortcut menu and select Remove plot name.

Note

You cannot delete the plot for the active cursor; e.g., the X profile, the Y profile or the Z profile in their respective windows.

Moving Plots to Another Plot Window

To move plot labels and their associated data plots from one plot window to another:

• Click and hold the left mouse button on the plot label and drag it into a different plot window and release the mouse button.

Using Interactive Plot Functions

ENVI User’s Guide

Chapter 4: Interactive Display Functions

Rescaling Plots (Magnify)

To rescale the x and y plot ranges within the plot:

1. Select the new region to display within the plot window by pressing and holding the middle mouse button at one corner of a box to define the magnification region.

To reset the profile to each of the previous regions, click the middle button within the plot to back-stepping through the previous scalings.

2. Drag the corner to define the box.

389

Figure 4-42: Magnify Box in Horizontal Profile

3. Release the mouse button to redraw the enlarged profile subset. To set the Y plot range to encompass the full range of all plotted data, click the middle mouse button to the left of the plot frame.

ENVI User’s Guide

Using Interactive Plot Functions

390

Chapter 4: Interactive Display Functions

Plot Window Shortcut Menu

Use the plot window shortcut menu to access plot options such as turning the plot key on or off, stacking and unstacking plots, scaling the plot range, and to clearing the plot window.

To access the shortcut menu:

• Right-click in the plot window.

For detailed descriptions of the menu options, see

“Plot Window Options” on page 397.

Importing Plot Data

Use the File menu in a plot window to input into the window. Data input formats include ASCII and ENVI spectral library.

Importing ASCII Spectra Data

Use this procedure to load ASCII data or other (x, y) data to be plotted in a plot window. ENVI reads ASCII data that has multiple columns separated by commas or white space. Lines beginning with text or semicolons at the top of the file are ignored.

1. Within the plot window, select File

Input Data ASCII.

2. When the ASCII Plot Filename dialog appears, select a filename.

3. When the Input ASCII File dialog appears, select from the following options:

• To select the X values to be read into the plot window, enter the number of the column containing the X values into the text box labeled X Axis

Column (usually column 1).

• To select the Y values to be read into the plot window, click on a single column in the Select Y Axis Columns list to select just one column, or press the Ctrl (or Shift) key and click to select multiple columns.

Using Interactive Plot Functions

ENVI User’s Guide

Chapter 4: Interactive Display Functions

391

• To apply a scale factor to each Y value, enter the desired multiplicative factor into the text boxes labeled Y Scale Factor.

Figure 4-43: The Input ASCII File Dialog

4. Click OK to load the spectrum or other (x, y) plot into the plot window.

Once loaded, all of the other plot options are available.

Importing Spectral Library Data

1. Select File

Input DataSpectral Library.

2. When the standard ENVI input selection dialog appears, highlight the name of a currently-open spectral library file or a new file.

3. Click OK.

ENVI User’s Guide

Using Interactive Plot Functions

392

Chapter 4: Interactive Display Functions

4. When the Input Spectral Library dialog appears, select spectra by clicking on the spectrum names.

Figure 4-44: Input Spectral Library Dialog

5. Click OK to load the spectra into the plot window.

Using Interactive Plot Functions

ENVI User’s Guide

Chapter 4: Interactive Display Functions

393

Editing in Plot Windows

Use the Edit pull-down menu to control data and plot parameters and to edit plot data. Data parameters control the line types, colors, and other attributes of plotted data. Plot parameters control the axes, titles, and data ranges plotted.

Editing Data Parameters

1. In the plot window, select Edit

Data Parameters.

2. When the Data Parameters dialog appears, click on the name of the plot to edit and select from the following options. To change the name of the data label, type the new name in the Name text box and press the Enter or Return key.

ENVI User’s Guide

Figure 4-45: The Data Parameters Dialog

• To change the color of the plotted line, select from the Colors menu.

• To select the style of the line (e.g., dotted, dashed, solid), choose from

Line Style menu.

• To set the thickness of the line, use the Thick parameter box to adjust the value or enter a new value.

• To set the number of points to average in the X direction (smoothing) when plotting the data, enter the value in the text box labeled Nsum and press the Return key.

• To select the symbol type, select from the Symbol menu.

Using Interactive Plot Functions

394

Chapter 4: Interactive Display Functions

• To control the size of the displayed symbols, use the SymSize text box.

• To display the line along with the selected symbols or display only the symbols, use the arrow toggle buttons Symbol & Line or Symbol Only.

• Click Apply when all parameters have been set to the desired values and

Cancel when you wish to close the dialog.

Editing Plot Parameters

1. Select Edit

Plot Parameters. The Plot Parameters dialog appears.

Figure 4-46: Plot Parameters Dialog

2. To set parameters for all axes, select from the following options:

• To change the plot title, edit it in the Plot Title text box.

• To change the foreground and background colors click on the Foreground and Background color swatches. Left-click on the swatch to cycle through

Using Interactive Plot Functions

ENVI User’s Guide

Chapter 4: Interactive Display Functions

395 the colors available; middle button clicks cycle in the reverse direction; right-clicks bring up the color table list shortcut menu from which to choose your colors.

• To change the font used for plot labels, select from the Font button menu.

• To change the character size used for plot labels, click the Charsize arrow increment buttons.

• To allow masking of Y values outside the specified ranges (useful for masking bad data points), enter values in the Min Val and Max Val text boxes at the bottom of the dialog.

Note

Data values less than the entered minimum value and greater than the entered maximum value are not plotted.

3. To set parameters for the x or y-axis, click the X-Axis and Y-Axis toggle button.

4. Choose from the following options:

• To change the title of the axis, enter the title in the Axis Title text box and press the Enter or Return key.

• To change the thickness, enter a new value (1 is normal thickness) in the

Thick text box.

• To position the minimum and maximum values of the full data range exactly at the ends of the axis, click the Style Exact check box.

• To offset the values slightly offset from the ends of the axis, click the Style

Extend checkbox.

• To turn off the selected axis entirely, click the Style Off checkbox.

• To turn off the top X axis or the right Y axis, depending on which axis is selected, click the Style No Box checkbox.

• To change the axis data range to be displayed, type in the respective minimum and maximum into the text boxes labeled Range and To and press the Return key. (For spectral plots, the plot range for the Y axis can also be set in the

.hdr file by entering the values for the Z Plot Range parameter. See

“ENVI Header Format” on page 1077).

• To plot the tick marks on the inside or outside of the axis, click the Tick

Style In or Out toggle button.

ENVI User’s Guide

Using Interactive Plot Functions

396

Chapter 4: Interactive Display Functions

• To plot a continuous line across the entire plot at the location of each major tick mark click the Tick Style Grid toggle button.

• To turn off the tick marks entirely, click Tick Style Off.

• To change the length of the major tick marks when they are present, enter a value between 0 and 0.5 in the parameter box labeled Tick Length, and the number of minor tick marks in the Minor Ticks textbox. Lengths are measured as a ratio of the axis length normalized to 1.0. For example, a length of 0.02 results in ticks that are 2% of the length of the entire axis. A length of 0.5 results in lines drawn across 50% of the plot that meet in the middle (the equivalent of the grid option).

• Select either Auto or Fixed next to the label Tick Marks. The Auto option places a predetermined number of major and minor ticks on the axis.

Major tick marks are labeled. The Fixed option allows you to enter the axis parameters. This includes the starting and ending major ticks, the tick increment between the major ticks, and the number of minor ticks between major ticks.

• To control the size of the margins around the plot axes, enter the margin size (in characters) in the Left Margin and Right Margin (for the X axis) and the Bottom Margin and Top Margin (for the Y axis) text boxes.

5. Click Apply when all parameters have been set to the desired values and

Cancel when you wish to close the dialog.

Editing Y Plot Data Values

1. In the plot window, select Edit

Data Values.

2. When the Select Which Plot to Edit dialog appears, select the name of the plot data to edit.

3. When the Edit Plot dialog appears, containing a list of all x and y values as

Xloc (x-value):yvalue, click the y-value to edit. It appears in the Edit Selected

Item: text boxes.

4. Change the y-value to the desired value and press the Enter or Return key to change that value in the list.

5. Click OK to update the plot with the new values, or click Reset.

Using Interactive Plot Functions

ENVI User’s Guide

Chapter 4: Interactive Display Functions

397

Plot Window Options

Use the Options menu to create new plot windows, annotate plots, stack the data plots, apply automatic scaling to the Y-axis, clearing the plot window, and reset the plot data range.

Creating New Plot Windows

To create a new, blank window:

• Select Options

New Window: Blank.

To create a copy of the current plot window including the data within it:

• Select Options

New Window: with Plots.

Note

New plot windows can be set up as data collectors to hold useful plots from profiles and other plot windows.

To move plots and plot labels between windows, see “Moving Plots to Another Plot

Window” on page 388 .

For using Annotate Plot to annotate the x, y, and z profiles and other plots, see

“Annotating Images” on page 240 ).

Tip

Resize both plot and image windows to their final desired size prior to annotation. If the plot window is resized after annotation, the annotated objects will be offset from their correct positions.

Displaying Plot Keys

To turn plot key labels on or off:

• Select Options

Plot Key in the plot window or Plot Key from the shortcut menu.

ENVI User’s Guide

Using Interactive Plot Functions

398

Chapter 4: Interactive Display Functions

Stacking Plot Data

To offset all plots within the window so there are no overlapping data plots:

• Select Options

Stack Data.

Setting Stack Offset

To set the amount of offset between each stacked plot:

1. Select Options

Set Stack Offset.

2. Enter the desired value, in percent of data range, in the Plot Stack Offset text box.

Unstacking Plot Data

To replot the data without stacking:

• Select Options

Unstack Data.

Note

Unstack Data appears in the Options menu only if the data has been stacked.

Displaying Profiles of Entire Bands

To show the X or Y profile for the entire band instead of just the part of the band that is displayed in the Main Image window:

• Select Options

Profile: Full Band.

To show the X or Y profile only for the part of the band that is displayed in the Main

Image window:

• Select Options

Profile: Image Window.

Automatically Scaling the Y-Axis

To automatically rescale the Y-Axis to the data minimum and maximum when adding or updating plots:

• Select Options

Auto Scale Y-Axis On.

To leave the current Y-Axis range set:

• Select Options

Auto Scale Y-Axis Off.

Using Interactive Plot Functions

ENVI User’s Guide

Chapter 4: Interactive Display Functions

399

Note

If auto scaling is off and a plot is added outside the y-axis range set, that plot will not be visible until the y-axis is rescaled.

Clearing Plots

The Clear Plot selection appears under the Options menu in plot windows if they were created using ENVI spectral library functions or using New Window.

To clear all of the displayed plots within one of these windows:

• Select Options

Clear Plot.

Note

Profiles can not be cleared because they contain the profile for the current pixel.

Resetting Plot Ranges

To reset the x and y plot axes to their default data ranges or minimum and maximum values:

• Select Options

Reset Range or click the middle mouse button to the left of the y-axis.

Note

This option always resets the range to its original values even if it was reset using the Plot Parameters option or using the middle mouse button to zoom into a part of the plot.

Plotting an Average Z Profile Spectrum

The Set Z Profile Avg Window selection appears under the Options menu in Z profile plot windows. Use it to plot an average spectrum calculated using a box around the cursor:

1. Select Options

Set Z Profile Avg Window.

2. Enter the desired box size, in pixels, in the Window Size text boxes.

The average box size can also be set in the ENVI file header (see

“Editing ENVI

Headers” on page 104).

ENVI User’s Guide

Using Interactive Plot Functions

400

Chapter 4: Interactive Display Functions

Collecting and Replacing Spectra

To plot multiple Z profile spectra:

• Select Options

Collect Spectra.

To replace the current Z profile with the new profile spectrum:

• Select Options

Replace Spectrum.

Additional Functions in Plot Windows

Select from the following additional plot functions. These functions are accessed through the plot window Plot_Function menu.

To plot the band number (or other index number) on the X axis:

• Select Plot_Function

X Axis:Index.

For plots of images with wavelengths in the image header, plot the wavelength on the

X axis:

• Select Plot_Function

X Axis:Wavelength.

For plots of images with wavelengths in the image header, plot the wave number

(1/wavelength) on the X axis:

• Select Plot_Function

X Axis:1/Wavelength.

To replot the data displayed in the window with its continuum removed:

• Select Plot_Function

Continuum Removed. The continuum is the convex hull that fits over the data and is divided into the original data values to produce the continuum removed values (see

“Using Continuum Removal” on page 788 for details). The continuum is calculated using the first and last data

points displayed in the plot, so for plots that have been zoomed, the continuum is calculated based on the displayed data range only.

To replot the data displayed in the plot window as binary encoded plots (0s and 1s):

• Select Plot_Function

Binary Encoding. Binary encoding replots the data as a spectrum of 0s and 1s. It calculates the mean of the data and encodes each value as a 0 if it is less than or equal to the mean and as a 1 if it is greater than the mean (see

“Applying Binary Encoding Classification” on page 606 for

details).

Using Interactive Plot Functions

ENVI User’s Guide

Chapter 4: Interactive Display Functions

401

To replot the original data values:

• Select Plot_Function

Normal.

You can add your own IDL plot function to this menu by entering the name of the function into the useradd.txt

file in the ENVI menu

subdirectory (see “Plot

Function” in the ENVI Programmer’s Guide manual) and adding a .

pro

or .

sav

file containing the function code to the ENVI save_add

subdirectory.

Saving Plot Data

Use the File menu in plot windows to save plot data. You can save plot images or output data to ASCII files, spectral libraries, IDL variables, PostScript files, and image files.

Saving Plot Data to ASCII Files

1. Select File

Save Plot AsASCII.

2. When the Output Plots to ASCII File dialog appears, select the data to save by clicking on the plot names in the Select Plots to Output list.

3. Click the arrow increment buttons to set the numeric precision for the X and Y output ASCII variables.

4. Click the arrow toggle button to select whether to save floating point data in

Scientific or Normal format.

5. Enter the output name in the text box labeled Enter Output Filename or click the Choose button to select a filename.

6. Click OK to save the selected spectra to the ASCII file.

Saving Plot Data to Spectral Libraries

Use this procedure to build a standard ENVI spectral library file (spectral library image) from profiles and spectral plots.

1. Select File

Save Plot AsSpectral Library.

2. When the Output Plots to Spectral Library dialog appears, choose the desired spectra by clicking on the spectrum name.

3. Select File or Memory output. If you choose File, enter an output filename.

4. Click OK to save the selected spectra to the Spectral Library.

ENVI User’s Guide

Using Interactive Plot Functions

402

Chapter 4: Interactive Display Functions

Exporting Plot Data to the IDL Command Line

Note

If the ENVI command line is not visible in the IDL window, select

Window

Command Input in the IDL window.

1. From the plot window select File

Save Plot AsIDL Variable. The

Export Plots to IDL Variable dialog appears.

2. Select the Plots to Export by clicking on the plot names.

3. Select one of the following options:

• In the New Variable Name dialog, enter the name of an undefined IDL variable.

• If previous variables have been defined, select the name of a variable to receive the report from the displayed list.

4. Press the Enter key on your keyboard.

The exported data will be available to use at the ENVI command line. If data from more than one plot is exported to a single variable, the data will be exported into a two-dimensional array that contains the x and y values for each plot. The first row, array [

∗,0], contains the x values for the first plot, the second row, array [∗,1], contains the y values for the first plot, the third row, array [

∗,2], contains the x values for the second plot, etc.

Saving Plots to Files and Printers

To save a plot and any associated annotation as a PostScript or other image format file:

• Select File

Save Plot AsPostScript or Image File.

To print the plot:

• Select File

Print.

For detailed instructions, see

“Display Output Options” on page 446.

Using Interactive Plot Functions

ENVI User’s Guide

Chapter 4: Interactive Display Functions

Extracting Polarization Signatures

403

To extract and display polarization signatures from the current pixel for quadpolarized radar data (AIRSAR and SIR-C):

1. From the Display menu bar, select Tools

Polarization

Signatures

AIRSAR or SIR-C.

Note

The radar data does not have to be displayed. Any co-registered image data set can be used for pixel location.

2. When the Input Stokes Matrix Files dialog or the Input Scattering Matrix Files dialog appears, click Open File to select and open the appropriate radar data file.

3. Click OK.

4. When the Polarization Signature Viewer appears, select Options

Extract

Current Pixel to plot the polarization signature for the current pixel.

For details about the Polarization Signature Viewer, see

“Extracting Polarization

Signatures from Single Pixels” on page 1037 and

“Using the Polarization Signature

Viewer” on page 1040.

ENVI User’s Guide

Figure 4-47: The Current Pixel Polarization Signature

Extracting Polarization Signatures

404

Color Mapping

Chapter 4: Interactive Display Functions

Use Color Mapping to apply color tables to images, create interactive density sliced images, control the RGB image planes and to change classification color mapping.

Note

A color image displayed using one of the methods outlined in this section can be saved to an RGB color image. For instructions, see

“Saving to Image Files” on page 450.

Applying ENVI Color Tables and Density Slices

Use ENVI Color Tables to apply linear contrast stretching and standard color tables

(density slices) to grayscale images.

Note

To make your own color tables, see

“Editing System Color Tables” on page 177.

1. From the Display menu bar, select Tools

Color MappingENVI Color

Tables.

The ENVI Color Tables dialog appears, where you may adjust the screen color tables using the default color tables.

Color Mapping

Figure 4-48: ENVI Color Tables Dialog

ENVI User’s Guide

Chapter 4: Interactive Display Functions

405

The dialog contains a grayscale wedge (or color wedge if a color table is applied) and two sliders to control the contrast stretch. It also has two pulldown menus, File and Options.

2. Select any of the following options:

• To have any color table changes applied to your images automatically, select Options

Auto Apply: On.

• To have changes applied manually, select Options

Auto Apply: Off.

After making changes, select Options

Apply

.

Note

The Auto Apply option is automatically set in 8-bit mode.

3. Move the sliders labeled Stretch Bottom and Stretch Top to control the minimum and maximum values to be displayed. Moving the Stretch Bottom slider to the right causes bright areas of the image to become darker, while moving the Stretch Top slider to the left causes dark areas of the image to become brighter. The stretch can be inverted by moving the Stretch Bottom slider all the way to the right and the Stretch Top slider all the way to the left.

Note

If Auto Apply is on, the new contrast stretch is applied to the image immediately.

4. Apply a selected color table automatically to the current image by clicking on the desired color table name. ENVI provides a number of pre-saved color tables. The B-W linear table provides a grayscale image. The RAINBOW color table provides a cool-to-hot density slice. Other color table options allow you to apply their preferred color scheme.

• To reset the original color tables and stretch, select Options

Reset

Color Table.

• To return to the main screen and retain the selected color table, select

File

Cancel.

Saving Color Tables to ASCII Files

1. In the ENVI Color Tables dialog, select File

Save Color Table to ASCII.

2. Enter a filename and click OK.

ENVI User’s Guide

Color Mapping

406

Chapter 4: Interactive Display Functions

Using Interactive Density Slicing

Use Density Slice to select data ranges and colors for highlighting areas in your grayscale image. The data ranges used in the density slice coloring can be from the displayed image or from another image of the same size. For detailed instructions, see

“Interactive Density Slicing” on page 279.

Controlling RGB Image Planes

Use Control RGB Image Planes to control the individual color planes (or channels) of an RGB or grayscale image. A standard RGB image uses the red, green, and blue guns of the display device to form a color additive representation of color. A grayscale image is a special case, where all three guns are assigned the same value for each pixel.

1. Select Tools

Color Mapping Control RGB Image Planes. The #N

RGB Channels dialog appears, where N is the display number used to start the function. When first started, all three image color channels are turned on.

2. Select one or more of the left arrow toggle buttons to turn off/on individual color planes. The button name will change to reflect the color plane setting

(On or Off).

• To invert the current stretch (a low-to-high stretch becomes a high-to-low stretch and vice versa), select one or more of the right arrow toggle buttons. The button name changes to reflect the color plane setting

(Normal or Inverse).

• To apply RGB Channel functions to all of the color planes simultaneously, select Options

Turn All Channels Off/On or Invert All Channels.

3. Select File

Cancel to exit the function.

Note that the color planes remain as set prior to exit.

Tip

For 24-bit color displays, color changes are not automatically applied. Select

Options

Apply when a 24-bit color display is in use to display the color changes.

Color Mapping

ENVI User’s Guide

Chapter 4: Interactive Display Functions

407

Figure 4-49: The RGB Channels Dialog

Mapping Class Colors

Use Class Color Mapping to change classification image colors and class names for individual classes. The changes can be saved to the header file.

Tip

For class color changes to appear correctly on output, you must save the class color changes.

1. From the Display menu bar, select Tools

Color Mapping Class Color

Mapping.

Note

If your classification is overlaid on a base image, you can access the Class

Color Mapping dialog from the Interactive Class Tool dialog by selecting

Options

Edit class colors/names (see

“Overlaying Classes” on page 265).

ENVI User’s Guide

Color Mapping

408

Chapter 4: Interactive Display Functions

The Class Color Mapping dialog appears.

Color Mapping

Figure 4-50: The Class Color Mapping Dialog

2. In the Selected Classes list, click on the name of the class to be changed.

3. In the Class Name text box, change the name.

4. From the System button menu, select a color system: RGB, HSV, HLS (see

“Color Transforms” on page 695 for more information about color spaces).

5. Select one of the following options to set the values of the class colors:

• Select a color from the V menu.

• Move the three sliders (0-255 for the three colors in RGB).

• Click the arrow increment buttons to change the values or enter new values into the text boxes and press Enter.

ENVI User’s Guide

Chapter 4: Interactive Display Functions

409

6. Select Options

Save Changes to save the changed classification names and colors to the classified image header file.

Note

To reset the original class colors and names, select Options

Reset Color

Mapping.

Note

Color changes on 24-bit color displays, are not automatically applied.

Instead, select Options

Apply.

ENVI User’s Guide

Color Mapping

410

Using the Pixel Locator

Chapter 4: Interactive Display Functions

Use Pixel Locator to manually enter a sample and a line location for positioning at the center of the Zoom window.

1. From the Display menu bar, select Tools

Pixel Locator. The Pixel Locator dialog appears, pertaining to a specific display. You may have a Pixel Locator for each ENVI display group. Crosshairs are drawn in the zoom window outlining the center pixel.

Figure 4-51: The Pixel Locator Dialog: Pixel-Based Images, and Georeferenced Images

2. Enter a Sample (horizontal) and Line (vertical) location into the corresponding text boxes.

3. Select whether to use an image offset by selecting Options

Use Image

Offset: Yes or No.

4. Click Apply and the zoom box jumps to the specified pixel location.

Note

To move the center of the Zoom window one pixel in the direction of the arrow, click the arrow buttons at the bottom of the dialog.

Using the Pixel Locator

ENVI User’s Guide

Chapter 4: Interactive Display Functions

411

Using the Locator with Georeferenced Data

When georeferenced data is displayed in the Image window, the Pixel Locator can be used in either pixel or map coordinates.

1. In the Pixel Locator dialog, select Options

Pixel Coordinates or Map

Coordinates.

2. In the Pixel Locator dialog, click the Proj arrow toggle button to toggle between map coordinates and geographic coordinates (latitude/longitude).

3. Enter the desired easting (E) and northing (N) (or latitude and longitude). The

Zoom window is centered on the nearest pixel.

Tip

When ENVI’s image-to-map registration function is active, use the Export button in the Pixel Locator dialog to deliver map coordinates to the function (see

“Entering

Map GCPs from Vector Windows” on page 869).

The Export button produces no effect if a registration session is not active.

ENVI User’s Guide

Using the Pixel Locator

412

Collecting Points

Chapter 4: Interactive Display Functions

Use Point Collection to collect points (both pixel locations and map locations) from display windows. The points are displayed in a table in the ENVI Point Collection window. You can save points from various display windows in a single table and export them to the Ground Control Points (GCP) List, save them to ASCII or ENVI

Vector Files (EVFs), and restore them from ASCII files.

1. Select one of the following options to begin:

• From the Display menu bar, select Tools

Point Collection.

• From the ENVI main menu, select Window

Point Collection.

The ENVI Point Collection window appears.

Click on a column heading to resort the table.

Figure 4-52: The Point Collection Window

2. Click the middle mouse button in a Main Image window or Zoom window to collect the point under the cursor.

The pixel locations appear in the table. If the data is georeferenced, map and geographic locations are also listed.

Changing the Table Sort Order

• To sort the points in the table by a particular value, click on the column heading of the value. To sort the points inversely by the same value, click on the column name again. The table is automatically updated.

• To reset the table to the original order, select Options

Reset Listing Order.

Collecting Points

ENVI User’s Guide

Chapter 4: Interactive Display Functions

413

Changing Numeric Precision

To change the numeric precision of the data points:

1. Select Options

Set Report Precision. The Set Report Precision dialog appears.

2. Enter the desired number of significant figures shown after the decimal point in the text boxes.

Note

To change the report of latitude and longitude values between degrees, minutes, seconds (DMS) and decimal degrees (DD), click on the Lat/Lon Report arrow toggle button.

ENVI Point Collection Options

• To go to the location of a point, click on the point number (gray buttons, far left column) and click the Goto button. The Zoom window for the display containing the data moves so that it is centered over the selected pixel.

• To export map locations to the Ground Control Points Selection dialog, click on the point number (far left column) and click Export.

• To delete a point, click on the point number (far left column) and click Delete.

• To delete all the points, click Delete All.

Importing Points from ASCII Files

To import points from an ASCII file into the point collection table:

1. Select File

Import Points from ASCII and select the input filename.

2. In the Input ASCII FIle dialog, select which columns of data contain the

Image X and Y pixel locations, the Map X and Y values and the Lat/Long values.

3. Select the projection type if you have map values.

4. From the Associated Image button menu, select the display number associated with the imported points.

Note

If no display is associated with the points, select None.

ENVI User’s Guide

Collecting Points

414

Chapter 4: Interactive Display Functions

5. Click OK.

The points appear in the point collection dialog.

Saving Points to ASCII Files

To save points to an ASCII file:

1. Select File

Save Points As ASCII.

2. Enter an output filename.

Note

If points from more than one projection are contained in the point collection table, multiple ASCII output files will be created with a _1, _2, etc. appended to the filename.

Saving Points to Vector Files

To save points to an ENVI vector file:

1. Select File

Save Points As EVF layer.

2. Enter a layer name and an output file name.

3. Click OK.

The layer name appears in the Available Vectors List.

Tip

You can load these points on the image display or in a vector window and add attributes (see

“Vector Attributes” on page 223).

Hiding the Point Collection Window

• To hide the window, select Options

Hide Window. When the ENVI Point

Collection window is hidden, you can still collect points by clicking in an image window with the middle mouse button.

• To display the window again, click on the window name in the Window Finder, or select Window

Point Collection.

Collecting Points

ENVI User’s Guide

Chapter 4: Interactive Display Functions

Building Masks

415

Use Build Masks to create image masks from specific data values (including the data ignore value), ranges of values, finite or infinite values, ROIs (Regions of Interest),

ENVI vector files (EVFs), and annotation files. For detailed instructions, see

“Building Masks” in Chapter 5.

Measurement Tool

Use Measurement Tool to get a report on the distance between points in a polygon or polyline, and to get perimeter and area measurements for polygons, rectangles, and

ellipses. For detailed instructions, see “Using the Measurement Tool” in Chapter 5.

Note

To measure ROIs while using the ROI function, see

“Reporting ROI

Measurements” on page 305.

ENVI User’s Guide

Building Masks

416

Chapter 4: Interactive Display Functions

Using the Line of Sight Calculator

Use the Line of Sight Calculator to calculate which pixels can be seen from a specific pixel within any file that has an associated DEM. The pixels that can be seen are output as an ROI.

1. Select Tools

Line of Sight Calculator. The Line of Sight calculator dialog appears. The current pixel location is listed in the Sample and Line text boxes.

Figure 4-53: The Line of Sight Calculator

2. In Zoom window, click on a pixel or enter the Sample and Line coordinates of the pixel for which you want the line of sight calculated.

• To select a different pixel, use the solid black arrow buttons to move the

Zoom window crosshairs in single pixel increments in the corresponding direction.

• To designate whether or not to apply X and Y offsets for data that has offsets, select Options

Use Image Offset:Yes or No.

To select pixels for georeferenced images, see “Selecting Pixels for

Georeferenced Images” on page 417).

3. Click the Apply button. The Select Line of Sight Input DEM Band dialog appears.

Using the Line of Sight Calculator

ENVI User’s Guide

Chapter 4: Interactive Display Functions

4. Select the file that contains the DEM that is associated with the displayed image and click OK. The Line of Sight Parameters dialog appears.

417

Figure 4-54: The Line of Sight Parameters dialog.

5. Enter the maximum distance (in meters) for the line of sight calculation.

Note

To designate an elevation above the pixel, enter the value in the same units as the DEM.

6. Click OK.

An ROI is created that shows which pixels can be seen from the designated pixel. The

ROI is labeled LOS in the ROI Tool dialog and is overlaid on your image.

Selecting Pixels for Georeferenced Images

1. In the Line of Sight Calculator, select Options

Map Coordinates.

2. Enter the map coordinates into the E and N text boxes, respectively.

• To enter the coordinates in latitude and longitude, click the arrow toggle button next to the map projection name and enter the values into the Lat and Long text boxes. Use negative (–) longitude for the western hemisphere and negative (–) latitude for the southern hemisphere.

• To change the latitude and longitude values between degrees, minutes, seconds, and decimal degrees, click on the DMS / DDEG button.

• To return to map projection coordinates, click the arrow toggle button. The corresponding map projection coordinates are calculated automatically.

ENVI User’s Guide

Using the Line of Sight Calculator

418

Chapter 4: Interactive Display Functions

Using the Spatial Pixel Editor

Use Spatial Pixel Editor to display pixel values in a table and to interactively change the values of problem pixels. Individual pixel values or entire lines or columns can be replaced if you enter a different value or data mean, or if the averages of surrounding pixels, lines, or columns are used. The changes can be saved to the disk file.

Note

This function only works on ENVI format files.

From the Display menu bar, select Tools

Spatial Pixel Editor.

The Spatial Pixel Editor dialog appears with the pixel values for the Zoom window shown in a table. The sample and line numbers are shown around the top and side of the table. The location of the pixel highlighted in the table is shown by a green box in the zoom window.

Using the Spatial Pixel Editor

Figure 4-55: The Spatial Pixel Editor Dialog

ENVI User’s Guide

Chapter 4: Interactive Display Functions

419

Selecting Pixels

To select pixels and display their values in the Spatial Pixel Editor table:

In the Main Image window, move the Zoom window by clicking and dragging with the left mouse button or click the middle mouse button on a pixel to place it in the center of the Zoom window.

Changing Pixel Values

Select from the following options to change pixel values:

• To enter a new value for a single pixel, click on the pixel value in the table, use the backspace key to erase the current value, enter the desired value, and press return.

• To replace the value of a single pixel with the average of the four or eight surrounding pixels, click on the pixel value in the table and select

Options

Replace cell with 4 pixel average or Replace cell with 8 pixel

average.

• To enter a new value for a group of pixels:

A. Select the pixel values in the table by clicking and dragging or by clicking on a column or line number.

B. Select Options

Replace selected cells with value. Enter the desired value and click OK.

• To replace the value of a group of pixels with the group mean, select the pixel values in the table by clicking and dragging or by clicking on a column or line number and select Options

Replace selected cells with mean.

• To replace a column or line (across the whole image) with the average of surrounding columns or lines, click on the column or line number around the table and select Options

Replace selected column/line with average.

• To designate the number of columns or lines surrounding the selected pixel to be used in calculating the average:

A. Select Options

Set # of lines for averaging.

B. Enter the desired number of columns or lines to use on each side of the selected one to calculate the average.

ENVI User’s Guide

Using the Spatial Pixel Editor

420

Chapter 4: Interactive Display Functions

Undoing Changes

• To undo all changes in pixel values, select Options

Undo all changes.

Saving Pixels to Files

• Save the pixel value changes to a file by selecting File

Save changes to file.

Closing the Spatial Pixel Editor

• To exit the Spatial Pixel Editor, select File

Cancel.

Using the Spatial Pixel Editor

ENVI User’s Guide

Chapter 4: Interactive Display Functions

Using the Spectral Pixel Editor

421

Use Spectral Pixel Editor to replace the current pixel across all spectral bands in multispectral and hyperspectral data. You can replace pixels with an average of surrounding pixels or with another spectrum entered through a plot window.

1. From the Display menu bar, select Tools

Spectral Pixel Editor. An empty plot window appears.

2. In the Spectral Pixel Editor plot window, select from the following options.

• To plot the current spectrum, select Edit

Extract Current Spectrum.

• To plot an average spectrum calculated from the 8 (4 or 2) pixels surrounding the current pixel, select Edit

Extract 8 (4 or 2) pixel

average.

• To input a spectrum from an ASCII file or spectral library, select

File

Input.

• To import a spectrum from another window, click on the plot label name and drag it into the Pixel Editor Spectrum plot window.

• To choose which spectrum to substitute for the current pixel’s spectrum, select Edit

Substitute Spectrum.

Warning

This last step physically replaces the current spectrum values in the data file.

ENVI User’s Guide

Using the Spectral Pixel Editor

422

Creating Animations

Chapter 4: Interactive Display Functions

Use Animation to create a movie out of images from one or more open files.

Selecting Bands for Animation

1. From the Display menu bar, select Tools

Animation.

2. When the Animation Input Parameters dialog appears, choose from the following options.

Note

All of the bands from the currently displayed image are selected for animation by default.

• To select additional bands from files of the same size, click on the bands with the left mouse button while pressing the Ctrl key on your keyboard.

• To clear individual bands from the list if they are already selected, click on the desired band with the left mouse button while pressing the Ctrl key on your keyboard.

Creating Animations

ENVI User’s Guide

Chapter 4: Interactive Display Functions

• To use standard ENVI subsetting procedures to reduce the size of the image to be animated, click Spatial Subset.

423

Figure 4-56: The Animation Input Parameters Dialog

3. Set the desired size of the animation display window by entering values in the boxes next to the Window Size text label.

Note

Note that the selected images are automatically resized to the selected window size. Reducing either the spatial subset to be animated and/or the size of the animation window enhances the speed of the animation.

4. Select a resampling method by clicking the Aggregate or Nearest Neighbor button. Nearest neighbor resampling uses the nearest pixel value in the animation window and aggregate averages all the pixel values that contribute to the output animation pixel. For example, if your animation window size is half the size of the image, the nearest neighbor method will use every other pixel and every other line to create the image in the animation window and the aggregate method will average four pixels to create the output image.

5. Click OK to start the animation.

When the animation is activated, the individual selected bands are automatically subset, resampled, and loaded into the Animation widow. A status bar appears as each image is processed.

ENVI User’s Guide

Creating Animations

424

Chapter 4: Interactive Display Functions

After all of the selected images have been loaded, the animation starts automatically.

Each selected band is displayed sequentially.

Controlling Animation Characteristics

After the animation is loaded, you can specify the animation characteristics.

Figure 4-57: The Animation Window Menu Bar and Controls

The following table describes the available options in the Animation window:

Option Description

To set the animation speed, enter a number from 0 to 100 into the Speed text box, or use the arrow buttons to set the speed.

To turn the real-time frame number slider on and off, select

Options

Update Slider:On/Off from the menu at the top of the Animation window.

Table 4-10: Animation Window Controls

Creating Animations

ENVI User’s Guide

Chapter 4: Interactive Display Functions

Option Description

Click to display the animation from the highest frame to lowest.

Click to display the animation from lowest frame to the highest.

Click to display the animation from the lowest frame to the highest frame and back again.

Click to pause the animation at the current frame.

425

Table 4-10: Animation Window Controls

Saving Animations

You can save an animation as an MPEG (Moving Picture Experts Group) file.

Note

Saving an animation as an MPEG file requires a special license. For more information, contact your Research Systems sales representative or technical support.

1. Select File

Save Animation as MPEG. The Output Sequence to MPEG

Parameters dialog appears.

ENVI User’s Guide

Figure 4-58: The Output Sequence to MPEG Parameters

Creating Animations

426

Chapter 4: Interactive Display Functions

2. From the MPEG Frame Rate button menu, select a frame rate in frames per second.

3. In the MPEG Quality text box, enter a compression quality value between 0 and 100, or use the arrow buttons to set the value.

The compression is a lossy compression where 0 is lowest quality and 100 is highest quality (no compression). Entering a compression quality factor less than 100 decreases the amount of disk space used to store the MPEG output.

Note

A duplication factor helps to make the MPEG output appear smoother. To duplicate frames in the MPEG output, enter or select a Duplicate frames number.

4. Enter or choose an output filename and click OK.

Cancelling Animations

• To cancel the animation at any time, select File

Cancel from the Animation window menu.

Creating Animations

ENVI User’s Guide

Chapter 4: Interactive Display Functions

Using Two-Dimensional Scatter Plots

427

Use 2D Scatter Plots to interactively classify two bands of image data. If desired, multiple scatter plots can be active simultaneously. Two-dimensional scatter plots use only the data in the Main Image window so quick interactive response is provided.

Regions of Interest can be selected in the scatter plots and saved for use in other full band processing techniques. Dancing Pixels

 show how the distribution of pixels under a box changes as it is moved interactively in both the scatter plot and image.

The density distribution of the scatter plot can also be shown.

To compare the DNs in two selected bands as both a scatter plot and in terms of their spatial distribution in the image, proceed with the steps in the following sections.

Selecting Bands for Scatter Plots

1. From the Display menu bar, select Tools

2D Scatter Plots.

2. When the Scatter Plot Band Choice dialog appears, choose the X and Y axes for the scatter plot by clicking on the desired bands in the columns labeled

Choose Band X and Choose Band Y.

3. Click OK to extract the two dimensional scatter plot from the two selected bands.

ENVI User’s Guide

Figure 4-59: The Scatter Plot Band Choice Dialog

Using Two-Dimensional Scatter Plots

428

Chapter 4: Interactive Display Functions

Depending upon the size of the image, there may be a brief delay while the DN values are extracted and tabulated. As soon as the scatter plot appears, the interactive scatter plot function is available for use.

Resizing Scatter Plot Windows

To resize a scatter plot window, grab the corner of the window and drag to the desired size.

Warning

Resizing the window requires more memory and may not be as efficient.

To reset the window to the default size, select Options

Reset Size.

Viewing Pixel Distribution of Scatter Plots

Use Dancing Pixels

 to interactively view, in the Image window, the distribution of points under a box drawn in the scatter plot. As the cursor moves, the spatial distribution of the corresponding pixels on the image changes accordingly.

1. Select Options

Scatter:Dance.

2. Place the cursor anywhere inside the scatter plot and click the middle mouse button to plot a colored box on the scatter plot. Simultaneously, all pixels on

Using Two-Dimensional Scatter Plots

ENVI User’s Guide

Chapter 4: Interactive Display Functions

429 the image that fall within the DN range of those selected in the scatter plot box are plotted in color in the Main Image window.

Figure 4-60: Selecting Pixels to Highlight in the Image Window

3. Press and hold the middle mouse button while moving the cursor in the scatter plot to cause real-time Dancing Pixels to appear in the Main Image window.

Viewing Pixel Distribution of Images

Use Scatter Plot Dancing Pixels

 to interactively view, in the scatter plot, the distribution of the points that are in highlighted in the image window.

1. Select Options

Image:Dance.

2. Place the cursor anywhere inside the Main Image window and click the left mouse button while the scatter plot is displayed to mark pixels in color on the scatter plot.

This shows the DN distribution of pixels falling within a spatial box the same

size as that used in the scatter plot (see “Setting Patch Sizes” on page 435).

The box is not plotted on the Main Image display because of speed considerations.

ENVI User’s Guide

Using Two-Dimensional Scatter Plots

430

Chapter 4: Interactive Display Functions

3. Press and hold the left mouse button while moving the cursor in the Main

Image window to highlight the pixels in the scatter plot in real time as Dancing

Pixels.

Figure 4-61: Dancing Pixels Displayed in the Plot Window

Zooming in Scatter Plots

To zoom in on an area within a scatter plot:

1. Select Options

Scatter:Zoom.

2. In the Scatter Plot window, click with the middle mouse button and drag the box outline that appears.

Note

To return to normal viewing, click in the Scatter Plot window with the middle mouse button.

Using Two-Dimensional Scatter Plots

ENVI User’s Guide

Chapter 4: Interactive Display Functions

431

Displaying Scatter Plot Density Distribution

Many image pixels can have the same DN values within bands and will lie in the same place in the scatter plot. The scatter plot density distribution is color coded using a rainbow color table from purple to red with purple indicating low density.

• To show the density distribution of the scatter plot, select Options

Density

On or Off.

Note

If a Z profile is associated with the scatter plot, the density distribution is shown by clicking the right mouse button outside the plot axes.

Changing the Density Distribution Color Table

To change the color table used to define the density distribution colors:

1. Select Options

Select Density Lookup.

2. In the Select Density Lookup dialog, click on the desired color table name. The selected color table is applied automatically.

3. Designate the number value of the color that will be used to represent the lowest values in the scatter plot (color tables have 256 values) by clicking the

Scaling Floor arrow increment buttons or by entering the value into the text box.

Note

For color tables that have black on the lower end, setting a higher color value to represent the lowest density points in the scatter plot applies more visible colors (instead of black) to those points so that all points in the scatter plot are visible.

ENVI User’s Guide

Using Two-Dimensional Scatter Plots

432

Chapter 4: Interactive Display Functions

Drawing ROIs on Scatter Plots

ROIs can be drawn in the scatter plot to provide an interactive classification method.

Drawing a Single ROI

1. In the Scatter Plot window, click the left mouse button at the vertices of a polygon enclosing the desired region.

2. Use the right mouse button to close the polygon and complete the selection.

When the region is closed, all pixels in the image that fall within the DN range of those selected in the scatter plot are highlighted in color in the Main Image window.

Drawing Multiple ROIs or Classes

1. In the Scatter Plot window, select Class

Items N:M for a color list from which to select another color.

2. Draw another ROI as described in the previous procedure.

The corresponding pixels in the image are highlighted in the new color.

Editing Classes

To remove pixels from an existing class:

1. In the Scatter Plot window, select Class

White.

2. Draw a polygon around the pixels to remove them. The deleted pixels return to white.

Changing Class Colors

Use the Class menu to change the color of the scatter plot highlighting. Multiple

ROIs or classes can be defined by selecting a new color for each class. The currently selected class corresponds with the color selected under the Class pull-down menu.

Deleting Classes

To completely delete the selected class polygon, click the middle mouse button outside the scatter plot axes.

Using Two-Dimensional Scatter Plots

ENVI User’s Guide

Chapter 4: Interactive Display Functions

433

Options in Scatter Plot Windows

Use the Options menu on the scatter plot menu bar to choose functions that control the operation of the two-dimensional scatter plots. Options include controlling the image mode, clearing and exporting classes, calculating mean spectra, linking the scatter plot with a Z profile window, changing the patch size used for extracting dancing pixels, and changing the band selections.

Two-Dimensional Scatter Plot Shortcut Menu

Many options in the scatter plots can also be accessed by right-clicking in the scatter plot and selecting from the shortcut menu that appears.

Figure 4-62: The Scatter Plot Shortcut Menu

Viewing Dancing Pixels

As described in

“Viewing Pixel Distribution of Images” on page 429, you may link

mouse movement in the image window to concurrent plotting of corresponding pixels as Dancing Pixels in the scatter plot for the selected patch size.

• Select Options

Image Dance.

ENVI User’s Guide

Using Two-Dimensional Scatter Plots

434

Chapter 4: Interactive Display Functions

Drawing ROIs in Images

Use the Image ROI option to draw ROIs in the image window using the standard polygon ROI procedures described in

“Drawing ROIs” on page 291. The ROI pixels

are highlighted in the scatter plot and all pixels with similar spectral characteristics in the two selected bands are plotted in color as an overlay on the displayed image.

• Select Options

Image ROI.

Turning Off Scatter Plot Mouse Functions

• To turn off the scatter plot mouse button functions in the image window and return them to their standard functionality, select Options

Off.

Clearing Classes

• To remove the ROIs and associated image window highlighted pixels from the scatter plot and image window for the selected class color, select

Options

Clear Class.

• To remove all the ROIs and associated image window highlighted pixels from the scatter plot and image window for all the classes, select Options

Clear

All.

Exporting Classes

Use Exporting Classes to export the highlighted image window pixels for the selected class color or for all of the classes to a standard ENVI ROI. You can use the exported ROI in other ENVI functions.

• To export a selected class, select Options

Export Class. If the ROI

Controls window is on the screen, the region is listed as a Scatter Plot Import.

The class color and number of pixels in the region is also listed.

Note

The ROIs are retained in memory even when the ROI Controls window is not on screen. The Scatter Plot Import region will be listed in the ROI window the next time it is started.

• To export the highlighted image window pixels for all of the classes, select

Options

Export All.

Using Two-Dimensional Scatter Plots

ENVI User’s Guide

Chapter 4: Interactive Display Functions

435

Calculating Mean Spectra

To calculate the mean spectrum for the selected class or for all the defined classes:

1. Select Options

Mean Class or Options Mean All.

2. When the Input File Associated with 2D Scatter Plot dialog appears, select the corresponding input file.

The mean spectra are calculated and displayed in a plot window. If a Z Profile window associated with the scatter plot is open, the same data is automatically used to calculate the mean spectra.

Attaching Z Profiles

To associate a Z Profile window (spectral plot) with the Scatter Plot:

1. Select Options

Z Profile.

2. When the Input File Associated with 2D Scatter Plot dialog appears, select the corresponding input file.

3. Click the right mouse button inside the scatter plot to display the spectrum for the point nearest the cursor.

See

“Extracting Z Profiles” on page 378 for details on using Z Profiles.

Setting Patch Sizes

The patch size is the size of the box used for the Dancing Pixels options.

1. Select Options

Set Patch Size.

2. When the Scatter Plot Patch Size dialog appears, enter the number of pixels to use for the size of the patch (a square box) or use the increment arrows to set the desired size.

For example, a patch size of 10 refers to a 10 x 10 pixel box in either the Image or the

Scatter Plot.

Setting Axis Ranges

Use Set X/Y Axis Ranges to change the pixel value range of the X or Y axes.

1. In the Scatter Plot window, select Options

Set X/Y Axis Ranges.

The Set Scatter Plot Axis Ranges dialog appears.

2. In the Xrange and Yrange text boxes, enter the desired pixel value range.

ENVI User’s Guide

Using Two-Dimensional Scatter Plots

436

Chapter 4: Interactive Display Functions

Note

To return the range values to the original minimum and maximum values, click the Reset Ranges button.

3. Click OK. The scatter plot will be rescaled to the new axes ranges.

Tip

To reset the axis ranges to the original minimum and maximum values, select

Options

Reset Range in the Scatter Plot window.

Resetting the Plot Window Size

If you have resized the scatter plot window, select Options

Reset Size to reset it to the default size.

Note

The default window size provides the most efficient interaction.

Changing Bands

Use Change Bands to change the bands used in the scatter plot and to plot previously defined classes on the new scatter plot. The corresponding image window pixels will be highlighted.

1. Select Options

Change Bands.

2. When the Scatter Plot Band Choice dialog appears, choose new X and Y axes for the scatter plot by clicking on the desired bands as described in

“Selecting

Bands for Scatter Plots” on page 427.

Using Two-Dimensional Scatter Plots

ENVI User’s Guide

Chapter 4: Interactive Display Functions

437

Managing Scatter Plots

Use the File menu on the Scatter Plot menu bar to activate functions that control the input and output of the scatter plots. Functions include outputting the scatter plot, importing saved ROIs, and canceling the scatter plot function.

Starting New Scatter Plots

To start an additional scatter plot window that uses different bands:

1. Select one of the following options:

• In the Scatter Plot window, select File

New Scatter Plot.

• From the Display menu bar, select Tools

2D Scatter Plot.

2. When the Scatter Plot Band Choice dialog appears, select the X and Y bands.

3. Click OK.

A new Scatter Plot window appears in addition to the initial scatter plot.

Outputting Scatter Plots

You can save scatter plot windows as PostScript files or image files (RGB binary file): BMP, HDF, JPEG, PICT, SRF, TIFF, or XWD files.

• To save a Scatter Plot, select File

Save Plot As Postscript or Image

File.

For detailed instructions, see

“Display Output Options” on page 446.

Importing ROIs to Scatter Plots

To import previously saved Regions of Interest to the scatter plot:

1. Select File

Import ROIs.

2. When the Import ROIs to Scatter Plot dialog appears, select from the list of existing ROIs.

The ROIs selected are plotted in the Image window and the corresponding points are highlighted in the Scatter Plot. Additional pixels that fall within the same Scatter Plot regions are highlighted in the Image window.

ENVI User’s Guide

Using Two-Dimensional Scatter Plots

438

Chapter 4: Interactive Display Functions

Three-Dimensional Surface Views

Use ENVI’s 3D SurfaceView

 to fly-through your three-dimensional data sets. For detailed instructions, see

“Using 3D SurfaceView” on page 993.

Three-Dimensional Surface Views

ENVI User’s Guide

Chapter 4: Interactive Display Functions

Managing Displays

439

Use the Window menu to open, close, resize, and rearrange displays, and to extract information from the open displays.

Figure 4-63: The Window Menu Options for Display Management

Starting a New Display Group

To open an empty display group, select one of the following options:

• From the Display menu bar or from the ENVI main menu, select

Window

Start New Display Window.

• In the Available Bands List, select New Display from the Display #N button menu (see

“Selecting the Active Display” on page 190).

ENVI User’s Guide

Managing Displays

440

Chapter 4: Interactive Display Functions

Closing Display Groups

To close a display group select one of the following options:

• From the Display menu bar, select File

Cancel.

• In Microsoft Windows, click the button in the Main Image window.

The display group and any associated dialogs are closed.

Tip

To save a display group and its associated windows to a file, see

“Saving Display

Groups” on page 234.

Closing All Displays

• To close all open Image displays, select Window

Close All Display

Windows from the Display window or from the ENVI main menu.

Maximizing Open Displays

• To resize all display windows to fit the available screen space, select

Window

Maximize Open Displays from the Display menu bar or from the

ENVI main menu.

For example, if four displays are open, each display will be resized to fill one-fourth of the available screen.

Viewing Cursor Location and Value

Use Cursor Location/Value in any image window to display the sample (horizontal,

X) and line (vertical, Y) coordinates of the cursor along with the data value of the pixel at the cursor location. The position is continuously updated as you move the cursor around the image.

Note

In ENVI, pixel values always refer to the upper left corner of the pixel. Map coordinates also typically refer to the upper left corner of the pixel. However, if you entered image pixel coordinates in the map information in the ENVI header, the map coordinates would refer to the x,y coordinates entered (e.g., x=1.5, y=1.5 would make the map coordinates refer to the center of the pixel).

Managing Displays

ENVI User’s Guide

Chapter 4: Interactive Display Functions

441

The same Cursor Location/Value window is used for all open displays. Both the

Scrn: (stretched image) and the Data: (raw data) values are listed. If an RGB image is displayed, then the values for all three bands are listed. If an image is georeferenced, then the appropriate projection name and the map coordinates and latitude and longitude are also listed. If a Classification image is displayed, the class names will be reported along with the cursor location and value. When display windows are linked, the Cursor Location/Value dialog will display the data values for the current pixel for all the display windows included in the link.

Select one of the following options to open the Cursor Location/Value window:

• In the Main Image window, double-click with the left mouse button.

• From the Display menu bar, select Tools

Cursor Location/Value.

• From the Display menu bar or from the ENVI main menu, select

Window

Cursor Location/Value.

Figure 4-64: Cursor Location/Value Dialogs: Cursor Location (right) for a

Georeferenced Image; UTM Coordinates (left)

ENVI User’s Guide

Managing Displays

442

Chapter 4: Interactive Display Functions

Options in the Cursor Location/Value Window

Use the Options menu in the Cursor Location/Value window to report the cursor location in the Zoom window as an integer number or as a floating point number, to show fractions of a pixel, to change the displayed format of the latitude and longitude information, and to set the precision of the numbers reported. The upper left of a pixel is the position of the whole number coordinates and the X and Y values increase to the right and bottom of the pixel, respectively. The pixel fraction is shown proportional to the zoom factor. For example, at a zoom of 4x, the pixels are divided into fourths.

Viewing Floating Point Pixel Locations

To view floating point pixel image locations in the Zoom window, select Options

Floating Point Locations.

Viewing Integer Pixel Locations

To view integer pixel image locations in the Zoom window, deselect Options

Floating Point Locations.

Viewing X and Y Offset Values

To view pixel locations, including the X and Y offset values read from the header, select Options

Use Image Offset. This is the default selection.

Viewing Lat/Lon Information

• To view latitude and longitude information in decimal degrees, deselect

Options

Lat/Lon DDS (for georeferenced data sets).

• To view latitude and longitude information in degrees, minutes, and seconds, select Options

Lat/Lon DMS (for georeferenced data sets). This is the default selection.

Bringing the Window to the Front

To set the default so that the Cursor Location/Value window pops up in front of all other windows when opened, select Options

Auto Raise Window. This is the default selection.

Managing Displays

ENVI User’s Guide

Chapter 4: Interactive Display Functions

443

Setting Numeric Precision

The numeric precision is the number of digits displayed after the decimal.

1. Select Options

Set Report Precision.

2. In the Set Report Precision dialog, use the arrow increment buttons to set the desired precision for the map, latitude and longitude, and data displays.

• To set the precision used to display the map coordinates, enter the desired numeric precision or use the arrow increment buttons next to the Map

Precision label.

• To set the precision of the display when Lat/Lon:DD is the selected option for georeferenced data sets, click the Lat/Lon Precision arrow button.

• To set the precision used to display the floating point data values, click the arrow button next to the Data Precision label. Any changes do not affect the display of byte and integer data.

• To select Scientific or Normal as the Floating Report format, click the arrow toggle button. A normal number is the number in decimal format

(e.g., 25.88), whereas a scientific number shows a single digit, followed by a decimal, and e

(exponential) power (e.g.,

2.588e+001

).

3. Click OK.

Viewing Display Information

Use Display Information to show information about the Display window in which the cursor is currently located. The information is updated as you move the cursor between the open Display windows. The displayed information includes the display number, number of colors used, bands displayed, the type of stretch currently applied to each band, and the sizes and pixel ranges of the Image, Zoom, and Scroll windows.

• In ENVI Main Image window or from the ENVI main menu, select

Window

Display Information.

ENVI User’s Guide

Managing Displays

444

The Display Information window appears.

Chapter 4: Interactive Display Functions

Figure 4-65: The Display Information Window

Viewing Mouse Button Descriptions

Use Mouse Button Descriptions to display the functionality of the mouse buttons for the window in which the cursor is located. As the cursor is moved from window to window, the mouse button descriptions are updated. The displayed information includes the window type (e.g., display, plot), the function that has the cursor control

(e.g., ROIs, Dynamic Overlay), and the actions for each mouse button (MB1: left mouse button, MB2: middle mouse button; MB3: right mouse button).

Note

If the mouse buttons are not responding as you expect, display the mouse button descriptions to check which function is in control of the cursor.

Select one of the following options to open the Mouse Button Descriptions window:

• From the Display menu bar or from the ENVI main menu, select

Window

Mouse Button Descriptions.

• From the ENVI main menu select Help

Mouse Button Descriptions.

Managing Displays

Figure 4-66: Mouse Button Descriptions.

ENVI User’s Guide

Chapter 4: Interactive Display Functions

445

Positioning Zoom and Scroll Windows

To position the Zoom and Scroll windows with respect to the Main Image window, select Window

Scroll/Zoom Location → desired location.

Locking Window Placement

To lock the Scroll and Zoom windows in place after you position them anywhere on the screen, select Window

Scroll/Zoom Location Auto Placement Off.

The windows will remain in place until you move them again.

Hiding Scroll/Zoom Windows

To hide the Zoom and/or Scroll windows, click the button in the right corner of the window.

Unhiding

To show the hidden Zoom and/or Scroll windows, select Window

Show Zoom

Window or Show Scroll Window.

Note

The Show... menu selections are only available if the corresponding window is hidden.

ENVI User’s Guide

Managing Displays

446

Display Output Options

Chapter 4: Interactive Display Functions

ENVI Image displays, plots, or vector windows can be output to postscript files, image files, or directly to printers. All overlays (annotation, grid lines, vectors, etc.) can be included in (burned into) the output.

• Postscript File

• Image Files: ENVI file (RGB binary image with an ASCII header file), BMP,

HDF, JPEG, JPEG2000, PICT, PNG (Portable Network Graphics), SRF (Sun

Raster File), TIFF (including GeoTIFF and TIFF World files [.

tfw

]), XWD

(X-Windows Dump) Image Files, ERDAS (

.lan

), ER Mapper, PCI (

.pix

), and ArcView (

.bil

) Files

• Directly to a system printer.

Saving to Postscript Files

Use ENVI’s postscript output to scale an image, “burn in” graphic overlays, to output an encapsulated postscript file, and to select from other output options.

• To output a displayed image to a postscript file, select File

Save Image

As

Postscript File from the Display menu bar. The Output Display to

Postscript File dialog appears, where you may modify the output of images, plots, and vectors. The output page is shown schematically as a draw window in the upper right-hand corner of the dialog. See the following subsections for setting the output display parameters in the dialog.

• To output a plot or vector window to a postscript file, select File

Save Plot

As

Postscript in the plot or vector window.

Display Output Options

ENVI User’s Guide

Chapter 4: Interactive Display Functions

447

Figure 4-67: The Display to PostScript Parameters Dialog

Setting Page Size and Image Scaling

Set output page sizes and image placement in either inches or cm, as specified in the envi.cfg

file. Precision scaling and multiple page output is available when outputting to postscript. Any ENVI image can be scaled to a specific map scale—the image size values change automatically based on the image pixel size. If the resulting image is larger than a single page as defined in the Page text box, ENVI automatically determines the number of pages required to output the image and shows the pages in the draw window in the upper right-hand corner of the dialog. Multiple page images cannot be repositioned with respect to the page layout specified by ENVI.

1. In the Output Display to Postscript File dialog, set the page size by entering the desired dimensions in the text boxes labeled Page.

ENVI User’s Guide

Display Output Options

448

Chapter 4: Interactive Display Functions

2. Set the output image size on the page by entering the desired values into the

xsize and ysize labeled text boxes.

Note

To maintain the relative aspect between X and Y when one dimension is changed, select the Aspect check box.

3. Set the position of the image origin on the page (with respect to the lower left corner) using the xoff and yoff parameters. An outline of the image showing its relative size and position on the page appears within the draw window in the upper right of the dialog.

• To position the image on the output page using your mouse, click and hold the left mouse button inside the image outline in the draw window and drag the image to a new position.

• To center the image outline on the page using your mouse, click the right mouse button anywhere on the output page.

4. Click on the arrow toggle button to select Landscape or Portrait as the page orientation.

5. Select from the following options.

• To scale an image to a specified map scale, enter the desired scale in the

Map Scale 1: text box. The xsize and ysize values will change automatically based on the image pixel size (a default size of 30 meters is assumed if no pixel size is present in the header).

• To toggle color on or off, select or de-select the Color check box.

• To select encapsulated postscript output, click the Encapsulate check box.

• To select the number of output bits for the postscript image use the Bits pull-down menu.

Setting Graphics Overlay Options

Graphics options (annotations, grid lines, regions of interest, vectors, etc.) can be permanently incorporated in the saved PostScript file. All currently displayed valid

ENVI graphics objects are automatically selected when the Output to PostScript File dialog is started. A border is automatically placed on the output image if grid lines are selected. The grid text-labels are placed exterior to the image.

Display Output Options

ENVI User’s Guide

Chapter 4: Interactive Display Functions

449

Note

The grid must have been previously displayed and configured on the image by selecting using the Grid Lines overlay option (see

“Grid Lines” on page 284 for

further information).

1. In the Output Display to Postscript File dialog, click the Change Graphic

Overlay Selections button. The Change Graphics Overlay Options dialog appears with a list of the currently displayed graphics objects.

2. Change the graphic overlay selections using the following options:

• To remove a graphics overlay, click on its name in the Currently Selected

Options list.

• To add graphics overlays, select the desired overlay using the Add

Graphics Option pull-down menu (with the exception of annotation, these overlays must be displayed on your image or plot).

• To add an annotation file that is not currently displayed to the graphics overlay, select Additional Annotation File from the Add Graphics

Option pull-down menu and select the desired annotation filename.

3. Click OK to return to the Output to Postscript File dialog.

Note

To clip all graphics at the edge of the page when multiple pages of output are generated, select the Clip Graphics check box.

Subsetting and Resizing Output Images

• To select a spatial subset of the image to be output, click on the Spatial Subset

button (see “Selecting a Spatial Subset” on page 35).

• To resize the image, enter a resize factor (less than 1 for subsampling) in the

Input Image Resize Factor text box.

Applying Masks

In the Output Display to Postscript File dialog, you have the option of applying a predefined mask to your output image. This means that if you want to apply a mask to the image, you do not need to do it before selecting the output options.

1. In the Output Display to Postscript File dialog, click the Select Mask button.

2. Select the input band for the mask.

ENVI User’s Guide

Display Output Options

450

Chapter 4: Interactive Display Functions

3. In the Background R, G, and B boxes, enter desired color values that you want to use where the mask is turned off.

4. Click OK.

Note

To clear the selected mask and output a complete image, click the Clear

Mask button.

Saving Output Files

1. Enter the output filename or use the Choose button to select the output filename.

2. Click OK when all options are correctly set.

If the parameters you have chosen result in multiple page output, the filename is used as a root filename, and numbers designating the position of the multiple pages in the composite image are appended to the filename. For example, an image with 6 pages

(3 columns by 2 rows), using the file root name test

creates the output files test_11

, test_12

, test_21

, test_22

, test_31

, and test_32

, where the first appended number indicates the column, and the second appended number indicates the row.

Saving to Image Files

ENVI has many image output options for the Main Image display and the Zoom window. They include output to an ENVI format image file, and output to BMP, HDF,

JPEG, JPEG2000, PICT, PNG, SRF, TIFF (including GeoTIFF), and XWD files.

ENVI can also output to various image processing format files including ERDAS

(

.lan

), ER Mapper, PCI (

.pix

), and ArcView (

.bil

) files.

Note

Converting Main Image displays into generic image files is limited to data that fit entirely into system memory with the exception of TIFF, HDF, and BMP format images.

• To output a displayed image to an image file, select File

Save Image

As

Image File from the Display menu bar. The Output Display to Image

File dialog appears with options to select the type of output file, set the graphics overlay selections, select a spatial subset, resize the image, and change the border size. See the subsections below for details.

Display Output Options

ENVI User’s Guide

Chapter 4: Interactive Display Functions

451

• To output the contents of the Zoom window to an image file, select File

Save Zoom As

Image from the Display menu, or right click on the image and select Save Image As from the context menu. The Output Zoom to Image

File dialog appears with options to select the type of output file and graphic overlay selection. See the following sections for details.

• To output a plot or vector window to an image file, select File

Save Plot

As

Image File in the plot or vector window. The Output Plot to Image file dialog appears with options to select the type of output file, set the graphics overlay selections, select a spatial subset, resize the image, and change the border size.

Selecting Output File Types and Resolutions

ENVI’s output to image file supports many different output file types (listed above).

Each file type has a selection of available output formats. These output formats

(resolutions) include 8-bit grayscale, 8-bit with an associated color table, and 24-bit

BSQ (band sequential), BIL (band interleaved by line), and BIP (band interleaved by pixel) formats.

• To select the desired output file type, use the Output File Type button menu.

Note

When you output a georeferenced image to a JPEG file, an associated

.jgw

file is also created to contain the TIFF World File information. When you open a JPEG file (using File

Open External File Generic File

Formats

JPEG) that has a

.jgw

file associated with it, ENVI reads the map information from .

jgw

file.

• Select the desired output format and resolution using the Resolution button menu.

Setting Graphics Overlay Options

Graphics options (annotations, grid lines, regions of interest, vectors, etc.) can be permanently incorporated in the output image file. All currently displayed valid

ENVI graphics objects are automatically selected when the Output to Image File dialog is started. A border is automatically placed on the output image if grid lines are selected. The grid text-labels are placed exterior to the image. Note the grid must have been previously displayed and configured on the image using the Grid Lines

option on the Display Menu (see “Grid Lines” on page 284).

ENVI User’s Guide

Display Output Options

452

Chapter 4: Interactive Display Functions

1. Click on the Change Graphic Overlay Selections button. The Change

Graphics Overlay Options dialog appears with a list of the currently displayed graphics objects.

2. Change the graphic overlay selections using the following options:

• To remove a graphics overlay, click on its name in the Currently Selected

Options list.

• To add graphics overlays, select the desired overlay using the Add

Graphics Option pull-down menu (with the exception of annotation, these overlays must be displayed on your image or plot).

• To add an annotation file that is not currently displayed to the graphics overlay, select Additional Annotation File from the Add Graphics

Option pull-down menu and select the desired annotation filename.

3. Click OK to return to the Output to Image File dialog.

Changing Border Sizes and Colors

(This feature is not available from the Output Zoom to Image File dialog.)

To change the border size or color on the output image:

1. Click on the Change Image Border Size button.

2. When the Change Image Border Size dialog appears, enter the desired border sizes in the top, right, bottom, and left text boxes.

3. Select the desired border color from the pull-down menu. The corresponding

RGB values appear in the text boxes.

4. Click OK to return to the Output to Image File dialog.

Subsetting Output Images

In the Output Display to Image File dialog, you have the option of selecting a spatial subset or specifying a resize factor.

• To select a spatial subset of the image to be output, click the Spatial Subset button to perform typical ENVI subsetting (see

“Selecting a Spatial Subset” on page 35).

• To resize the input image, enter a resize factor (less than 1 for subsampling) in the Input Image Resize Factor text box.

Display Output Options

ENVI User’s Guide

Chapter 4: Interactive Display Functions

453

• The Input Image Resize Factor text box.

• In the Output Plot to Image File dialog, you have the option of specifying the xsize and ysize of the image. The default xsize and ysize values are the size of the plot window.

The output size of the image, in pixels, is shown in the Output Image Size text box.

Applying Masks

In the Output Display to Image File dialog, you have the option of applying a predefined mask to your output image. This means that if you want to apply a mask to the image, you do not need to do it before selecting the output options.

1. Click the Select Mask button.

2. Select the input band for the mask.

3. In the Background R, G, and B boxes, enter desired color values that you want to use where the mask is turned off.

4. Click OK.

Note

To clear the selected mask and output a complete image, click the Clear

Mask button.

Saving Output Image Files

1. Select output to File or Memory and enter an output filename if needed.

2. Click OK when all options are correctly set.

ENVI User’s Guide

Display Output Options

454

Chapter 4: Interactive Display Functions

Printing

ENVI allows output of the image display, plot, and vector windows directly to system printers. You should be able to output to any of your system printers or plotters through your native system printer dialog.

1. Select one of the following options:

• To output a displayed image to a system printer, select File

Print from the Display menu bar.

• To output a plot or vector window to a system printer, select File

Print in the plot or vector window.

2. When the Print setup dialog appears, set any options specific to your system and click OK.

3. When the Output Display to Printer dialog appears, you will have several options for setting the output display parameters. See the following subsections for detailed instructions.

4. After setting the parameters, click OK in the Output Display to Printer dialog to print the image or plot.

Selecting Output Print Sizes

You can set the output X or Y print size or set the desired output map scale if a georeferenced image is displayed. When a size is set, the other size parameters will change to preserve the aspect ratio of your image.

1. In the Output Display to Image File dialog, set the output image size on the page by entering the desired values into the xsize and ysize labeled text boxes.

Note

To maintain the relative aspect between X and Y when one dimension is changed, select the Aspect check box.

2. Set the position of the image origin on the page (with respect to the lower left corner) using the xoff and yoff parameters. An outline of the image showing its relative size and position on the page appears within the draw window in the upper right of the dialog.

• To position the image on the output page using your mouse, click and hold the left mouse button inside the image outline in the draw window and drag the image to a new position.

Display Output Options

ENVI User’s Guide

Chapter 4: Interactive Display Functions

455

• To center the image outline on the page using your mouse, click the right mouse button anywhere on the output page.

3. Click on the arrow toggle button to select Landscape or Portrait as the page orientation.

4. Select from the following options:

• To scale an image to a specified map scale, enter the desired scale in the

Map Scale 1: text box. The xsize and ysize values change automatically based on the image pixel size (a default size of 30 meters is assumed if no pixel size is present in the header).

Subsetting and Resizing Output Images

• To select a spatial subset of the image to be output, click on the Spatial Subset button to perform typical ENVI subsetting (see

“Selecting a Spatial Subset” on page 35).

• To resize the image, enter a resize factor (less than 1 for subsampling) in the

Input Image Resize Factor text box.

Setting Graphics Overlay Options

Graphics options (annotations, grid lines, regions of interest, vectors, etc.) can be permanently incorporated in the print. All currently displayed valid ENVI graphics objects are automatically selected when the Output Display to Printer dialog is started. A border is automatically placed on the output image if grid lines are selected. The grid text-labels are placed exterior to the image. Note the grid must have been previously displayed and configured on the image using the Grid Lines

option on the Display Menu (see “Grid Lines” on page 284).

1. In the Output Display to Printer dialog, click on the Change Graphic Overlay

Selections button. The Change Graphics Overlay Options dialog appears with a list of the currently displayed graphics objects.

2. Change the graphic overlay selections using the following options:

• To remove a graphics overlay, click on its name in the Currently Selected

Options list.

• To add graphics overlays, select the desired overlay using the Add

Graphics Option pull-down menu (with the exception of annotation, these overlays must be displayed on your image or plot).

ENVI User’s Guide

Display Output Options

456

Chapter 4: Interactive Display Functions

• To add an annotation file that is not currently displayed to the graphics overlay, select Additional Annotation File from the Add Graphics

Option pull-down menu and select the desired annotation filename.

3. Click OK to return to the Output Display to Printer dialog.

Applying Masks

In the Output Display to Printer dialog, you have the option of applying a predefined mask to your output image. This means that if you want to apply a mask to the image, you do not need to do it before selecting the output options.

1. Click the Select Mask button.

2. Select the input band for the mask.

3. In the Background R, G, and B boxes, enter desired color values that you want to use where the mask is turned off.

4. Click OK.

Note

To clear the selected mask and output a complete image, click the Clear

Mask button.

Display Output Options

ENVI User’s Guide

Chapter 5:

Basic Tools

This chapter covers the following topics:

The Basic Tools Menu . . . . . . . . . . . . . . . . 458

Resizing Data (Spatial/Spectral) . . . . . . . . 459

Subsetting Data via ROIs . . . . . . . . . . . . . . 467

Rotating Images . . . . . . . . . . . . . . . . . . . . . 468

Layer Stacking . . . . . . . . . . . . . . . . . . . . . . 470

Converting Data (BSQ, BIL, BIP) . . . . . . . 472

Stretching Data . . . . . . . . . . . . . . . . . . . . . 474

Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . 476

Change Detection Analysis . . . . . . . . . . . . 487

Using the Measurement Tool . . . . . . . . . . . 497

Band Math . . . . . . . . . . . . . . . . . . . . . . . . 500

Spectral Math . . . . . . . . . . . . . . . . . . . . . . 517

Segmenting Images . . . . . . . . . . . . . . . . . 518

Regions of Interest . . . . . . . . . . . . . . . . . . 520

Mosaicking Images . . . . . . . . . . . . . . . . . 526

Masking . . . . . . . . . . . . . . . . . . . . . . . . . . 527

Calibration Utilities . . . . . . . . . . . . . . . . . 534

General Purpose Utilities . . . . . . . . . . . . . 551

Data-Specific Utilities . . . . . . . . . . . . . . . 558

ENVI User’s Guide

457

458

The Basic Tools Menu

Chapter 5: Basic Tools

Use the Basic Tools menu to access a variety of ENVI functions. The functions are generally useful regardless of the specific type of image data being analyzed.

Functions such as Regions of Interest can be used across multiple displays while functions such as Band Math offer general image processing capabilities. The

Stretch Data function is an example of a function that offers file-to-file contrast stretching.

Figure 5-1: ENVI Basic Tools Menu

The Basic Tools Menu

ENVI User’s Guide

Chapter 5: Basic Tools

Resizing Data (Spatial/Spectral)

459

To spatially resize an image and/or perform image spatial or spectral subsetting:

1. Select Basic Tools

Resize Data (Spatial/Spectral). The Resize Data Input

File dialog appears.

Note

To open a new file, click the Open New File button.

2. Select an input file by clicking on the file name in the column labeled Select

Input File.

3. Select a subset using one of the methods described in the following sections.

Note

The methods described are standard ENVI subsetting techniques (for more information, see

“Selecting a Spatial Subset” on page 35 and

“Selecting a Spectral

Subset” on page 40).

File information is listed in the right column of the window.

ENVI User’s Guide

Figure 5-2: Resize Data Input File Dialog

Resizing Data (Spatial/Spectral)

460

Chapter 5: Basic Tools

Spatially Subsetting

You can select a spatial subset by entering the numbers of samples/lines, by selecting the subset directly from the image, by using another file’s subset, by selecting map coordinates (for georeferenced images only), or by using the bounding box around a

Regions of Interests.

Selecting by Samples/Lines

1. In the Resize Data Input File dialog, click Spatial Subset. The Select Spatial

Subset dialog appears with the file information listed at the top of the window.

Note

To use the same spatial subset previously entered for a file with the same spatial size, click the Previous button.

2. Change the number of samples and/or lines for the output image by entering the starting and ending values into the text boxes labeled Sample and/or lines respectively or by entering the desired number of lines or pixels in the boxes labeled NS or NL respectively. The size of the original data set (in bytes) and the size of the subset are shown below the data entry text boxes.

3. Click OK.

4. After selecting and subsetting an input file, click OK in the Resize Data Input

File dialog.

The Resize Data Parameters dialog appears with information about the input file listed at the top of the dialog. The output file dimensions specified by the subsetting procedure are also displayed.

Subsetting Interactively from the Image

Use interactive subsetting to select a subset directly from the image.

1. In the Resize Data Input File dialog, click Spatial Subset.

2. In the Select Spatial Subset dialog, click the Subset by Image button. The

Subset Function window appears with the entire image displayed.

3. Change the size of the subset by clicking and dragging the corner of the red box to the desired size.

Resizing Data (Spatial/Spectral)

ENVI User’s Guide

Chapter 5: Basic Tools

461

Note

To move the box around the image, click on the box and drag it to the desired location. Or, click with the middle mouse button to center the box on the cursor.

4. Click OK.

5. After selecting and subsetting an input file, click OK in the Resize Data Input

File dialog.

The Resize Data Parameters dialog appears.

Subsetting by Map Coordinates

If your image is geo-referenced, you may select the subset by map coordinates or latitude/longitude coordinates:

1. In the Resize Data Input File dialog, click Spatial Subset.

2. In the Select Spatial Subset dialog, click on the Subset By Map button. The

Spatial Subset By Map Coordinates dialog appears.

3. Enter the upper left coordinate and lower right coordinate in the appropriate text boxes.

4. Use the arrow toggle buttons next to the map projection label to select the subset by map coordinates.

• For the UTM projection, indicate if the selected latitude is north (N) or south (S) of the equator by selecting the appropriate button (the zone is calculated automatically).

• For other map projections, enter latitude and longitude. Negative (–) latitude indicates the Southern Hemisphere and negative (–) longitude indicates the Western Hemisphere. (Entering the UTM zone assigns the appropriate sign to the longitude.)

5. Click OK.

6. In the Select Spatial Subset dialog, click OK.

7. After selecting and subsetting an input file, click OK in the Resize Data Input

File dialog.

The Resize Data Parameters dialog appears.

ENVI User’s Guide

Resizing Data (Spatial/Spectral)

462

Chapter 5: Basic Tools

Subsetting Using Another File’s Subset

There are two options for subsetting a file based on the subset area of a previously subset image: use the first option to subset your image based on a subset of an image that was originally the same size as the one you are subsetting; use the second to subset your image based on an image of the same or smaller size that was previously subset by map or pixel values.

Using the Subset of an Image of the Same Size

To use the same spatial subset previously entered for a file with the same spatial size, click the Previous button.

Using the Subset of an Image of the Same or Smaller Size

1. In the Select Spatial Subset dialog, click the File button.

2. In the file selection dialog, select the previously subsetted file (which must have originally been the same size as or smaller than the file you are currently subsetting).

Note

The input file will be subset based on the subset parameters of the file you select.

Subsetting Using ROIs

To subset a file using the bounding box (i.e., the area encompassing) an ROI or group of ROIs, follow these steps:

1. In the Select Spatial Subset dialog, click the ROI button.

Note

To make previously saved ROIs available for selection in the Subset Image by ROI Extent dialog, click the Restore ROIs button in the Select Spatial

Subset dialog and select the ROI file in the subsequent file selection dialog.

Resizing Data (Spatial/Spectral)

ENVI User’s Guide

Chapter 5: Basic Tools

463

Figure 5-3: Subset Image by ROI Extent Dialog

2. In the Subset Image by ROI Extent dialog, select the ROIs and click OK.

The file will be subset to the area encompassing the selected ROIs.

Spectrally Subsetting

1. In the Resize Data Input File dialog, click the Spectral Subset button. The standard File Spectral Subset dialog appears with the file information listed at the top of the window.

2. Select specific bands to include in the subset by clicking on the band names or by selecting ranges of bands.

Note

To select the same spectral subset used in a previous subsetting of a different file with the same number of spectral bands, click the Previous button.

3. Click OK.

4. After selecting and subsetting an input file, click OK in the Resize Data Input

File dialog.

ENVI User’s Guide

Resizing Data (Spatial/Spectral)

464

Chapter 5: Basic Tools

The Resize Data Parameters dialog appears with information about the input file listed at the top of the dialog. The output file dimensions specified by the subsetting procedure are also displayed.

Figure 5-4: Resize Data Parameters Dialog

Spectrally Subsetting from ASCII

Spectral subsetting from an ASCII file is useful if you have defined several specialuse spectral subsets for a file with a large number of bands. To spectrally subset your data using an ASCII file:

1. In the File Spectral Subset dialog, click Import ASCII.

2. When the Enter ASCII Filename dialog appears, select the ASCII file.

Note

The format of the ASCII file must have the same number of lines in the file as the number of bands in the image.

Resizing Data (Spatial/Spectral)

ENVI User’s Guide

Chapter 5: Basic Tools

465

3. Columns in the ASCII file define possible spectral subsets. Multiple columns can be entered to allow different band selections to be specified. For each column in the ASCII file a 0 indicates the band is not selected and a 1 indicates the band is selected.

For instance, a 5-band AVHRR file could use an ASCII file with the following data:

0 1 1

0 0 1

0 1 1

1 0 0

1 1 0

Selecting column 1 deselects bands 1, 2 and 3, and selects bands 4 and 5.

Selecting column 2 selects bands 1, 3 and 5, and deselects bands 2 and 4.

Selecting column 3 selects bands 1, 2 and 3, and deselects bands 4 and 5.

Regardless of the number of rows in the ASCII file, only the top 5 bands are shown in the Input ASCII File dialog box.

Resizing File Parameters

In addition to subsetting, use the resize function to create new images of any size or aspect ratio:

1. In the Resize Data Parameters dialog, either enter the desired number of samples and lines in the corresponding text boxes, or enter the multiplicative X and Y enlargement or reduction factors in the xfac and yfac text boxes and press the Return key.

Tip

If your image contains map information, you can determine the number of output sample and lines base upon the desired output pixel size by clicking

Set Output Dims by Pixel Size.

• If the xfac and yfac values are greater than or equal to 1, select Nearest

Neighbor, Bilinear, or Cubic Convolution, from the Resampling button menu (see

“Warping and Resampling” on page 870).

• If the xfac and yfac values are less than 1, select from Nearest Neighbor or Pixel Aggregate resampling only.

ENVI User’s Guide

Resizing Data (Spatial/Spectral)

466

Chapter 5: Basic Tools

Note

You can control X and Y scales independently. Enter values less than 1 to reduce the image and values greater than 1 to enlarge the image. The number of output samples and lines will be updated.

Note

Nearest neighbor resampling uses the nearest pixel value as the output pixel value and pixel aggregate averages all of the pixel values that contribute to the output pixel (e.g., if you enter .5 for both xfac and yfac, the output pixel values are calculated by averaging the four input pixel values).

2. Select either File or Memory output.

3. Click OK to start the operation.

The Resize Data status window appears with the output filename listed and the percent completed displayed.

Resizing Data (Spatial/Spectral)

ENVI User’s Guide

Chapter 5: Basic Tools

Subsetting Data via ROIs

467

Use Subset Data via ROIs to subset your data into a rectangle that contains the selected ROIs. The rectangle is the smallest rectangle that will fit the ROI. You can mask the pixels in the rectangle that do not fall within the ROI.

1. Select Basic Tools

Subset Data via ROIs.

2. In the file selection dialog, select the input file and perform any spectral subsetting. The Spatial Subset via ROI Parameters dialog appears.

3. Select the input ROIs by clicking on the ROI names.

4. Use the arrow toggle button to select whether or not to mask pixels that do not fall within the ROI.

Note

If you select Yes, enter a background value.

5. Select output to File or Memory.

6. Click OK.

The resulting subset is listed in the Available Bands List.

ENVI User’s Guide

Subsetting Data via ROIs

468

Rotating Images

Chapter 5: Basic Tools

Use Rotate/Flip Images to perform several standard image rotations. These include

0, 90, 180, and 270 degrees with or without transposition. (Here, transpose means that the dimensions of the array are swapped.) Alternatively, you can specify the exact angle of the desired rotation. Rotating images is useful for orienting images prior to registration.

Tip

To flip an image vertically, where the pivot line is a horizontal running through the middle of the image, choose 270 degrees with transpose. To flip an image horizontally, where the pivot line is a vertical running through the middle of the image, choose 90 degrees with transpose.

1. Select Basic Tools

Rotate/Flip Images.

2. When the Rotation Input File dialog appears, select an input file and any subsetting using the standard ENVI file selection procedures (see

“Selecting

Files in ENVI” on page 32).

3. Click OK. The Rotation Parameters dialog appears. This dialog varies slightly depending on whether a standard IDL rotation or an arbitrary rotation angle is used.

Note

Initially, some letters and numbers are printed horizontally (normal text orientation) in the box in the upper right corner of the dialog. The orientation of the numbers shows schematically the orientation of the output image with the selected rotation and/or transpose applied.

4. Select from the following rotation options:

• To apply a standard rotation (0, 90, 180, or 270 degrees), click the appropriate toggle button.

• To flip the X and Y coordinates of the image, click Yes next to the

Transpose label.

Rotating Images

ENVI User’s Guide

Chapter 5: Basic Tools

469

• To specify the exact rotation angle desired, enter a value in the Angle text box (angles are measured clockwise from horizontal). Then select the resampling algorithm to be used to calculate the output image (nearest neighbor, bilinear interpolation, or cubic convolution) by clicking on the

appropriate toggle button (see “Warping and Resampling” on page 870).

Figure 5-5: Rotation Parameters Dialog with Standard IDL Rotations and

Transposes (left) and with Arbitrary Angle Rotations (right)

5. Select output to File or Memory.

6. Click OK to start rotation processing.

A status window appears with the percent complete displayed.

ENVI User’s Guide

Rotating Images

470

Layer Stacking

Chapter 5: Basic Tools

Use Layer Stacking to build a new multiband file from georeferenced images of various pixel sizes, extents, and projections. The input bands will be resampled and re-projected to a common user-selected output projection and pixel size. The output file will have a geographic extent that either encompasses all of the input file extents or encompasses only the data extent where all of the files overlap.

1. Select one of the following options:

• From the ENVI main menu, select Basic Tools

Layer Stacking.

• From the ENVI main menu, select Map

Layer Stacking.

2. The Layer Stacking Parameters dialog appears.

Layer Stacking

Figure 5-6: Layer Stacking Parameters Dialog

3. Click on the Import File button. The Layer Stacking Input File dialog appears.

4. Select input files and perform any spatial or spectral subsetting using standard

ENVI procedures.

ENVI User’s Guide

Chapter 5: Basic Tools

471

5. Repeat the file selection using the Import File button for each input file to be included in the new output file. Input files are listed in the Selected Files for

Layer Stacking list.

6. Click the Inclusive or Exclusive button to select the output file range.

Note

The Inclusive range will create an output file with a geographic extent that encompasses all the input file extents. The Exclusive range will create an output file that contains only the data extent where all the files overlap.

7. Select an output map projection from the list.

8. From the Resampling button menu, select a resampling method.

9. Enter the desired x and y pixel sizes in the corresponding text boxes.

Note

The pixel sizes should be entered in the units selected under the map projection section.

10. Select File or Memory output.

11. Click OK.

ENVI User’s Guide

Layer Stacking

472

Converting Data (BSQ, BIL, BIP)

Chapter 5: Basic Tools

Use Convert Data (BSQ, BIL, BIP) to convert between common data storage conventions. Often, it is more efficient to use image data stored in a specific manner for specific processing operations or interactive analysis. For example, Band

Sequential (BSQ) format data allow efficient image display, Band Interleaved by

Pixel (BIP) format data provide efficient extraction of individual spectra and spectral averages, and Band Interleaved by Line (BIL) format provide a compromise between the previous two formats.

In BSQ (Band Sequential) format, each entire spatial band is followed by the next entire band for all bands. In BIL (Band Interleaved by Line) format, the first line of the first band is followed by the first line of the second band followed by the first line of the third band, etc. for all bands. Subsequent lines for each band are interleaved in similar fashion. In BIP (Band Interleaved by Pixel), the first pixel for each band is followed by the second pixel, etc. for all bands.

1. Select Basic Tools

Convert Data (BSQ, BIL, BIP).

2. When the Convert File Input File dialog appears, select the input file and perform any subsetting.

Note

After you have entered the information for the full image or the spatial and/or spectral subsets, the Convert File Parameters dialog appears. Input file information is displayed at the top of the window.

3. Select the desired output data type by clicking the corresponding Output

Interleave toggle button.

Note

ENVI automatically determines the format of the input file and offers conversion only to the other two formats.

4. Next to the Convert in Place label, select the Yes or No toggle button. To have the new format overwrite the existing file, select Yes. This option saves significant disk space, but the process is slower than writing to a separate file.

To have the converted file written to a separate output file, select No.

Warning

If the overwrite function fails for any reason (i.e., due to a power outage), your data will be corrupted and the original file will not be recoverable.

Converting Data (BSQ, BIL, BIP)

ENVI User’s Guide

Chapter 5: Basic Tools

5. Enter the output file name.

6. Click the OK button to start conversion.

The File Conversion status window displays the output filename and the percent completed.

473

ENVI User’s Guide

Converting Data (BSQ, BIL, BIP)

474

Stretching Data

Chapter 5: Basic Tools

Use Stretch Data to perform file-to-file contrast stretching. The data stretching function is a flexible method for changing the data range of a given input file. You have full control over both the input and output histograms and the output data type

(byte, integer, floating-point, etc.). For more information, see

“Using Interactive

Stretching” on page 359.

1. Select Basic Tools

Stretch Data. The Data Stretching Input File dialog appears.

2. In the list labeled Select Input File, select a filename. Details of the file characteristics are shown in the text widget labeled File Information.

3. Select spatial or spectral subsetting by clicking on the Spatial Subset or

Spectral Subset button, respectively.

4. Click OK. The Data Stretching dialog appears.

Stretching Data

Figure 5-7: Data Stretching Dialog

ENVI User’s Guide

Chapter 5: Basic Tools

475

Note

To calculate the statistics based on a spatial subset or the area under an ROI,

click the Stats Subset button. For instructions, see “Using Statistics Subset” on page 479.

5. Select the values by percent or by value using the buttons at the top of the window.

6. Enter the desired minimum and maximum values in the text boxes labeled Min and Max, respectively, to control the input data range.

7. Select the stretch types (Linear, Equalize (histogram equalized), Gaussian, and Square Root) by choosing the appropriate toggle button.

8. Set the output data range in the text widgets labeled Min and Max under the

Output Data label.

Note

The values entered here must match the ranges of the data type selected from the Data Type menu. If out-of-range values are entered, low values are automatically corrected to the minimum and high values are automatically corrected to the maximum of the selected data type.

9. From the Data Type menu, select the appropriate data type (byte, integer, unsigned integer, long integer, unsigned long integer, 64-bit integer and unsigned 64-bit integer, floating point, double precision, complex, or double complex).

10. Enter or choose an output filename.

11. Click OK to start the processing.

If no statistics file exists for the selected input file, the image statistics are calculated prior to data stretching and a small window labeled Image Statistics shows the percent processing complete as a slider that moves from 0 to 100%. If a statistics file already exists (or once the image statistics have been calculated) another small window labeled Data Stretching shows the percentage of data stretching completed.

ENVI User’s Guide

Stretching Data

476

Statistics

Chapter 5: Basic Tools

Use Statistics in the Basic Tools pull-down menu to generate statistical reports and display plots of histograms, mean spectra, eigenvalues, and other statistic information for image files.

Computing Statistics

Basic statistics and/or tabulated histogram information (frequency distributions) can be calculated for single-band or multi-band images. The minimum, maximum, and mean spectra can only be calculated for multi-band images. Similarly, covariance statistics, which include eigenvectors and a correlation matrix, can only be calculated for multi-band images. The statistics are calculated in double-precision.

1. Select Basic Tools

StatisticsCompute Statistics. The Calculate

Statistics Input File dialog appears.

2. In the Select Input File list, select the input file by clicking on the file name.

3. Select spatial or spectral subsetting by clicking on the Stats Subset or

Spectral Subset button, respectively. For details about statistics subsetting, see

“Using Statistics Subset” on page 479.

Note

To apply a mask to the data before calculating the statistics, click Mask

Band and select the desired mask image.

Statistics

ENVI User’s Guide

Chapter 5: Basic Tools

477

4. After the file has been selected, subsetted, and masked as desired, click OK.

The Compute Statistics Parameters dialog appears.

ENVI User’s Guide

Figure 5-8: Compute Statistics Parameters Dialog

This dialog contains the following selections:

Basic Stats — This check box indicates basic statistics (the minimum, maximum, mean, and standard deviation for all bands) are calculated for your data. These basic statistics are always calculated. This option is always set.

Note

Statistics are not calculated for any bands specified as bad bands in the image’s ENVI header file.

Histograms — Check this box to calculate the histogram of each band.

The frequency distribution calculations also return the number of points, cumulative points, percent for each bin, and cumulative percentage for each DN (digital number) in the image histogram. The number of histogram bins used in the calculation is set in the ENVI Configuration

File (see

“Setting ENVI Preferences” in Chapter 2 for more information).

Statistics

478

Statistics

Chapter 5: Basic Tools

Covariance — Check this box to calculate the covariance matrix, the correlation matrix, eigenvalues, and eigenvectors. When this check box is selected, a Covariance Image check box also appears in the dialog. Select the Covariance Image check box to return the covariance and correlation matrices, and the eigenvectors as images in the Available Bands List. The dimensions of the resulting images are nb by nb, where nb is the number of bands of the input data. The eigenvectors are associated with the rows in the output eigenvector image.

Samples Resize Factor and Lines Resize Factor — The values in these text boxes indicate the factors used for resizing the samples and the lines of the image while calculating the statistics. To improve the performance for larger images, specify a value of less than 1 to skip pixels. For example, a factor of 0.5 indicates only every other pixel is used to calculate the statistics.

Output to the Screen — Check this box to display the statistics report on the screen. When this check box is selected, a Statistics Results dialog is used to display the resulting statistics. For more information on this dialog,

see “Producing Statistics Reports” on page 480.

Output to a Statistics File — Check this box to save the statistics report to an ENVI format statistics file. This file format is used by ENVI to improve the speed of some ENVI processes. When this check box is selected, the Enter Output Stats Filename section appears in the dialog.

You can use either the text box or the Choose button in this section to specify the name of the statistics file. The default file extension for statistics files is

.sta

.

Output to a Text Report File — Check this box to save the statistics report to a text file. When this check box is selected, the Enter Output

Text Filename section appears in the dialog. You can use the text box or the Choose button of this section to specify the name of the text file.

Queue — Select this button to place the statistics calculation process in

the ENVI Queue Manager. See “Placing Un-executed Functions in Queue” in Chapter 1 for more information on the ENVI Queue Manager.

Report Precision... — This button enables you to change the data precision displayed in the output statistics report. The Set Report Precision dialog appears when you click this button. You can use the Data Precision increment button to set the number of digits to be displayed after the decimal point, and the Floating Report toggle button to designate the format (Normal or Scientific) for the numbers in the ASCII report. A

ENVI User’s Guide

Chapter 5: Basic Tools

479

Normal number is a number in decimal format (for example, 25.88), whereas a Scientific number is a single digit followed by a decimal value, the letter e, and the exponential power (for example, 2.588e+001).

Using Statistics Subset

Use the Stats Subset button in the input file selection dialog or Data Stretching dialog to calculate the statistics based on a spatial subset or the area under an ROI.

The calculated statistics are applied to the entire file or to a spatial subset of the file.

You can also use this function when doing file-to-file stretching. For details, see

“Stretching Data” on page 474.

1. In the Input File selection dialog, click the Stats Subset button.

2. In the Select Statistics Subset dialog, select one of the following options:

• To select a standard image spatial subset, click the Calculate Stats On

Image Subset button and subset using standard ENVI methods.

• To select an ROI or vector as the subset, click the Calculate Stats On

ROI/EVF button to display a list of ROIs and vectors, then click on an

ROI or vector name to select it.

Figure 5-9: Select Statistics Subset Dialog for Image Subset Calculation (left) and for ROI/EVF Calculation (right)

ENVI User’s Guide

Statistics

480

Chapter 5: Basic Tools

Tip

To add a previously saved ROI or vector to the list, use the Open pull-down menu button in the Select Statistics Subset dialog to open either an ROI File or an EVF File.

Producing Statistics Reports

After setting the report parameters in the Compute Statistics Parameters dialog, calculate the statistics report by clicking OK to start the statistics calculations.

A progress window appears showing the percent of processing complete as a slider from 0 to 100%.

Once the statistics have been calculated, the Statistics Results dialog appears

Statistics

Figure 5-10: Statistics Results Dialog

ENVI User’s Guide

Chapter 5: Basic Tools

481

The File pull-down menu in the Statistics Results dialog contains the following items:

Save results to ENVI stats file... — This option enables you to save the statistics report to an ENVI format statistics file to speed processing for later use with ENVI functions. When this option is selected, the Save Results to

ENVI Stats File dialog appears. In the Enter Output Stats Filename[.sta] section of this dialog, use either the text box or the Choose button to specify the name of the statistics file.

The default file extension for statistics files is

.sta

. The statistics report is saved to the specified file when you click the OK button.

Save results to text file... — This option enables you to save the statistics report to a text file. When this option is selected, the Save Results to Text File dialog appears. In the Enter Output Text Filename[.txt] section of this dialog, use either the text box or the Choose button to specify the name of the text file. The statistics report is saved to the specified file when you click the

OK button.

Tip

The resulting text file is tab-delimited for easy import into external spreadsheet programs, such as Excel.

Save Current Covariance to Image — This option enables you to return the covariance and correlation matrices as well as the eigenvectors as images in the

Available Bands List. The dimensions of the resulting images are nb by nb, where nb is the number of bands of the input data. The eigenvectors are associated with the rows in the output eigenvector image.

Note

The Save Current Covariance to Image option is only available if the

Covariance check box is selected in the previous Compute Statistics

Parameters dialog. It is also only available when calculating the statistics for multiple classes or ROIs if the Options

Calculate Covariance with Stats option in either the Interactive Class Tool or the ROI Tool is selected.

View Statistics Files... — This option enables you to open one or more ENVI statistics files (

.sta

) and display them in other Statistics Results dialogs. You can use this option to compare your current statistics with information in an existing ENVI statistics file.

ENVI User’s Guide

Statistics

482

Chapter 5: Basic Tools

Note

Multiple ENVI statistics files can be opened only if they are related (such as files saved from a group of classes or ROIs with the same output root name).

The Options pull-down menu in the Statistics Results dialog contains the following items:

Copy results to new window — This option enables you to compare statistics for different bands. When this option is selected, a copy of the Statistics

Results dialog appears. You can use this copy to compare various statistics. For example, you can use the Select Plot button in one dialog to display the histogram of one band, and then use the Select Plot button in the copied dialog to display the histogram of a different band. Moreover, as with other ENVI plot windows, you can drag-and-drop a plot display from one window to another

(see

“Using Interactive Plot Functions” in Chapter 4 for more complete details

on this options).

Set Report Precision... — This option provides access to the Set Report

Precision dialog to change the precision of the information displayed in the

Statistics Results dialog.

Note

The Options

Set Report Precision... option does not affect histogram precision.

A Plot section of the Statistics Results dialog contains a window, which displays the plot currently selected in the Select Plot menu. In the plot window, mouse buttons allow you to perform the following tasks:

• Left Mouse Button (Mouse Button 1) — Click this button in the plot window to display a crosshair cursor on the nearest data point and report its (x, y) location.

• Middle Mouse Button (Mouse Button 2) — Click this button to zoom in or out of the plot.

• Right Mouse Button (Mouse Button 3) — Click this button to access a shortcut menu containing all the options associated with a regular plot window (see

“Using Interactive Plot Functions” in Chapter 4 for more complete details on

these options).

Statistics

ENVI User’s Guide

Chapter 5: Basic Tools

483

The Plot section also contains the following items:

Select Plot — This pull-down button enables you to change the current display in the plot window. When the Statistics Results dialog first appears, the plot window contains the minimum, maximum, and mean values for each band in the image. You can use the Select Plot menu to change the display to the standard deviation, eigenvalues (if the Covariance check box was selected in the previous Compute Statistics Parameters dialog), or histograms (if the

Histograms check box was selected in the previous Compute Statistics

Parameters dialog) for each or all bands.

Clear Plot — This button enables you to clear the plot window.

A Text section containing the following items:

Text Box — The text box contains the values of the calculated statistics in a table format. Each table in this box shows the resulting type of statistics (basic, covariance, eigenvalues, and histograms) calculated for each band in the image.

Select Stat — This pull-down menu enables you to change the information displayed. At any point in the text, you can use the File Info option in the

Select Stat menu to return to the file information section, which is at the beginning (top) of the text. You can also use the scroll bars to move around this text box.

The Text section shows the following information:

• File Information

• Basic Statistics

• Covariance (only available if the Covariance check box was selected in the previous Compute Statistics Parameters dialog)

• Correlation (only available if the Covariance check box was selected in the previous Compute Statistics Parameters dialog)

• Eigenvectors (only available if the Covariance check box was selected in the previous Compute Statistics Parameters dialog)

• Histograms for Each Band (only available if the Histograms check box was selected in the previous Compute Statistics Parameters dialog)

ENVI User’s Guide

Statistics

484

Chapter 5: Basic Tools

Opening Statistics Files

Use View Statistics File to view previously saved statistics files.

1. Select Basic Tools

StatisticsView Statistics File.

2. When the standard ENVI file input dialog appears, select a valid statistics file.

The View Statistics File dialog appears.Use this dialog to select the type of reports to be generated.

The options are similar to those described above for the Calculate Statistics

Parameters Dialog.

Note

The options available in the View Statistics File dialog are dependent on the type of statistics that were computed for the original file (e.g., if covariance statistics were not calculated for the original file, then covariance options will not be available in the View Statistics File dialog).

Summing Data Bands

Use Sum Data Bands to add all of the bands in an image together or to calculate spectral statistics for every pixel in an image. You can calculate up to 8 different statistics: sum, sum of squares, mean, standard deviation, variance, skewness, kurtosis, and mean absolute deviation. The various statistics are calculated as follows, where x

j

is the value of a pixel for band j and N = number of bands:

Note

The statistics calculated using Sum Data Bands are spectral, which means that the statistics are calculated using all of the bands for every pixel and that output images will result. The statistics calculated using the other statistics functions are spatial, which means that they are calculated using all pixels for every band.

1. Select Basic Tools

StatisticsSum Data Bands.

2. In the file selection dialog, select an input file and perform any subsetting.

3. In the Sum Data Parameters dialog, click on the output bands to be calculated.

4. From the Output Data Type button menu, select the output data type.

Statistics

ENVI User’s Guide

Chapter 5: Basic Tools

485

Note

If the output data falls outside the data type range, the output data will be clipped to the highest or lowest data type value (i.e., byte output will have values only between 0-255 and all negative values will clip to 0).

5. Select output to File or Memory.

6. Click OK.

A status window displays the progress of the operation. The calculated bands are listed in the Available Bands List.

Sum =

N

j

= 1

x j

Sum

2

=

N

x j

2

j

= 1

Mean =

x

=

N

1

N

x j j

= 1

Variance =

N

N

– 1

j

= 1

(

x j

x

)

2

Skewness =

N

N

j

= 1

x

x

----------------------------

Variance

3

Kurtosis =

N

N

j

= 1

x

x

----------------------------

Variance

4

– 3

Mean Absolute Deviation =

N

N

j

= 1

x j

– x Standard Deviation =

Variance

ENVI User’s Guide

Statistics

486

Chapter 5: Basic Tools

Generating a Random Sample

It is often helpful to generate a random sampling of points from a classification result, or from Regions of Interest. Such samplings can be valuable in supporting classification accuracy assessments and field truthing expeditions.

ENVI offers three types of random samplings:

Stratified Random. This technique, also called proportional or quota random sampling, involves dividing the population (the entire classification image or all of the ROIs) into homogeneous subgroups (the individual classes or ROIs) and then taking a simple random sample in each subgroup. Two types of

Stratified Random sampling are available: proportionate and disproportionate.

Proportionate sampling produces sample sizes that are directly related to the size of the classes (i.e., the larger the class, the more samples will be drawn from it). Disproportionate sampling allows the user to explicitly define each sample size.

Equalized Random. This technique also divides the population into homogeneous subgroups (as in Stratified Random) but ensures that each class's

(or ROI's) sample size is exactly the same. That is, the sample size remains fixed regardless of class size.

Random. Random sampling does not divide the population into subgroups but instead simply draws a random sampling from the entire (heterogeneous) population. For large sample sizes, the distribution of classes (or ROIs) in the sample will approximate a Stratified Random sampling, but classes with small sizes may be missed altogether in the random sample.

For detailed instructions, see

“Generating a Random Sample” in Chapter 6.

Statistics

ENVI User’s Guide

Chapter 5: Basic Tools

Change Detection Analysis

487

Change Detection Analysis encompasses a broad range of methods used to identify, describe, and quantify differences between images of the same scene at different times or under different conditions. Many of ENVI's tools (such as Band Math or

Principle Components Analysis) can be used independently, or in combination, as part of a change detection analysis. In addition, the routines found under the Basic

Tools

Change Detection menu offer a straightforward approach to measuring changes between a pair of images that represent an Initial State and Final State. Use

Change Detection Statistics for classification images and Compute Difference

Map for grayscale (single-band) images.

Compute Difference Map

The Compute Difference Map routine produces an ENVI Classification Image characterizing the differences between any pair of Initial State and Final State images. The input images may be single-band images of any data type. The difference is computed by subtracting the initial state image from the final state image (i.e., finalinitial), and the classes are defined by change thresholds. A positive change identifies pixels that became brighter (final state brightness was greater than the initial state brightness), while a negative change identifies pixels that became dimmer (final state brightness was less than initial state brightness). As an optional pre-processing step, the input images can be normalized to a data range between zero and one, or standardized to a zero mean and unit variance. The input images must be co-registered or georeferenced. For the most accurate results, carefully co-register the images before processing. If the input images are not coregistered, the Compute Difference Map routine uses the available map information to automatically co-register the images, using the Initial State image as the base if reprojection or resampling is required.

Tips for Successful Analyses

When performing a change detection analysis on non-thematic images (grayscale data), it is important to consider all of the factors that can cause scenes of the same area to look different. The following list contains a few notable factors:

Differences in the instrument or sensor. It is important to consider the similarity of the sensors that collected the images. Even bands collected in the same part of the spectrum (e.g., two red bands) may have different band center wavelengths, or different spectral response functions, which can lead to different pixel values for the same material.

ENVI User’s Guide

Change Detection Analysis

488

Chapter 5: Basic Tools

Differences in the collection date and time. Seasonal changes can impart big differences in scenes containing vegetation (due to plant senescence and canopy architecture development). Differences in the season and time of day will also affect the solar azimuth and elevation.

Differences in Atmospheric Conditions. The dominant weather conditions can affect atmospheric transmission and scattering. Consistent differences in gross atmospheric conditions are often associated with seasonal changes. For example, differences in the predominant wind direction can be important

(winds blowing in over the ocean contain different aerosols with different scattering properties from those blowing in over an urban area). Another common, yet consistent, atmospheric difference is the water content of the atmosphere. Summer atmospheres tend to be wetter than winter atmospheres.

Atmospherically corrected images can reduce such influences.

Differences in Image Calibrations. For the most accurate change detection results, it is important to work with images that have been calibrated into the same units. If a calibration into physical units (such as radiance) is not possible, a relative calibration may be better than none at all (especially if the instruments that collected the images have different dynamic ranges).

Differences in Image Resolution. Differing pixel sizes can lead to spurious change detections. It is important that the original images (prior to resampling or re-projection) have the same pixel resolution. For scenes with large swaths

(such as AVHRR, SeaWiFS, or MODIS) the actual pixel sizes differ across the scene. In such cases, differences in the sensor viewing geometry can also be important.

Co-registration Accuracy. Accurately co-registered images are critical for change detection analyses. While the Compute Difference Map routine will automatically co-register the input images using the available map information, if the differences in the image geometry are substantial, it is well worth the effort to ensure that the co-registration is as accurate as possible before performing a change detection.

The Compute Difference Map routine does not compensate for any of these (or other) conditions. Its results are strictly dependent on pixel-for-pixel comparisons.

Change Detection Analysis

ENVI User’s Guide

Chapter 5: Basic Tools

489

Using the Compute Difference Map Routine

1. From the main ENVI menu select Basic Tools

Change

Detection

Compute Difference Map.

Note

The input images must be georeferenced or co-registered. If the images are not co-registered, then the available map information will be used to automatically co-register the area common to both.

2. In the first file selection dialog, select a single band image representing the

Initial State and perform any spatial subsetting if desired.

3. In the second file selection dialog, select a single band image representing the

Final State and perform any spatial subsetting if desired.

The Compute Difference Map Input Parameters dialog appears.

4. Enter the number of classes you wish to use.

Each class is defined by a difference threshold that represents a varying amount of change between the two images. The minimum number of classes is two. The default classification thresholds are evenly spaced between (-1) and

(+1) for simple differences, and (-100%) and (+100%) for percent differences.

The default class definitions attempt to produce symmetric classes, with an equal number of positive and negative change classes surrounding a No

Change category. The order in which the classes are defined is as follows: For

n classes, where n is odd, the first (n/2) classes represent positive changes, starting with the largest positive changes and ending with the smallest. The middle class, (n/2) + 1, represents no change. The last (n/2) classes represent negative changes, starting with the smallest negative changes end ending with the largest. For an even number of classes the definitions remain the same except that the number of negative classes is reduced by one. In short, the default class definitions range from positive to negative, with the magnitude of the change increasing with distance from the middle No Change class.

5. To modify or view the classification thresholds, define names for the classes, or import classification thresholds from a previous result, click the Define

Class Thresholds button. If the default thresholds are used, this step is unnecessary.

The Define Class Thresholds dialog appears. Each class is defined by one line in the dialog.

ENVI User’s Guide

Change Detection Analysis

490

Chapter 5: Basic Tools

Note

While users are encouraged to customize the criteria used to define the change thresholds, it is recommended that the classes retain their default symmetrical property, with an equal number of positive and negative classes surrounding a No Change class. Retaining the default position (order) and type (negative or positive) of classes will make the results easier to interpret using the classification color assignments.

A. Defining Class Names — Place the cursor in the text box next to the class you wish to rename, and enter the new class name.

B. Modifying Class Thresholds — Select logical operators from the pull down menus and enter numeric values in the text boxes to define the thresholds for any selected class. When you click OK, you will be saving these changes. To further modify class thresholds, simply click the Define

Class Thresholds button again. The first and last class have only one logical operator and are intended to be open-ended.

C. Applying the Defaults — To revert to the default classification thresholds, simply click the Apply Defaults button at the bottom of the dialog. The defaults that are applied are dependent on the Change Type selected in the

Compute Difference Map Input Parameters dialog (the Change Type is also indicated by the title bar of the Define Class Thresholds dialog).

D. Undoing Changes — To undo changes made since the Define Class

Thresholds dialog was last opened, click the Reset button. All changes made since the dialog was brought up will be removed.

E. Matching the Change Thresholds from a Previous Analysis

• To automatically set the classification change thresholds to match those used in a previous analysis, click the Match Previous Result button.

• In the file selection dialog, choose a Difference Map classification image produced previously using the Compute Difference Map routine that contains the thresholds you wish to reuse.

Note

If necessary, the number of classes for the current analysis will be reset to match the number of classes used in the previous analysis.

6. Set the Change Type to Simple Difference or Percent Difference.

Change Detection Analysis

ENVI User’s Guide

Chapter 5: Basic Tools

491

Note

The Simple Difference is computed by subtracting the Initial State image from the Final State image. The Percent Difference is the Simple

Difference divided by the Initial State value.

7. Select optional Data Pre-Processing.

Only one type of pre-processing can be selected. Normalization is computed by subtracting the image minimum and dividing by the image data range:

Normalization = (DN – min) / (max – min). Standardization is computed by subtracting the image mean and dividing by the standard deviation:

Standardization = (DN – mean) / stdev.

8. Choose output to File or Memory for the Difference Map result. If you choose to output to File, you will need to enter an output filename.

9. If the input images require warping or resampling in order to produce a coregistered pair, then the Compute Difference Map Input Parameters dialog will contain an extra section which allows the auto-co-registered images to be saved to File or Memory.

10. Click OK to start the processing.

A status window displays the progress of the operation. The resulting

Difference Map classification image is color coded to indicate the magnitude of the change between the two images. Positive changes are displayed in shades of red, grading from gray for no change to bright red for largest positive change. Negative changes are displayed in shades of blue, grading from gray for no change to bright blue for the largest negative change.

Note

If the number of positive and negative change classes, or the order in which the classes are defined, has changed from the default settings, the interpretation of the color scheme may not match that described here.

ENVI User’s Guide

Change Detection Analysis

492

Chapter 5: Basic Tools

Change Detection Statistics

The Change Detection Statistics routine is used to compile a detailed tabulation of changes between two Classification images. The changes detected using this routine differ significantly from a simple differencing of the two images. While the statistics report does include a class-for-class Image Difference, the analysis focuses primarily on the Initial State classification changes—that is, for each Initial State class, the analysis identifies the classes into which those pixels changed in the Final State image. Changes can be reported as pixel counts, percentages, and areas. In addition, a special type of mask image (classification masks) that provide a spatial context for the tabular report can be produced. The class masks are ENVI Classification images with class colors matching the Final State image, making it easy to identify not only where changes occurred but also the class into which the pixels changed.

The input images must be co-registered or georeferenced. For the most accurate results, carefully co-register the images before processing. If the input images are not co-registered, the routine will use the available map information to automatically coregister the images, using the Initial State image as the base if re-projection or resampling is required.

1. From the main ENVI menu select Basic Tools

Change

Detection

Change Detection Statistics, or Classification Post

Classification

Change Detection Statistics.

2. In the first file selection dialog, select a Classification image representing the

Initial State and perform any spatial subsetting if desired.

3. In the second file selection dialog, select a Classification image representing the Final State and perform any spatial subsetting if desired.

The Define Equivalent Classes dialog appears.

4. Match the classes from the Initial and Final State images by clicking on the matching names in the two lists and clicking the Add Pair button.

Add only the classes you wish to include in the change detection analysis (it is not required to pair all classes). The class combinations are shown in a list at the bottom of the dialog. If the classes in each image have the same names, they are automatically paired.

• To remove a paired class from the list, click on the pair in the list at the bottom of the dialog and then click on the Remove Pair button. The two class names reappear in the lists at the top of the dialog.

• To remove all of the paired classes, simply click the Remove All button.

All of the classes reappear in the lists at the top of the dialog.

Change Detection Analysis

ENVI User’s Guide

Chapter 5: Basic Tools

493

5. After all of your class pairings are made, click OK.

The Change Detection Statistics Output dialog appears.

6. Next to the Report Type label, select the type of statistics report you want to generate. You may choose any combination of Pixels, Percent, and Area.

7. To output Class Masks, select Yes in the toggle button next to Output

Classification Mask Images, then choose a destination for the mask images. If not outputting Class Masks, set the toggle button to No.

8. If the input images require warping or resampling in order to produce a coregistered pair, then the Change Detection Statistics Output dialog will contain an extra section which allows the auto-co-registered images to be saved to File or Memory.

9. Click OK to start the processing. If an Area Report was requested but the

Initial State image does not have pixel sizes defined, the Define Pixel Sizes for

Area Statistics dialog is displayed. Enter the pixel sizes and click OK. If

Cancel is selected, no Area Report will be computed.

A status window displays the progress of the operation.

The Change Detection Statistics Report

A single interactive report window contains all of the statistics tables that were selected, each under its own tab. The report window also contains a Reference tab, which includes additional information about the analysis, such as the names of the input images and the equivalent class pairings.

The following example will help to explain the various parts of the Change Detection

Statistics table. Refer to “Sample Change Detection Statistics Report” on page 494

for reference.

Initial State

Classes

urban forest agriculture grasses

Final State Classes Equivalent Class Pairings

urban mixed forest irrigated vegetation tall grass/prairie urban = urban forest = mixed forest agriculture = irrigated vegetation grasses = tall grass/prairie

Table 5-1: Classes for Example Change Detection Analysis

ENVI User’s Guide

Change Detection Analysis

494

Chapter 5: Basic Tools

Initial State

Classes

lakes & ponds

Final State Classes Equivalent Class Pairings

water burn scar

Table 5-1: Classes for Example Change Detection Analysis

Note that the Initial and Final State images do not have the same number of classes, and that only four of the five Initial State classes are included in the Equivalent Class

Pairings list (lakes & ponds is not used).

Figure 5-11: Sample Change Detection Statistics Report

The statistics tables list the Initial State classes in the columns and the Final State classes in the rows. However, the columns include only the selected (paired) Initial

State classes, while the rows contain all of the Final State classes. This is required for a complete accounting of the distribution of pixels that changed classes. For each

Initial State class (i.e., each column), the table indicates how these pixels were classified in the Final State image. For example, in the sample report in the figure above, none of the pixels initially classified as urban changed classes, but 9523 pixels initially classified as forest changed into the urban class in the Final State image.

Change Detection Analysis

ENVI User’s Guide

Chapter 5: Basic Tools

495

The Class Total row indicates the total number of pixels in each Initial State Class, and the Class Total column indicates the total number of pixels in each Final State

Class. Again, referring to the figure above, 13389 pixels were classified as urban in the Initial State image, while 25256 pixels were classified as urban in the Final State image.

The Row Total column is simply a class-by-class summation of all Final State pixels that fell into the selected Initial State classes. Note that this may not be the same as the Final State Class Totals because it is not required that all Initial State classes be included in the analysis. For example, in the sample analysis presented in

Table 5-1 ,

the Initial State class lakes & ponds was not included in the analysis. The differences in the Row Total and Final State Class Total columns are due to those lakes & ponds pixels that changed into the various Final State classes (e.g., see the Row Total and

Class Total for the Final State urban class: 5 Initial State lakes & ponds pixels were reclassified as urban in the Final State, accounting for the difference in these two columns).

The Class Changes row indicates the total number of Initial State pixels that changed classes. In the table in

Figure 5-11 , the total Class Changes for forest is 45419 pixels.

In other words, 45419 pixels that were initially classified as forest changed into Final

State classes other than mixed forest (the equivalent class). To confirm that this is correct, subtract the forest column's mixed forest pixel count of 164893 from the forest Class Total of 210312.

The Image Difference row is simply the difference in the total number of equivalently classed pixels in the two images, computed by subtracting the Initial State Class

Totals from the Final State Class Totals. An Image Difference that is positive indicates that the class size increased. For example, in the sample analysis, even though no pixels classified as urban changed classes, the urban class grew significantly as its Image Difference value is 11867.

The tabs along the top of the Change Detection Statistics dialog can be selected to show equivalent information for the class changes in terms of Percentage and Area.

In the Percent report (not shown here) the increase in the size of the urban class corresponds to a growth of 88%:

(final stateinitial state) / initial state = (25256 – 13389) / 13389 = 0.886

ENVI User’s Guide

Change Detection Analysis

496

Chapter 5: Basic Tools

Additional Features of the Change Detection Statistics Report

• To change the floating point precision displayed in the report, select

Options

Set Report Precision.

• To convert the units for the Area report, select Options

Convert Area

Units.

• To save the statistics reports to an ASCII text file, select File

Save to Text

File. In the Save Change Detection Stats to Text dialog, you can optionally add a descriptive line of header text to the file being written. The data is saved in a tab delimited format to facilitate importing into other software programs.

The Classification Mask Images

The classification masks complement the statistics tables by spatially identifying which Initial State pixels changed classes, and into which class they changed.

Patterns of changes can often be seen by examining the masks. The masks can also help highlight co-registration errors. The class mask images are saved as a multi-band image with one mask for each paired class. To help identify the class into which a pixel changed, the masks are stored as ENVI Classification images with the class assignments (names, colors, and values) matching the Final State. A value of zero in the mask indicates that no change occurred from the Initial to the Final State; nonzero values indicate a change. In order to differentiate pixels that did not change classes from those that changed into the Unclassified class (which typically has a classification value of zero), pixels that changed into the Unclassified class are assigned a value equal to the number of Final State classes plus one, and color coded white. For example, in the sample analysis described here, the Final State image contains 6 classes; therefore, any pixel in the mask that changed into the Unclassified class would be assigned a value of 7.

Change Detection Analysis

ENVI User’s Guide

Chapter 5: Basic Tools

Using the Measurement Tool

497

Use Measurement Tool to get a report on the distance between points in a polygon or polyline, and to get perimeter and area measurements for polygons, rectangles, and ellipses.

Note

To measure ROIs while using the ROI function, see

“Reporting ROI

Measurements” on page 305.

1. Select one of the following options to begin:

• From the ENVI main menu, select Basic Tools

Measurement Tool.

• From the Display menu, select Tools

Measurement Tool.

2. The Display Measurement Tool dialog appears. In the Display text box, type the number of the display that you want to take measurements from.

Figure 5-12: Display Measurement Tool Dialog

3. Select the appropriate image window toggle button (Image, Scroll, Zoom).

Note

To disable the measurement function at any time, select the Off toggle button.

4. Select Type

the desired shape of the area you want to measure.

ENVI User’s Guide

Using the Measurement Tool

498

Chapter 5: Basic Tools

5. Select Units

the desired measurement unit. If the pixel size of the image is not stored in the header, and you select any unit except pixel, complete these steps when the Input Display Pixel Size dialog box appears.

A. In the X Pixel Size and Y Pixel Size text boxes, type the size of the pixels in your image.

B. From the Units button menu, select the unit type. Click OK.

6. In the image display, draw the desired shape by clicking with the left mouse button.

• In Rectangle or Ellipse mode, click with the left mouse button and drag the shape to the desired size.

• To draw a square or circle, click and drag while holding the middle mouse button in Rectangle or Ellipse mode.

7. Close the polygon or complete the line by clicking the right mouse button.

• For Polygon mode, the distance between the vertices are listed and the perimeter and total area are reported when the polygon is closed.

• For Polylines, the distance between the vertices are listed and the total distance is given when the polyline is completed.

• In Rectangle mode, the lengths of the side segments, the perimeter, and the total area are reported.

• In Ellipse mode, the circumference and total area are reported.

Note

To erase the shape, click again with the right mouse button.

Selecting Measurement Units

In the Display Measurement Tool dialog, use the Units menu to select the unit the measurement is reported in. The choices are pixels, meters, kilometers, feet, yards, miles, and nautical miles.

Select Units

the desired unit. If the pixel size of the image is not stored in the header, and you select any unit except pixel, complete these steps when the Input

Display Pixel Size dialog box appears.

1. In the X Pixel Size and Y Pixel Size text boxes, type the size of the pixels in your image.

2. From the Units button menu, select the unit type. Click OK.

Using the Measurement Tool

ENVI User’s Guide

Chapter 5: Basic Tools

499

Measuring Area

In the Display Measurement Tool dialog, use the Area menu to measure the area in units

2

(e.g., meters

2

), acres, or hectares.

Select Area

Acres or Hectares.

Measurement Options

In the Display Measurement Tool dialog, use the Options menu to select whether the measurement information is reported as line segments (the default) or as point coordinates.

• To get a listing of the vertices coordinates, select Options

Report as

Points. The coordinates are reported as a pixel location (Pixel (x,y)).

• To get a listing of the line segment distances, select Options

Report as

Segments.

• For images that are georeferenced, you may list the coordinates as map coordinates or as latitude and longitude coordinates by selecting Options

Georef Map (x,y) or Georef (Lat/Lon).

• To output the list of point coordinates to a file, select File

Save Points to

ASCII.

Saving Measurement Reports

In the Display Measurement Tool dialog, use the File menu to save the measurement report to an ASCII file.

1. In the Display Measurement Tool dialog, select File

Save Points to ASCII.

2. In the Output Measurement Points dialog, enter an output filename.

3. Click OK.

Closing the Measurement Tool Dialog

To close the Display Measurement Tool dialog, select File

Cancel.

ENVI User’s Guide

Using the Measurement Tool

500

Chapter 5: Basic Tools

Band Math

The Band Math

TM

routine is a flexible image processing tool with many capabilities not available in any other image processing system. Because each ENVI user is likely to have unique needs, the Band Math tool allows you to define your own processing algorithms and apply them to bands or entire files opened in ENVI. Your custom processing may be as simple or complicated as you wish. For example, you could simply subtract one image band from another, or execute your own custom function written in the Interactive Data Language, IDL, the language in which ENVI itself was written.

See “Band Math Basics” in Chapter 2 of the ENVI Programmer’s Guide for more information about writing Band Math functions in IDL.

Using the Band Math Tool in ENVI

To use the Band Math Tool in ENVI:

1. Select Basic Tools

Band Math. The Band Math dialog appears. It accepts any valid IDL expression, provided that the result of the operation is a twodimensional array of the same spatial dimensions as the input bands.

Band Math

Figure 5-13: Band Math Dialog

ENVI User’s Guide

Chapter 5: Basic Tools

501

Note

Some common image summing operations are easier to perform using the

Basic Tools

StatisticsSum Data Bands selection (see

“Summing

Data Bands” on page 484).

2. Enter the IDL expression you wish to have evaluated in the Enter an

expression text box. Use variables in place of band names or file names (the variables will be assigned in the next step). Variable names must begin with the character “b” or “B” followed by up to 5 numeric characters.

Note

For example, if you wanted to calculate the average of three bands, the mathematical equation:

(float(b1)+float(b2)+float(b3))/3.0

could be entered into the text box. Three variables are used in this expression — b1 is one variable, b2 a second variable, and b3 a third variable. Note that, in this example, the IDL function float() is used to prevent byte overflow errors during calculation. For more details on

Expressions, see

“IDL Tips for Use in Band Math” on page 506 and

“Sample

Band Math Expressions” on page 512.

3. After a valid expression is entered, click OK. The Variable to Band Pairings dialog appears. See

“Assigning Values to Variables” on page 502 for more

information.

Using Previous Expressions

To reuse any previously applied math expressions:

1. In the Band Math dialog, click on any expression shown in the Previous Band

Math Expressions list to load that expression into the Enter an expression field. If you have a Math Expression File defined in your preferences (see

“Setting ENVI Preferences” on page 174) then these expressions will be listed

by default every time you start Band Math.

2. Once loaded, click OK to apply the expression to a new set of bands. The

Variable to Band Pairings dialog appears. See “Assigning Values to Variables” on page 502 for more information.

ENVI User’s Guide

Band Math

502

Chapter 5: Basic Tools

Restoring Saved Expressions

To restore previously-saved expressions:

1. In the Band Math dialog, click Restore.

2. Select the appropriate filename from the Enter Expressions Filename dialog and click Open.

The expressions that are stored in the file you selected are displayed in the Previous

Band Math Expressions list.

Deleting Expressions From the List

To delete a single expression from the list, click on it to highlight it and click the

Delete button.

Adding Expressions to the List

To add an individual expression to the Previous Band/Spectral Math Expressions list, enter it in the Enter an Expression text box and click the Add to List button.

Saving Expressions Without Running

You can save expressions to a file without having to run them through the Band or

Spectral Math function first. To do this, give the current expression list a filename with a

.exp

extension, and click the Save button.

Assigning Values to Variables

Use the Variables to Bands Pairings dialog to assign bands from a list of input bands to the variables that were entered in the Enter an expression text box.

To assign a value to variable b1 from our previous example:

Band Math

ENVI User’s Guide

Chapter 5: Basic Tools

1. In the Variables to Bands Pairings dialog, click on the variable B1 in the

Variables used in expression text box.

503

Figure 5-14: Variables to Bands Pairings Dialog

2. Click on the desired band in the list labeled Available Bands List. Data sets appear expanded in the tree view by default.

Note

Once the first band is selected, only those bands with the same spatial dimensions are shown in the band list.

3. Continue to assign a value to B2, B3, etc. in the same manner.

ENVI User’s Guide

Band Math

504

Band Math

Chapter 5: Basic Tools

Assigning Multiband Images as Variables

You can assign a multiband image as one or all of the variables (using an image file as a variable is considered File Math).

1. In the Variables to Bands Pairings dialog, click on a variable in the Variables

used in expression text box.

2. Click the Map variable to Input file button.

3. Select a file in the Band Math Input File dialog and click OK.

4. Continue to assign a value to B2, B3, etc. in the same manner.

Note

If more than one file is used, they must have the same number of bands.

A multiband output image is produced for file math modified by the math expression.

Spatially Subsetting Input Images

To spatially subset the input image, click the Spatial Subset button after you have assigned values to all of the variables. The Select Spatial Subset dialog appears.

See

“Selecting a Spectral Subset” on page 40 for detailed instructions on using the

Select Spatial Subset dialog.

Outputting Band Math Results

To output the results to a file or memory, select the File or Memory radio button in the Variables to Bands Pairings dialog.

The resulting image is listed in the Available Bands List.

Saving Expressions

To save expressions to an output file:

1. In the Band Math dialog, click Save.

2. Enter an output filename in the Save Expression to File dialog using the file extension

.exp

for consistency.

All of the expressions in the Previous Band Math Expressions list will be saved to the file.

Clearing Expressions

To clear all expressions from the Previous Band Math Expressions list, click the

Clear button in the Band Math dialog.

ENVI User’s Guide

Chapter 5: Basic Tools

505

Band Math Requirements

The Band Math routine has 4 basic requirements:

1. The Band Math expression must be a single IDL statement — The syntax for defining your processing algorithm, or Band Math expression, is that of

IDL. As you will see, for simple Band Math expressions no prior knowledge of

IDL is required. For those interested in more complex processing, it is recommended that you review the

“IDL Tips for Use in Band Math” on page 506.

Note

Band Math requires that your expression be a single IDL statement in the form of a function:

Band Math Result = Band_Math_Expression

In the Band Math dialog, enter only the Band_Math_Expression (i.e., the right-hand side of the equation). Your expression can include any valid IDL function, including those that you write yourself. If you are using your own custom IDL functions, be sure to properly compile the function before using it in Band Math (see

“Using Your Own IDL Functions in Band Math” on page 514).

2. All input bands must have identical dimensions — The Band Math expression is applied on a simple pixel-for-pixel basis, therefore the input bands (to which your expression is applied) must all have the same spatial dimensions in samples and lines. Further, Band Math does not automatically co-register images that are georeferenced. To automatically co-register images prior to using Band Math, use the Basic Tools

Layer Stacking utility (see

“Layer Stacking” on page 470 for more information).

3. All variables in the expression must be named Bn (or bn) — The variables in the Expression which represent input bands must begin with the character

“b” or “B” followed by up to 5 numeric characters. For example, valid

Expressions for adding 3 bands together could be written in any of the following ways: b1 + b2 + b3

B1 + B11 + B111

B1 + b2 + B3

ENVI User’s Guide

Band Math

506

Chapter 5: Basic Tools

4. The result must be a band of the same dimension as the input bands

The Band Math Expression must produce a result which has the same spatial dimensions in samples and lines as the input bands.

IDL Tips for Use in Band Math

The power of the Band Math routine is provided by the power, speed, and flexibility of IDL. However, you needn't be an expert IDL programmer to be successful with

Band Math. The following tips will help you make the most of Band Math and avoid common problems.

Pay Attention to the Data Type

Doing arithmetic in IDL is a bit different than simply using a calculator. The data type of your input bands and any constants you use in your expression are very important. Each data type—especially the non-floating point integer data types— has a limited dynamic range, meaning that they can only represent a limited set of numbers. For example, a byte data type can only represent values between 0 and 255.

If you were to add two byte bands together

(b1 + b2)

and the sum was greater than

255, the result would not be what you expect. When a value becomes bigger than the data type can hold, it overflows and starts counting from the beginning again. For example, adding the bytes 250 + 10 would produce a result of 4. This situation is commonly encountered in Band Math because remote sensing images are frequently stored as bytes or integers. To avoid data type overflow, you should promote the data type of input bands using one of the IDL data type casting functions (see

Table 5-2

for a full list of these functions). For example, when adding two-byte image bands together (as above), you will get the correct answer if you promote the data type to an integer using the IDL function

FIX()

.

fix(b1) + b2

Note

To find out the data type of your images, just highlight them in the Available Bands

List and their data type will be listed in the DIMS box at the bottom of the dialog.

You might ask, why not just carry out all computations in a floating point data type since it can represent any value? The answer is disk space. The greater the dynamic range a data type can represent, the more disk space it consumes. For example, byte data types use only 1 byte for every pixel, integers use 2 bytes for every pixel, while floating point data types use 4 bytes for every pixel. Thus a floating point result will consume twice as much disk space as an integer result. See

Table 5-2

to learn more about the disk space usage and dynamic ranges of the IDL data types.

Band Math

ENVI User’s Guide

Chapter 5: Basic Tools

507

IDL is Dynamically Typed

Using the IDL data type casting functions, like fix(), is not the only way that the data type of your Band Math result can get promoted. This is because IDL is Dynamically

Typed, which means that the data type of an IDL statement is automatically promoted to the largest data type it encounters in the expression. Because certain numbers (like small integers) can be represented by several different data types, IDL must apply some default rules about how these numbers are interpreted. For example, numbers without decimal points are always interpreted as integers, even if they are within the dynamic range of a byte data type. For example, if you wanted to add the value 5 to a byte image and you used the Band Math expression: b1 + 5 the number 5 is interpreted as a 2-byte integer, so the result would be promoted to an integer image (which uses twice as much disk space as a byte image). If you wanted to keep the result a byte image, you could either use the data type casting function byte(): b1 + byte(5) or, use an IDL shortcut for casting an integer as a byte: b1 + 5B

Adding a B (upper or lowercase) immediately following a number ensures that it is interpreted as a byte data type. There are several other shortcuts like this that are quite useful if you use constants in your Band Math expressions. See the following table for details.

Data Type

Unsigned Long

Integer

Casting

Function

Byte

Integer byte() fix()

Unsigned Integer uint()

Long Integer long() ulong()

B

U

L

Shortcut

UL

Dynamic Range

0 to 255

–32768 to + 32767

0 to 65535 approximately

+/– 2 billion

0 to approximately

4 billion

Bytes per Pixel

2

4

1

2

4

Table 5-2: Data Type Casting Shortcuts

ENVI User’s Guide

Band Math

508

Chapter 5: Basic Tools

Data Type

64-bit Integer

Casting

Function

long64()

Shortcut

LL

64-bit Unsigned

Integer

Floating Point ulong64() ULL float()

Double Precision double()

Complex

Floating Point complex()

Complex Double

Precision dcomplex()

. (decimal point)

D

Dynamic Range

approximately

+/– 9e18

0 to approximately

2e19

+/– 1e38

Bytes per Pixel

8

8

4

+/– 1e308 same as float same as double

8

8

16

Table 5-2: Data Type Casting Shortcuts (Continued)

The Order of Operation is Important

Mathematical operators are not necessarily carried out in the order they appear in the expression, but instead according to a hierarchy of precedence. Using parentheses can change the order of operations, with the most deeply nested part of the expression being carried out first. The order of precedence for IDL operators is listed in

Table 5-

3

. Operators that have the same precedence will be carried out in the order they appear in the expression. For example, consider the following expressions (with constants used in place of bands):

5 + 3 * 2

(5 + 3) * 2

Evaluates to 11 because the multiplication operator takes precedence

Evaluates to 16 because the parentheses change the order of operation

The order of precedence combined with the dynamic typing can also change the outcome of your expression. Be sure to promote the data type in the proper place in

Band Math

ENVI User’s Guide

Chapter 5: Basic Tools

509 the expression to avoid data type overflow or integer division errors. For example, consider the following case:

Float(5) + 10 / 3

5 + 10 / float(3)

All of the constants are integers but the float() function promotes the result into a floating point data type. However, because the division operator has precedence over the addition, it is applied first and the division is carried out as integers, then added to 5 as a floating point operation. The result is 8.0 (instead of the expected 8.3).

If the data type promotion is moved to one of the division variables then the result is 8.3.

The following table describes the order of precedence for each operator:

Order of

Precedence

First

Second

Third

Fourth

Operator

( )

^

Description

Parentheses to group expressions

Exponents

* Multiplication

# and ## Matrix multiplication

/ Division

MOD Modulus (remainder)

+ Addition

< Minimum

> Maximum

NOT Boolean negation

Table 5-3: Operator Precedence

ENVI User’s Guide

Band Math

510

Chapter 5: Basic Tools

Order of

Precedence

Fifth

Operator Description

Sixth

Seventh

GE

GT

AND

OR

EQ

NE

LE

LT

XOR

? :

Equal

Not equal

Less than or equal

Less than

Greater than or equal

Greater than

Boolean AND

Boolean OR

Boolean exclusive OR

Conditional expression (rarely used in Band Math)

Table 5-3: Operator Precedence (Continued)

Avoid Using IDL Functions That Require All of the Image Data at Once

Like all other ENVI routines, the Band Math processing is tiled. This means that if the images being processed are larger than the tile size defined in your preferences

(see

“Setting ENVI Preferences” on page 174), which is set to 1 MB by default, then

it will be broken into smaller pieces, each piece processed separately, then reassembled. This can cause problems if you use an IDL function that requires all of the image data at once, because the Band Math expression is applied individually to each tile of data. For example, consider using the IDL function MAX(), which determines the maximum value in an array: b1 / max(b1)

If the Band Math processing is tiled, then each tile will be divided by the tile's maximum value, instead of the maximum value of the whole band. If you find that your Band Math result has broad horizontal stripes in it, tiling may be the cause of the problem (because the tiles are horizontal sections of the image). IDL functions to avoid include MAX, MIN, MEAN, MEDIAN, STDDEV, VARIANCE, and TOTAL.

In most cases it is also difficult to use the BYTSCL function, but if you know beforehand the data range of your input bands then you can use BYTSCL as long as you include the MIN and MAX keywords.

Band Math

ENVI User’s Guide

Chapter 5: Basic Tools

511

Take Advantage of IDL’s Powerful Array Operators

IDL’s array operators are very easy to use and enormously powerful for Band Math.

They allow you to examine and treat every pixel in an image individually without having to do a FOR loop (which is not allowed in Band Math). The array operators include the relational operators (LT, LE, EQ, NE, GE, GT), the Boolean operators

(AND, OR, NOT, XOR), and the minimum and maximum operators (<, >). These operators are special because they operate simultaneously on every pixel in an image, and thus return an image of the same dimensions as that passed into them (a Band

Math requirement). For example, to find all pixels with a negative value and replace them with the value –999, you could use the following Band Math expression:

(b1 lt 0) * (-999) + (b1 ge 0) * b1

The relational operators return a one for true and a zero for false, so the portion of the expression that reads (b1 lt 0) will return an array of the same dimensions as b1 filled with ones where b1 was negative and zeros everywhere else. Multiplying this by the replacement value (-999) affects only those pixels that met the criterion of being negative. The second relational operator (b1 ge 0) is the complement to the first, finding all of the pixels that are positive or zero, which is multiplied by their original value and added to the replacement value array. Constructing Band Math expressions with array operators like this provides a great deal of flexibility. See

“Sample Band

Math Expressions” on page 512 for more examples.

The following table describes selected IDL array handling functions. For a complete listing, see the IDL Reference Guide.

Category Available Functions

Basic Arithmetic

Trigonometric

Functions

Relational and Logical

Operators

Addition (+), subtraction (–), multiplication (*), and division (/) sin(x), cos(x), and tan(x)

Arcs — asin(x), acos(x), and atan(x)

Hyperbolics — sinh(x), cosh(x), and tanh(x)

LT, LE, EQ NE, GE, GT

AND, OR, NOT, XOR maximum (>) and minimum (<)

Table 5-4: IDL Array Handling Functions

ENVI User’s Guide

Band Math

512

Chapter 5: Basic Tools

Category Available Functions

Data Type Conversions See

Table 5-2 in “IDL is Dynamically Typed” on page 507

Other Math Functions exponent (^) and natural exponent (exp(x))

Natural Logarithm — alog(x)

Log Base 10 — alog10(x)

Integer rounding — round(x), ceil(x), and floor(x)

Square Root — sqrt(x)

Absolute Value — abs(x)

Table 5-4: IDL Array Handling Functions (Continued)

Sample Band Math Expressions

Avoiding Integer Division

When performing division on bands that are not a floating point data type, the results are not rounded up or down, but simply truncated (the part of the number following the decimal point is simply dropped). To avoid integer division, always promote the data type to a floating point. b1 / float(b2)

If you want to keep the results of the division as an integer, it is usually better to carry out the division as a floating point operation then convert the results back to your desired data type. For example, if your input bands are both byte data type and you want to round up the result and store it as an integer, use the following expression: fix( ceil( b1/float(b2) ) )

Band Math

ENVI User’s Guide

Chapter 5: Basic Tools

513

Avoiding Integer Overflow

Integers have a limited dynamic range. If the Band Math operation is likely to produce a number that is too large or small to be represented by the data type of your input bands, then be sure to promote the data type accordingly. For example, if bands b1 and b2 for this sample expression are byte data types, then the maximum possible result could be as large as (255 * 255) = 65,025. Because bytes can only represent values up to 255, the result should be promoted to an unsigned integer to ensure that the correct values are returned, otherwise values larger than 255 will overflow and be reported incorrectly. uint(b1) * b2

To learn more about the dynamic range of IDL data types, see

Table 5-2 in “IDL is

Dynamically Typed” on page 507.

Creating a Blended Image

Band Math is an easy way to experiment with blending multiple images together. For example, if b1 and b2 are both byte data types, the above expression will produce a new byte image that is weighted 80% by b2 and 20% by b1.

byte( round( (0.2 * b1) + (0.8 * b2) ) )

Using Array Operators to Selectively Modify an Image

Using IDL’s array operators its easy to selectively modify an image or combine data from multiple image sources. In the following example, two images are combined to remove clouds from a scene. Pixels in the image b1 with values greater than 200 are assumed to be clouds and are replaced by the corresponding pixels from image b2.

(b1 gt 200)*b2 + (b1 le 200)*b1

The next example is a slightly more complicated expression but its use of array operators is quite similar to the previous example. This expression uses several criteria to create a binary mask identifying pixels that are predominantly clouds. This algorithm can actually be used to create cloud masks from calibrated daytime imagery from the Advanced Very High Resolution Radiometer (AVHRR) sensor. In the expression, b4 (a thermal band) must be negative or b2 (a reflectance band) must exceed 0.65 and the difference between bands b3 and b4 (a mid IR and thermal band) must exceed 15 degrees. Because relational operators return a one for true, the mask will have a value of one where there are clouds and zeros elsewhere.

(b4 lt 0) or ( b2 gt 0.65 AND (b3 - b4) gt 15 )

ENVI User’s Guide

Band Math

514

Chapter 5: Basic Tools

Using the Maximum and Minimum Operators

The minimum and maximum operators are also array based operators, but unlike the relational or Boolean operators they do not return true or false, but instead the actual

MAX or MIN value. In the following example, for every pixel in the image, the greater of zero, b2 or b3 is added to b1. This ensures that the value that is added to b1 is always positive.

b1 + (0 > b2 > b3)

In the next example, the use of both the minimum and maximum operators clips the data values in b1 at zero and one — no value in b1 will exceed one or fall below zero.

0 > b1 < 1

Using Your Own IDL Functions in Band Math

Since ENVI gives you access to IDL capabilities, you can use the power of built-in

IDL features, IDL user functions, or your own routines to perform custom operations.

The only requirement for these functions is that they accept one or more image arrays as input and that they output a single-band, two-dimensional array result of the same dimensions as the input bands. These functions need to be saved in a directory that is within the ENVI path so they will be automatically accessible (for example, the

ENVI save_add

directory). They can also be compiled using File

Compile IDL

Module.

The following are some simple examples of user band math functions. Note that these examples are only intended to illustrate the process of executing your own custom functions. In most cases the algorithms could be applied directly in Band Math without the need to create a custom function. See “Band and Spectral Math

Functions” in Chapter 2 of the ENVI Programmer’s Guide manual and “Introduction to ENVI User Functions” in the ENVI Tutorials manual for more information about using Band Math to implement user defined procedures.

Band Math Function 1

The following example is a very simple custom band math function that adds two bands together. The following program text can be entered into a text editor and saved with the filename user_bm1.pro

:

FUNCTION user_bm1, b1, b2

RETURN, b1 + b2

END

Compile this function by selecting File

Compile IDL Module and selecting the filename.

Band Math

ENVI User’s Guide

Chapter 5: Basic Tools

515

To call this function from the Band Math dialog, use the following syntax in the

Enter an expression text box: user_bm1(b1, b2)

Band Math Function 2

The following example is a custom band math function that converts the data type of a variable to byte and then inverts the values. The following program text can be entered into a text editor and saved with the filename user_bm2.pro

:

FUNCTION user_bm2, b1

lut = 255 - BINDGEN(256)

b1 = BYTSCL(b1)

b1 = lut[b1]

RETURN, b1

END

Compile this function by selecting File

Compile IDL Module and selecting the filename.

To call this function from the Band Math dialog, use the following syntax in the

Enter an expression text box: user_bm2(b1)

Band Math Function 3

The following example is a custom band math function that replaces variable b1 with the values of variable b2 at each b1 location that has a value of zero. This function is useful for taking a classification image and replacing the unclassified pixels with those of another classification image. The following program text can be entered into a text editor and saved with the filename user_bm3.pro

:

FUNCTION user_bm3, b1, b2

b1 = (b1 EQ 0)*b2 + (b1 NE 0)*b1

RETURN, b1

END

Compile this function by selecting File

Compile IDL Module and selecting the filename.

To call this function from the Band Math dialog, use the following syntax in the

Enter an expression text box: user_bm3(b1, b2)

ENVI User’s Guide

Band Math

516

Chapter 5: Basic Tools

Band Math Function 4

The following example is a custom band math function that calculates the

Normalized Difference Vegetation Index (NDVI) and scales it into the byte data range. Note that the MIN and MAX keywords are required in the function call to

BYTSCL to ensure that the same minimum and maximum values are used for scaling

all tiles of a tiled image (for more information, see “IDL Tips for Use in Band Math” on page 506).

An infrared image band near 0.8 µm should be used for the b1 variable while a red band near 0.6 µm should be used for the b2 variable. The following program text can be entered into a text editor and saved with the filename user_bm4.pro

.

FUNCTION user_bm4, b1, b2

NDVI_float = (float(b1) - b2) / (float(b1) + b2)

b1 = BYTSCL(NDVI_float, min = -1.0, max = 1.0)

RETURN, b1

END

Compile this function by selecting File

Compile IDL Module and selecting the filename.

To call this function from the Band Math dialog, use the following syntax in the

Enter an expression text box: user_bm4(b1, b2)

Band Math

ENVI User’s Guide

Chapter 5: Basic Tools

Spectral Math

517

Use Spectral Math™ to apply mathematical expressions or IDL procedures to spectra (and also to selected multiband images). The spectra can be from a multiband image (i.e., a Z profile), a spectral library, or an ASCII file. For more information and detailed instructions, see

“Spectral Math” on page 833.

ENVI User’s Guide

Spectral Math

518

Segmenting Images

Chapter 5: Basic Tools

Use Segmentation Image to segment an image into areas of connected pixels based on the pixel DN value. You can enter a single DN or a range of DN values to use in the segmentation. Either four or eight adjacent pixels are considered for the connectivity and you can specify the minimum number of pixels that must be contained in a region. Each connected region, or segment, is given a unique DN value in the output image.

Figure 5-15: Example of a Segmentation Image

1. Select Basic Tools

Segmentation Image.

2. In the file selection dialog, select an input band and click OK. The

Segmentation Image Parameters dialog appears.

3. In the Min Thresh Value and Max Thresh Value threshold text boxes, enter a minimum and/or maximum threshold value in DN.

Note

If only one value is entered, the data minimum or maximum is used as the other end of the threshold.

Segmenting Images

ENVI User’s Guide

Chapter 5: Basic Tools

519

Note

To use a single DN value, enter that value in both the Min Thresh Value and

Max Thresh Value threshold text boxes. Only pixels that fall within the entered DN range will be considered in making the segmentation image. All other pixels will have an output value of 0.

4. In the Population Minimum text box, enter the minimum number of pixels in a segment.

5. Use the arrow toggle button to select either 4 or 8 neighbors to be considered for the connectivity.

6. Select File or Memory output.

7. Click OK.

The resulting segmentation image filename appears in the Available Bands List.

ENVI User’s Guide

Segmenting Images

520

Regions of Interest

Chapter 5: Basic Tools

Use Region of Interest to access common ROI functions such as defining, saving, restoring, deleting, exporting, and reconciling ROIs. Also use it to create classification images from ROIs or to convert image values to ROIs.

Note

Each function described in this section can also be accessed from within the ROI

Tool dialog or from the Display Tools menu. For detailed instructions, see

“Defining Regions of Interest” on page 289.

Defining Regions of Interest

To begin ROI definition:

1. Select Basic Tools

Region of Interest ROI Tool.

2. The ROI Definition dialog appears.

For detailed instructions, see

“Defining Regions of Interest” on page 289.

Restoring Saved ROI Files

To restore previously saved ROI files:

1. Select Basic Tools

Region of Interest Restore Saved ROI File.

2. Select the desired input file.

Saving ROIs to Files

1. To save regions of interest currently in memory to a file, select Basic

Tools

Region of Interest Save ROIs to File.

2. Enter an output filename with the extension

.roi for consistency.

Deleting ROIs

1. Select Basic Tools

Region of Interest Delete ROIs.

2. When the Delete Regions dialog appears, click on the names of the regions to be deleted.

3. Click OK to permanently delete those ROIs.

Regions of Interest

ENVI User’s Guide

Chapter 5: Basic Tools

521

Exporting ROIs to EVFs

Use Export ROIs to EVFs to export ROIs to ENVI vector files.

1. Select Basic Tools

Regions of Interest Export ROIs to EVFs.

2. In the file selection dialog, select the input file associated with the ROIs.

The Export Region to EVF dialog appears.

For details, see “Exporting ROIs to ENVI Vector Files” on page 316.

Exporting ROIs to the n-D Visualizer

Use Export ROIs to n-D Visualizer to export selected ROIs to the n-D Visualizer so you can see the distribution of the points within your ROIs and between your ROIs.

This option is very useful for checking the separability of your classes when you use

ROIs as input into supervised classifications.

1. Select Basic Tools

Regions of Interest Export ROIs to n-D Visualizer.

2. Select a ROI to export by clicking on the ROI name.

Note

To select all of the ROIs, click Select All Items.

3. Click OK.

An n-D Visualizer window and n-D Controls dialog appear.

For detailed instructions, see

“Exporting ROIs to the n-D Visualizer” on page 316.

Saving ROIs to an ASCII File

Use Output ROIs to ASCII to output ROIs to an ASCII text file. You can output

ROI locations in pixel or line values, or as one-dimensional pointers. You can also output map information, latitude and longitudes, and band data values for every ROI

location. For detailed instructions, see “Exporting ROIs to ASCII” on page 317.

1. Select Basic Tools

Regions of Interest Output ROIs to ASCII.

2. When the file selection dialog appears, select the input file and perform any spectral subsetting.

3. Click OK.

ENVI User’s Guide

Regions of Interest

522

Chapter 5: Basic Tools

4. Select the ROIs to output.

Note

To edit the ASCII output, see

“Editing ASCII Output Format” on page 318.

5. Enter or choose an output filename and click OK.

Reconciling ROIs

Use Reconcile ROIs to apply ROIs defined in one image size to images of different sizes.

1. Select Basic Tools

Region of Interest Reconcile ROIs.

2. When the Reconcile ROIs Parameters dialog appears, click on the ROIs to select them.

For detailed instructions, see

“Reconciling ROIs” on page 307.

Regions of Interest

Figure 5-16: Reconcile ROIs Parameters Dialog

ENVI User’s Guide

Chapter 5: Basic Tools

523

Reconciling ROIs via Map

Use Reconcile ROIs via Map to apply ROIs defined in one georeferenced image to another, overlapping, georeferenced image.

1. Select Basic Tools

Reconcile ROIs via Map.

2. When the Reconcile ROIs via Map Parameters dialog appears, select the desired ROIs by clicking on the names.

3. Select the source file where the ROIs were drawn.

4. Select the georeferenced file that the ROIs will be reconciled to and click OK.

The ROIs are listed in the ROI Tool dialog.

For detailed instructions, see

“Reconciling ROIs via Map” on page 309.

Converting Band Values to ROIs

Use Band Threshold to ROI to convert specific image values and ranges to Regions of Interest.

1. Select Basic Tools

Region of Interest Band Threshold to ROI.

2. When the Image Threshold to ROI Input Band dialog appears, select the input band for the thresholding.

For detailed instructions, see

“Converting Band Values to ROIs” on page 309.

Creating Class Images from ROIs

Use Create Class Image from ROIs to convert selected ROIs into an ENVI classification image. The class colors will be the same as the ROI colors.

1. Select Basic Tools

Region of Interest Create Class Image from ROIs.

The Classification Image from ROIs dialog appears.

2. In the list of ROIs, select ROIs to use by clicking on the ROI names.

3. Click OK.

The Classification Image from ROIs Parameters dialog appears.

For detailed instructions, see

“Creating Class Images from ROIs” on page 311.

ENVI User’s Guide

Regions of Interest

524

Chapter 5: Basic Tools

Create Buffer Zone from ROIs

Use Create Buffer Zone from ROIs to create a buffer zone image in which every pixel has a floating point or integer value that is defined as the distance from that pixel to the nearest pixel of the selected ROI.

1. Select Basic Tools

Region of Interest Create Buffer Zone from ROIs.

The Classification Image from ROIs dialog appears.

2. In the list of ROIs, select ROIs to use by clicking on the ROI names.

3. Click OK.

The Classification Image from ROIs Parameters dialog appears.

For detailed instructions, see

“Calculating Buffer Zone Images for ROIs” on page 310.

Compute ROI Separability

Use Compute ROI Separability to compute the separability between selected ROI pairs for a given input file.

1. Select Basic Tools

Region of Interest Compute ROI Separability.

The Classification Image from ROIs dialog appears.

2. In the list of ROIs, select the pair of ROIs to use by clicking on the ROI names.

3. Click OK.

The Classification Image from ROIs Parameters dialog appears.

For detailed instructions, see

“Computing ROI Separability” on page 312.

Hiding the ROI Tool Dialog

To remove the ROI dialog from the screen or hide it without erasing ROIs from your images, select one of the following options:

• In the ROI Tool dialog, select Options

Hide Window.

• In the Window Finder, double-click on the window name.

Regions of Interest

ENVI User’s Guide

Chapter 5: Basic Tools

Unhiding the ROI Tool Dialog

To unhide the ROI Tool dialog, select one of the following options:

• In the Window Finder, click on the window name.

• From the Display menu, select Overlay

Region of Interest.

525

ENVI User’s Guide

Regions of Interest

526

Mosaicking Images

Chapter 5: Basic Tools

Use Mosaicking to mosaic both pixel-based and georeferenced images.

Note

You may also access this function from the Map menu. For details about using this function, see

“Image Mosaicking” on page 888.

1. Select Basic Tools

MosaickingPixel-Based or Georeferenced.

2. From the Import menu, select images for the mosaic.

3. When the standard ENVI file selection dialog appears, select the desired file.

Load as many files as desired for the mosaic.

4. Position each one in the output file by either entering the desired upper left corner coordinate or by clicking and dragging the schematic image outline for each image to the desired location (see

“Image Mosaicking” on page 888 for a

more detailed description).

5. Click OK to create the mosaic.

Mosaicking Images

ENVI User’s Guide

Chapter 5: Basic Tools

Masking

527

Use masking to create image masks. A mask is a binary image that consists of values of 0 and 1. When a mask is used in a processing function, the areas with values of 1 are processed and the masked 0 values are not included in the calculations.

Masking is available for selected ENVI functions including statistics, classification, unmixing, matched filtering, continuum removal and spectral feature fitting.

Figure 5-17: Example Mask Image from a Data Range and Imported ROI

Building Masks

Use Build Mask to build image masks from specific data values (including the data ignore value), ranges of values, finite or infinite values, Regions of Interests (ROIs),

ENVI vector files (EVFs), and annotation files. You can use any combination of input to define a mask and you can permanently apply a mask to an image.

Note

Masks can be applied on-the-fly when using specific ENVI functions. These functions include statistics, classification, unmixing, matched filtering, continuum removal, and Spectral Feature Fitting.

ENVI User’s Guide

Masking

528

Chapter 5: Basic Tools

Setting Mask Sizes

The size of the mask can be set to the same size as a displayed image or to the size parameters that you entered manually:

1. Select Basic Tools

MaskingBuild Mask.

2. Select a display number or select No Display. The #n Mask Definition dialog appears. If a display number was selected, the number of samples and lines are automatically entered in the Samples and Lines parameters.

Note

If no display windows are open, or if you selected No Display, the Mask

Definition dialog appears directly and you must enter the desired number of samples and lines to define the size of the mask image.

Masking

Figure 5-18: Mask Definition Dialog

ENVI User’s Guide

Chapter 5: Basic Tools

529

Note

If the input file has a data ignore value, then the dialog opens with the value automatically added to the Selected Attributes for Mask list. The two numbers shown with the filename indicate the data ignore value in the file, and the bracketed word [All] refers to which bands in a multiband file must contain the data ignore value in order for a pixel to be masked.

Masking Options

Options in the Mask Definition dialog include importing data values, importing annotations, masking finite values, masking non-numbers and infinite data values, using ROIs and EVFs with the mask, and selecting areas for masking.

Importing Data Values and Ranges

1. In the Mask Definition dialog, select Options

Import Data Range. The

Select Input for Mask Data Range dialog appears.

2. Use this dialog, the select the input file for the data range. The Input for Data

Range Mask dialog appears.

3. Click the Select New Input button if you need to change the input file.

4. Enter a minimum and/or maximum value in the Band Min Value and Band

Max Value text boxes.

Note

If the input file has a data ignore value, then the dialog opens with the value automatically entered in the Band Min Value and Band Max Value text boxes.

5. Select either Mask pixel if ALL bands match range or Mask pixel if ANY

bands match range. The ALL option includes all pixels that are in the data range for all bands (a logical AND operation). The ANY option includes all pixels that are in the data range for any band (a logical OR operation)

6. Click OK to enter the range into the mask definition list.

Note

If you enter only a minimum or maximum value and click OK, the data’s actual maximum or minimum, respectively, will be used as the other end value.

ENVI User’s Guide

Masking

530

Chapter 5: Basic Tools

Including Annotations

• To include an annotation file in the mask, select Options

Import

Annotation and select the desired input file.

• To include the currently displayed annotation shapes in the mask, select

Options

Import Displayed Annotation.

Note

Only rectangles, ellipses, and polygons are imported into the mask definition.

Masking Finite Values

To build a mask of all finite data values:

1. Select Options

Mask Finite Values.

2. In the band selection dialog, select a band and click OK.

The band is listed in the Mask Definition dialog.

Masking Non-Numbers and Infinite Values

To produce a mask of all NaN (Not a Number) and Inf (Infinite) data values:

1. In the Mask Definition dialog, select Options

Mask “NaN”/ “Inf” Values.

2. In the band selection dialog, select a band and click OK.

The band is listed in the Mask Definition dialog.

Including Regions of Interest

Use Import ROIs or Import ROI Intersection to include Regions of Interest in a mask as described in the following sections:

Including Standard ROIs

1. In the Mask Definition dialog, select Options

Import ROIs.

2. When the Mask Definition Import ROI dialog appears, select the desired ROIs by clicking on the ROI names.

3. Click OK.

Note

All imported ROIs are treated as a single mask layer.

Masking

ENVI User’s Guide

Chapter 5: Basic Tools

531

Including ROI Intersections

Use Import ROI Intersection to calculate the intersection of two or more ROIs on the-fly and include the result in a mask. When the intersection of the ROIs is calculated, a point type ROI is created from the intersecting points.

1. In the Mask Definition dialog, select Options

Import ROI Intersection.

2. In the Mask Input ROI Intersection dialog, click on the names of the intersecting regions, then click OK.

The new ROI is listed in the Mask Definition dialog.

Note

All of the selected regions must intersect.

Including ENVI Vector Files (EVFs)

1. In the Mask Definition dialog, select Options

Import EVFs.

2. When the Mask Definition Input EVFs dialog appears, select the desired vector file to input by clicking on the filename.

3. Click OK.

Selecting Areas

Select from the following options to define mask areas:

• To set the defined areas in the mask to 1 (On) or to 0 (Off), select Options

Selected Areas On/Off. The mask is built using a Logical OR or Logical

AND operation between all of the items in the list. The default, Logical OR, uses all the defined areas to make the mask. Using the Logical AND masks only the areas where all of the defined areas overlap.

Note

Selected areas are those pixels that satisfy the masking criteria.

• To define the mask using only those areas where the listed data ranges, annotation shapes, and/or ROIs overlap, select Options

Selected

Attributes [Logical AND].

• To use all the defined areas to make the mask, select Options

Selected

Attributes [Logical OR].

ENVI User’s Guide

Masking

532

Chapter 5: Basic Tools

Deleting Attributes

To delete an item from the Select Attributes list in the Mask Definition dialog, highlight the item and click Delete Item.

Clearing the Attribute List

To remove all items from the Select Attributes list in the Mask Definition dialog, click the Clear All Items button.

Saving Masks

1. In the Mask Definition dialog, select output to File or Memory.

2. Click Apply.

Closing the Masking Dialog

To close the Mask Definition dialog, click Cancel.

Applying Masks

Use Apply Mask to permanently apply a mask to an image, giving that the masked out value is what you specify.

1. Select Basic Tools

MaskingApply Mask.

2. When the Apply Mask Input File dialog appears, select the desired input file and any spatial or spectral subsets.

3. If needed, use the Mask Options pull-down button to create a mask. This menu contains the following options:

Build Mask — Use this option to access the Mask Definition dialog, which is described in

“Building Masks” on page 527.

Mask Data Ignore Values [All Bands] — Choose this option to build a mask that includes all the pixels for which the data ignore value occurs in all bands (a logical AND operation).

Mask Data Ignore Values [Any Band] — Choose this option to build a mask that includes all the pixels for which the data ignore value occurs in any band (a logical OR operation).

Mask NaNs [All Bands] — Choose this option to build a mask that includes all pixels which have a value of NaN in all bands (a logical AND operation).

Masking

ENVI User’s Guide

Chapter 5: Basic Tools

533

Mask NaNs [Any Band] — Choose this option to build a mask that includes all pixels which have a value of NaN in any band (a logical OR operation).

Note

NaN and Infinity values are treated the same in ENVI. Infinity values are masked along with NaNs. Moreover, the Mask NaNs options are only available for files containing floating point, double-precision floating, complex floating, or double-precision complex data types.

When one of the latter four mask options is chosen, the mask is automatically built and named either

<basename>_iv_mask

, or < basename>_nan_mask

, where

<basename>

is the name of the selected input file and the mask is made from either ignore values ( iv

) or NaNs ( nan

). In the case where the selected input file is in memory, then the mask is assigned a temporary filename.

4. Specify the mask by clicking the Select Mask Band button and selecting the desired mask from the list of available bands. Only mask images that are the same size as the input band are available.

Note

To clear the selected mask band, select Mask Options

Clear Mask

Band.

5. When the desired input is selected, click OK.

6. When the Apply Mask Parameters dialog appears, enter the desired value in the Mask Value text box.

Note

All areas in the input images where the mask equals zero are set to this mask value.

7. Enter an output filename or select output to memory.

ENVI User’s Guide

Masking

534

Calibration Utilities

Chapter 5: Basic Tools

Use Calibration Utilities to apply calibration factors to ASTER, AVHRR, MSS,

QuickBird, TM and TIMS data, and to use a variety of atmospheric correction techniques.

ASTER Radiance Calibration

Use the ASTER Radiance calibration utility to extract ASTER 1A/1B radiometric calibration and apply calibration information from HDF attributes. For ASTER level

1B data, the byte-scaled radiance data is converted into floating point radiance units.

For ASTER level 1A data, a complete calibration to radiance is performed. For detailed instructions, see

“ASTER Radiance Data” on page 558.

AVHRR Calibration

Use the AVHRR calibration utility to calibrate AVHRR data from the NOAA 12, 14,

15, 16 and 17 satellites. Bands 1 and 2 are calibrated to percent reflectance and bands

3, 4, and 5 are calibrated to brightness temperature, in degrees Kelvin. For detailed

instructions, see “Calibrating AVHRR Data” on page 559.

Landsat MSS Calibration

Use Landsat MSS calibration to convert Landsat MSS digital numbers to radiance or exoatmospheric reflectance (reflectance above the atmosphere) using published post-

launch gains and offsets (see “Landsat TM Calibration” on page 535 for more

details):

1. Select Basic Tools

PreprocessingCalibration UtilitiesLandsat

MSS.

2. When the MSS Calibration Input File dialog appears, select the input file and perform any subsetting using the standard ENVI file selection procedures.

3. Click OK. The MSS Calibration Parameters dialog appears.

4. From the Satellite button menu, select the satellite type.

5. Enter the data acquisition month, day, year, and sun angle into the appropriate text boxes.

6. Select the output type by clicking the Radiance or Reflectance toggle buttons.

Calibration Utilities

ENVI User’s Guide

Chapter 5: Basic Tools

535

7. Select either File or Memory output.

8. Click OK to start the function.

The MSS Calibration Status window appears with the output filename listed and the percent completed displayed.

Landsat TM Calibration

Use Landsat TM calibration to convert Landsat TM or ETM digital numbers to radiance or exoatmospheric reflectance (reflectance above the atmosphere) using published post-launch gains and offsets (see http://landsat7.usgs.gov/cpf/cpf.php

and http://edcftp.cr.usgs.gov/pub/metadata/satellite/landsat7.tar.gz

).

The spectral radiance (L

λ

) is calculated using the following equation:

L

λ

= LMIN

λ

+

LMAX – LMIN

----------------------------------------------

QCALMAX

QCAL where QCAL is the calibrated and quantized scaled radiance in units of digital numbers, LMIN

λ

is the spectral radiance at QCAL = 0, LMAX

λ

is the spectral radiance at QCAL = QCALMAX, and QCALMAX is the range of the rescaled radiance in digital numbers. LMIN

λ

and LMAX

λ

are derived from tables provided in the Landsat Technical Notes (August 1986) with the information provided through

the TM Calibration Parameters dialog ( Figure 5-19 ) in ENVI. QCALMAX is 255 for

all TM data and 127 for all MSS data except Band 4 (0.8 to 1.1

µm), which is 63 for certain time periods (data acquired before February 1, 1979 for Landsat 1-3 and processed before October 22, 1982). The resulting radiance (L

λ

) is in the units of milliwatts per square centimeter per steradian per micrometer (mW/(cm

2

*sr*

µm)).

The exoatmospheric reflectance (

ρ p

) is calculated using the following equation:

ρ

p

=

π L

λ

λ

2 d

--------------------------------------

ESUN cos

θ

s where L

λ

is the spectral radiance, d is the Earth-Sun distance in astronomical units,

ESUN

λ

is the mean solar exoatmospheric irradiance, and

θ s

is the solar zenith angle in degrees. ESUN

λ

is derived from tables provided in the Landsat Technical Notes

(August 1986). The resulting reflectance is unitless.

TM band 6, if present, is converted to temperature. If 7 bands are input, the 6th band is assumed to be the thermal infrared band. If only 6 bands are input, then it is assumed that there is no thermal infrared band.

ENVI User’s Guide

Calibration Utilities

536

Chapter 5: Basic Tools

For Landsat 7 GeoTIFF files that do not contain calibration coefficients, you can use

Landsat TM calibration to specify the calibration coefficients and other related parameters, or you can extract the parameters from a Web server.

1. Choose one of the following options from the main ENVI menu bar:

• Select Basic Tools

Preprocessing Calibration Utilities Landsat

TM , or

• Select Basic Tools

Preprocessing Data-Specific Utilities

Landsat TM

Landsat TM Calibration, or

• Select Spectral

Preprocessing Calibration Utilities Landsat

TM, or

• Select Spectral

Preprocessing Data-Specific Utilities Landsat

TM

Landsat TM Calibration.

2. When the TM Calibration Input File dialog appears, select the input file and perform any subsetting using the standard ENVI file selection procedures.

3. Click OK. The TM Calibration Parameters dialog appears.

Calibration Utilities

Figure 5-19: TM Calibration Parameters Dialog

ENVI User’s Guide

Chapter 5: Basic Tools

537

• For Landsat 7 HDF files, the data acquisition date information, gains and bias factors, and sun elevation and azimuth are automatically read from the header.

• For Landsat 7 GeoTIFF files, these parameters can be obtained from the

EROS Data Center as CPF files and MetaData files. They may also be acquired through the Get Calibration Parameters from Web button, which accesses the RSI web server for this information. The Earth-Sun distance used in the calibration is based on the data acquisition date and calculated from a table in the Landsat 7 User’s Guide dated 5/1/2001.

Note

If the input filename does not follow the Landsat 7 file-naming convention, the data acquisition date information will default to

January 1, 1984

and the sun elevation to

90

degrees.

4. Choose from the following options:

• Enter or change any of the parameters as necessary.

• To download the calibration parameters from the RSI Web server, click the

Get Calibration Parameters from Web button.

Note

You must have an active internet connection to use this option. Moreover, you may not be able to access this site through a firewall or proxy server. In this case, your connection will be timed out within 15 seconds.

The information is obtained from the Web server and automatically entered into the corresponding fields.

• If you are using a file that does not follow the Landsat 7 file-naming convention, follow these steps:

A. When the warning dialog appears, click OK.

The TM Web Calibration Parameters dialog appears.

B. Enter the original filename, or select the Date/Path/Row/Band button and enter the corresponding information.

The date, path, row, and band information is used to derive a filename based on the Landsat 7 naming convention.

C. In the TM Web Calibration Parameters dialog, click OK.

ENVI User’s Guide

Calibration Utilities

538

Chapter 5: Basic Tools

5. Select the desired output type using the Radiance and Reflectance toggle buttons.

6. Provide Scale: Min and Scale: Max values if these values are not provided by a header or the Web server.

The minimum scale and maximum scale values are satellite parameters set for each band. These values are used to derive the gains and offsets.

7. Choose either File or Memory output.

8. Click OK to perform the calibration.

The TM Calibration Status window displays the progress of the operation. When complete, the output file is listed in the Available Bands List.

QuickBird Radiance Calibration

DigitalGlobe’s QuickBird image data is typically distributed in relative radiance. Use the QuickBird Radiance calibration utility to convert the relative radiance into absolute radiance in units of [

( µW ⁄ (

2

⋅ )

]. The calibration is performed using the calibration factors in the QuickBird metadata file (the absCalFactor in the

.imd

file). The units are converted from [

W

⁄ ( m

2 using the following nominal bandpass widths:

⋅ str

)

] into [

( µW ⁄ (

2

⋅ )

]

Pan band:

Multispectral Band 1:

Multispectral Band 2:

Multispectral Band 3:

Multispectral Band 4:

450 nm

70 nm

80 nm

60 nm

140 nm

The gain factors that were applied can be found in the ENVI Header file of the calibrated image.

To use the QuickBird Radiance calibration utility perform the following steps.

1. From the main ENVI menu, select Basic Tools

Preprocessing

Calibration Utilities

QuickBird Radiance.

2. In the file selection dialog, select the QuickBird image you wish to calibrate and perform any spatial or spectral subsetting. Select only an original unmodified QuickBird image product.

Calibration Utilities

ENVI User’s Guide

Chapter 5: Basic Tools

539

If ENVI is unable to locate the associated QuickBird Metadata file, you will be prompted to select it.

The QuickBird Calibration Parameters dialog appears.

3. To scale the calibrated result into unsigned integers set the Scale Output to

Integers toggle button to Yes and enter a scale factor. To output the result in floating point set the toggle button to No.

Scaling the result into integers will produce a file that is half the size (in bytes) as the floating point result, however the precision is typically reduced to three digits.

Note

The maximum value that an unsigned integer can hold is 65,535.

4. Choose output to File or Memory for the calibrated result.

5. Click OK to start the processing.

Using FLAASH in ENVI

If you have the FLAASH plug-in to ENVI, refer to the FLAASH User’s Guide for detailed information on the use of the FLAASH calibration utility.

Using ATREM in ENVI

You can operate the popular ATmosphere REMoval (ATREM) program directly from

ENVI. ENVI simply provides an interface to the ATREM program. The executable code is not distributed with ENVI. ATREM was developed and distributed by the

Center for the Study of Earth from Space (CSES), Cooperative Institute for the

Research in Environmental Sciences (CIRES), University of Colorado, Boulder.

Note

The ATREM executable code is no longer available for distribution.

Use ATREM to calculate scaled surface reflectance values from hyperspectral radiance data using an approximate atmospheric radiative transfer modeling technique. Radiative transfer modeling is used to calculate the atmospheric transmittance of gases and molecular and aerosol scattering. The water vapor amount is derived on a pixel-by-pixel basis using the 0.94

µm and 1.14 µm water vapor bands and a three channel ratioing technique. For more detailed information see the

ATmosphere REMoval Program User’s Guide.

ENVI User’s Guide

Calibration Utilities

540

Chapter 5: Basic Tools

If you have the ATREM executable, place it in the ENVI

\bin directory and ENVI will automatically use it. If it is located in another directory, a parameter can be set that points to the correct location (see

“Setting ATREM Output Parameters” on page 543). When ATREM is executed using ENVI, the input information needed is

generated and the ATREM process is spawned by ENVI automatically. The output from ATREM is automatically opened in ENVI and it appears in the Available Bands list upon completion.

Selecting Input Files

Note

If you want to use a subset, use Basic Tools

Resize Images before running

ATREM.

1. Select Basic Tools

PreprocessingCalibration UtilitiesATREM.

2. When the standard ENVI file selection dialog appears, select a file.

Supplying Wavelengths

Wavelengths are required to run ATREM. If your input data does not include wavelengths in the ENVI header, a prompt appears asking you to supply the wavelengths from an ASCII file:

Select the column that contains the wavelengths and the column that contains full width half maximum (FWHM) values, if included.

The wavelengths and FWHM values must be in units of micrometers.

Inputting AVIRIS or HYDICE Data

If your input data is AVIRIS or HYDICE, select the scaled calibrated radiance image.

See the ATREM User’s Guide for details.

Calibration Utilities

ENVI User’s Guide

Chapter 5: Basic Tools

541

Setting ATREM Input Parameters

Use the ATREM Input Parameters dialog to select sensor types (AVIRIS, HYDICE, or User Defined) and to enter input data parameters.

1. When the ATREM Input Parameters dialog appears select the data sensor type from the Sensor button menu.

Note

If you select User Defined, select the file that contains the scale factors from the file selection dialog that appears.

The user defined scale factor file must contain one scale factor for each band that is used to scale the input radiance data to units of microwatts/(cm

2

*nm*steradian) following the model of: scale_factor * DN = 1 microwatt / (cm

2

* nm * steradian)

The user defined scale factor file contains two columns of ASCII data, band number and scale factor for every band in the data file.

2. Enter the altitude of the sensor in kilometers.

3. Enter the spectral resolution of the input data in nanometers.

Note

If your ENVI header file contains FWHM values, no value is required, the header values are used instead, and this dialog box does not appear. The

FWHM values must be in units of micrometers.

4. Select the date and enter the time (in GMT) of the data overflight.

Note

For AVIRIS data, this information is read from the header if possible.

5. Enter the data scene center latitude and longitude. To change the latitude and longitude from degrees, minutes, seconds to decimal degrees, click on the

DD<->DMS button.

Note

Enter negative values to indicate south latitudes and west longitudes.

ENVI User’s Guide

Calibration Utilities

542

Chapter 5: Basic Tools

Note

For AVIRIS data, this information is read from the header if possible.

6. Enter the channel ratio parameters or select from the default parameters used to derive the column water vapor amounts for every pixel in the data.

7. Enter the starting wavelength value and number of channels to average for the windows and water vapor absorption bands for both or either of the 0.94

µm and 1.14

µm water vapor bands.

The channel ratio parameters are used to derive the column water vapor amounts for every pixel in the data scene. The amount of water vapor is determined by using a three-channel ratio. Several bands in the water absorption feature are averaged and ratioed against two sets of averaged window channels adjacent to the water absorption feature.

One or both of the water vapor absorption bands can be used to derive the amount of column water vapor. If both the 0.94

µm and the 1.14 µm water vapor absorption bands are used, the amount of column water vapor used is the average of the derived amount for each absorption band.

In some cases only one of the water vapor absorption bands should be used.

For example, if your site contains a large amount of iron-rich soils and minerals, only the 1.14

µm water vapor band should be used.

• To use only one water vapor band, enter the same parameters into both the

0.94 and 1.14 text boxes.

• For the iron-rich example, enter the same wavelengths that are in the 1.14 text boxes into the 0.94 text boxes.

• To use default channel ratio parameters, select from the Apply Defaults button menu. For more information, see the ATREM User’s Guide.

8. Select which of the seven atmospheric gases should be modeled and removed during the reflectance calculation by clicking in the check box next to the gas name.

Note

By default, all the gases are selected.

9. Select an aerosol model using the pull-down selections.

10. Enter a visibility for the conditions during the overflight or click the arrow toggle button to enter an aerosol optical depth measured at the time of the overflight.

Calibration Utilities

ENVI User’s Guide

Chapter 5: Basic Tools

543

11. Select a standard atmospheric model from the pull-down selections and enter a vertical column ozone amount in atm-cm units. Enter the average surface elevation of the data scene in kilometers.

12. Set the output parameters as described in the next section.

Setting ATREM Output Parameters

Use the ATREM Output Parameters dialog to change the output filenames, scale factor, output spectral resolution, and execution path string. The output ATREM parameters file contains the defined parameters in the necessary ATREM input format. ENVI automatically executes ATREM using this file as input. The output image file contains the output apparent reflectance data scaled by the output data scale factor into two-byte integers.

1. In the ATREM Input Parameters dialog, click the Edit Output Parameters button. The ATREM Output Parameters dialog appears.

2. Select from the following options:

• To change any of the default output filenames, enter the new filenames.

The output ATREM parameters file contains the defined parameters in the necessary ATREM input format. ENVI automatically executes ATREM using this file as input. The output image file contains the output apparent reflectance data scaled by the output data scale factor into two-byte integers. The output water vapor image contains the total column water vapor amount for every pixel in cm * 1000 so it is two-byte integer data.

The output transmission file is an ASCII file that contains 60 atmospheric transmittance spectra. For details on the file format, see the ATREM User’s

Guide.

• Change the Output Data Scale Factor if desired. The ATREM output apparent reflectance values, between 0 and 1, are multiplied by the scale factor to make them into two-byte integer data.

• If desired, enter an output spectral resolution.

If no value is entered for this parameter, the output spectral resolution will be the same as the input. See the ATREM User’s Guide for more information.

• Enter the directory path and name of the ATREM executable. ENVI automatically spawns the executable.

3. In the Output Parameters dialog, click OK.

ENVI User’s Guide

Calibration Utilities

544

Chapter 5: Basic Tools

Executing ATREM

After setting the ATREM input and output parameters, click OK in the Input

Parameters dialog to start the ATREM process.

ENVI generates the needed ATREM input file and spawns the ATREM process. A window appears displaying the line number that ATREM is working on. When the process is completed, ENVI opens the resulting files, and the water vapor image and the apparent reflectance bands are listed in the Available Bands List.

Flat Field Calibration

Use Flat Field calibration to normalize images to an area of known “flat” reflectance.

This is particularly effective for reducing hyperspectral data to relative reflectance.

The method requires that you select a Region Of Interest (ROI) prior to execution.

The average spectrum from the ROI is used as the reference spectrum, which is then divided into the spectrum at each pixel of the image.

1. Define an ROI over a spectrally flat area (see “Drawing ROIs” on page 291).

2. Select Basic Tools

PreprocessingCalibration UtilitiesFlat Field.

3. When the Flat Field Calibration Input File dialog appears, select the input file and perform any subsetting.

4. Click OK.

5. When the Flat Field Calibration Parameters dialog appears, select the average spectrum to use for the flat field calibration by clicking on the desired ROI name in the column labeled Select Calibration from Regions. The selected

ROI name appears at the bottom of the window in the text box labeled Selected

Item.

6. Choose File or Memory output.

7. Click OK to start the calibration.

Calibration Utilities

ENVI User’s Guide

Chapter 5: Basic Tools

545

IAR Reflectance Calibration

Use IAR Reflectance calibration (Internal Average Relative Reflectance) to normalize images to a scene average spectrum. This is particularly effective for reducing hyperspectral data to relative reflectance in an area where no ground measurements exist and little is known about the scene. It works best for arid areas with no vegetation. An average spectrum is calculated from the entire scene and is used as the reference spectrum, which is then divided into the spectrum at each pixel of the image.

1. Select Basic Tools

PreprocessingCalibration UtilitiesIAR

Reflectance.

2. When the Calibration Input File dialog appears, select the input file and perform any subsetting.

3. Click OK.

4. When the IARR Calibration Parameters dialog appears, select output to File or

Memory.

5. Click OK.

If a statistics file doesn’t exist, a processing status window appears while the statistics are calculated and another status window appears while the calibration is performed.

The calibrated data are added to the Available Bands list when the calibration is complete.

ENVI User’s Guide

Calibration Utilities

546

Chapter 5: Basic Tools

Empirical Line Calibration

Use Empirical Line calibration to force spectral data to match selected field reflectance spectra. A linear regression is used for each band to equate DN and reflectance. This is equivalent to removing the solar irradiance and the atmospheric path radiance. The following equation shows how the empirical line gain and offset values are calculated.

Reflectance (field spectrum) = gain x radiance (input data) + offset

ENVI’s empirical line calibration requires at least one field, laboratory, or other reference spectrum; these can come from spectral profiles or plots, spectral libraries,

ROIs, statistics or from ASCII files. Input spectra will automatically be resampled to match the selected data wavelengths. If more than one spectrum is used, then the regression for each band will be calculated by fitting the regression line through all of the spectra. If only one spectrum is used, then the regression line will be assumed to pass through the origin (zero reflectance equals zero DN). The calibration can also be performed on a data set using existing factors.

Computing Factors and Calibrating

Typically, you should choose a dark and a bright region in the image for use in the empirical line calibration (providing that reference spectra are available for these regions). This provides a more accurate linear regression. Using as many paired data/field spectra as you can will also improve the calibration. At least one spectral pair is necessary.

Note

To use spectra from ROIs, define the ROIs prior to running this function.

1. Select Basic Tools

PreprocessingCalibration UtilitiesEmpirical

Line

Compute Factors and Calibrate.

2. When the Empirical Line Input File dialog appears, select the input file and perform any subsetting.

Calibration Utilities

ENVI User’s Guide

Chapter 5: Basic Tools

3. Click OK. The Empirical Line Spectra dialog appears.

547

Figure 5-20: Empirical Line Spectra Dialog

4. Collect image spectra and reference spectra, and pair spectra using the procedures described in the following sections.

Collecting Data (Image) Spectra

Use the Data Spectra Collection dialog to collect the image spectra (un-calibrated spectra), which can come from a plot or profile, a spectral library, ROI, or ASCII spectrum. Use the Import menu and other interactive options to import and collect spectra.

1. In the Empirical Line Spectra dialog, click the Data Spectra Import Spectra button.

2. Collect spectra using the Import menu as described in

“Importing Endmember

Spectra” on page 583 or using the black draw widget at the top of the dialog as

described in

“By Dragging-and-Dropping Spectra” on page 582.

ENVI User’s Guide

Calibration Utilities

548

Chapter 5: Basic Tools

3. After the data spectra have been selected, click Apply. The spectra names are entered into the Empirical Line Spectra dialog.

4. Click Cancel to close the Data Spectra Collection dialog.

Collecting Field Spectra

After importing Data (image) spectra into the Empirical Line Spectra dialog, import the corresponding Field (reference) spectra.

1. In the Empirical Line Spectra dialog, click on the Field Spectra Import

Spectra button.

2. Collect spectra using the Import menu as described in

“Importing Endmember

Spectra” on page 583 or using the black draw widget at the top of the dialog as

described in

“By Dragging-and-Dropping Spectra” on page 582.

3. Click Apply to enter the spectra names.

4. Click Cancel to close the Field Spectra Collection dialog.

Pairing Spectra

After importing Data and Field (reference) spectra into the Empirical Line Spectra dialog, use the following procedure to pair the Data and Field (reference) spectra for use in the regression.

1. In the Empirical Line Spectra dialog, click on the data spectrum name in the top list to select it.

2. In the bottom list, click on the corresponding field spectrum name.

3. Click Enter Pair to associate the two spectra. The paired spectra are listed in the Selected Pairs text box.

4. Repeat the selection process for as many data and field spectra pairs as desired.

5. Click OK.

The Empirical Line Calibration Parameters dialog appears.

Calibration Utilities

ENVI User’s Guide

Chapter 5: Basic Tools

549

Completing the Calibration

1. After collecting and pairing spectra, choose File or Memory output in the

Empirical Line Calibration Parameters dialog.

Note

To save the correction coefficients in an ASCII file, enter a second file name in the Output Calibration Filename text box.

The default extension for correction coefficients files is

.cff

.

2. Click OK to start the calibration.

A processing status window appears while the calibration is performed. When the calibration is completed, the calibration factors are plotted in a standard ENVI plot window and the calibrated image data are added to the Available Bands list.

Calibrating Using Existing Factors

Use Calibrate Using Existing Factors to run Empirical Line Calibration using output correction factors that were saved during another calibration session.

1. Select Basic Tools

PreprocessingCalibration UtilitiesEmpirical

Line

Calibrate Using Existing Factors.

2. Select the input file and any spatial and spectral subsets using the standard

ENVI file selection procedures.

3. Click OK.

4. When the Enter Calibration Factors Filename dialog appears, choose a calibration factors file (

.cff

) created during a previous Empirical Line

Calibration session.

5. Click OK.

6. When the Empirical Line Calibration Parameters dialog appears, choose File or Memory output.

7. Click OK to begin the calibration.

ENVI User’s Guide

Calibration Utilities

550

Chapter 5: Basic Tools

Thermal Atmospheric Correction

Use Thermal Atm Correction to approximate and remove the atmospheric contributions to the thermal infrared data. For best results, perform this correction before converting your data to emissivity. The atmospheric correction algorithm used in ENVI is similar to the In-Scene Atmospheric Compensation algorithm, ISAC. For more detailed instructions, see

“Thermal IR Utilities” on page 568.

TIMS Radiance Calibration

Use TIMS Radiance to calibrate raw data from the NASA Thermal Infrared

Multispectral Scanner (TIMS) to radiance in units of W/m

2

/

µm/sr. For detailed

instructions, see “TIMS Utilities” on page 565.

Calculating Emissivity

Use Calculate Emissivity to use one of three techniques in ENVI to separate the emissivity and temperature information in radiance data measured with thermal infrared sensors. Both the Reference Channel and Emissivity Normalization techniques assume a fixed emissivity value and produce emissivity and temperature outputs. The Alpha Residuals technique does not provide temperature information.

Reference Channel Emissivity Calculation

Use Reference Channel to calculate emissivity and temperature values from thermal infrared radiance data. For detailed instructions, see

“Using Reference Channel

Emissivity” on page 572.

Emissivity Normalization

Use Emissivity Normalization to calculate emissivity and temperature values from thermal infrared radiance data. For detailed instructions, see

“Using Emissivity

Normalization” on page 573.

Alpha Residuals

Use Alpha Residuals to produce alpha residual spectra that approximate the shape of emissivity spectra from thermal infrared radiance data. For detailed instructions, see

“Using Alpha Residuals” on page 574.

Calibration Utilities

ENVI User’s Guide

Chapter 5: Basic Tools

General Purpose Utilities

551

Use General Purpose Utilities to replace bad lines with averages, perform dark subtractions, and to destripe data.

Replacing Bad Lines

Use Replace Bad Lines to replace bad data lines in image data. You must identify the position of the lines to replace before running the function by using the ENVI cursor position function (see

“Viewing Cursor Location and Value” on page 440 ).

Note

To interactively fix bad lines, see “Using the Spatial Pixel Editor” on page 418.

1. Select Basic Tools

PreprocessingGeneral Purpose Utilities

Replace Bad Lines. The Bad Lines Input File dialog appears.

2. Select an input file and perform any subsetting.

3. Click OK. The Bad Lines Parameters dialog appears.

ENVI User’s Guide

Figure 5-21: Bad Lines Parameters Dialog

General Purpose Utilities

552

Chapter 5: Basic Tools

4. In the Enter Bad Line text box, specify which bad lines to replace and press the Return or Enter key.

5. The line appears in the Selected Lines list.

• To remove that line from the list, click on the line.

• To save the line coordinates to a file, click Save.

• To restore the coordinates from a previously saved file, click Restore.

• To clear the list of lines to be replaced, click Clear.

6. In the Half Width to Average text box, enter the number of adjacent lines to be used as an average for calculation of the replacement line.

Note

The value is symmetrical around the line to be replaced. For example, the value

2

means that two lines on either side of the selected line will be averaged to calculate the replacement.

7. Click OK.

8. When the Bad Lines Output dialog appears, select output to File or Memory.

9. Click OK.

Using Dark Subtraction

Use Dark Subtract to apply atmospheric scattering corrections to the image data.

The digital number to subtract from each band can be either the band minimum, an average based upon a user defined region of interest, or a specific value.

1. Select Basic Tools

PreprocessingGeneral Purpose UtilitiesDark

Subtract.

2. When the Dark Subtract Input File dialog appears, select an input file and perform any subsetting.

3. Click OK. The Dark Subtraction Values dialog appears.

4. Select a Subtraction method as described in the following sections.

5. In the Dark Subtraction Values dialog, click OK.

6. When the Dark Subtract Parameters dialog appears, select output to File or

Memory.

General Purpose Utilities

ENVI User’s Guide

Chapter 5: Basic Tools

7. Click OK to start the operation.

553

Figure 5-22: Dark Subtraction Values Dialog

Selecting Band Minimum Subtraction

To automatically use the minimum DN value of each spectral band for the dark subtraction:

1. In the Dark Subtraction Values dialog, select the Band Minimum toggle button.

2. Click OK.

Selecting Region of Interest Subtraction

To use the average of an ROI in each spectral band as the value for dark subtraction

(ROIs must first be defined — see

“Defining Regions of Interest” on page 289):

1. In the Dark Subtraction Values dialog, select the Region of Interest toggle button.

2. From the list of available regions, select an ROI and click OK.

ENVI User’s Guide

General Purpose Utilities

554

Chapter 5: Basic Tools

Selecting User Value Subtraction

To enter a user-defined value to subtract from each band:

1. In the Dark Subtraction Values dialog, select the User Value toggle button. A list of the bands and a default value of 0.0000 appear under the Current

Subtraction Values label.

2. Click on one of the band names.

3. In the Edit Selected Item text box, enter the desired subtraction value. Press the Return or Enter key.

4. Edit the other band values as desired.

5. Click OK.

Applying Gain and Offset

Use Apply Gain and Offset to apply a simple gain and offset correction to a set of bands. ENVI multiplies the selected bands by an input gain value and adds an offset value that you define.

1. Select Basic Tools

PreprocessingGeneral Purpose UtilitiesApply

Gain and Offset.

2. Select an input file and any spatial and/or spectral subsetting. The Gain and

Offset Values dialog appears.

3. In the Gain Values list, click on a band name.

4. In the Edit Selected Item text box, edit the gain value of the item.

5. In the Offset Values list, click on a band name.

6. In the Edit Selected Item text box, edit the offset value of the item.

7. Repeat this selection and assignment of values for each band to be processed.

• To reset all of the bands to their original values, click Reset.

• To return to the main menu, click Cancel.

8. Click on the Output Data Type menu and select a data type for the output.

9. Select output to File or Memory.

10. Click OK.

A status window displays the status of the operation. The resulting bands are listed in the Available Bands List.

General Purpose Utilities

ENVI User’s Guide

Chapter 5: Basic Tools

555

Destriping Data

Use Destripe data to remove periodic scan line striping in image data. This type of striping is often seen in Landsat MSS data (every 6th line) and less commonly, in

Landsat TM data (every 16th line). When destriping the data, ENVI calculates the mean of every nth line and normalizes each line to its respective mean. In order for destriping to function properly, the data must be in the acquired format (horizontal strips) and cannot be rotated or georeferenced.

1. Select Basic Tools

PreprocessingGeneral Purpose Utilities

Destripe.

2. When the Destriping Data Input File appears, select the input file and perform any subsetting.

3. Click OK.

4. When the Destriping Parameters dialog appears, enter the number of detectors in the box labeled Number of Detectors. The number of detectors is the periodicity of the striping (e.g., for Landsat MSS, the value would be

6

).

Note

If the file type has been set in the header, the default is set automatically.

5. Select either File or Memory output.

Note

To return to the main menu at any time, click Cancel.

6. Click OK to start the operation.

ENVI User’s Guide

General Purpose Utilities

556

Chapter 5: Basic Tools

Applying Cross-Track Illumination Corrections

Use Cross-Track Illumination Correction to remove variation in the cross-track illumination of an image. Cross track illumination variations may be due to vignetting effects, instrument scanning, or other non-uniform illumination effects.

Along-track mean values are calculated and you can plot them to show the mean variation in the cross-track direction. A polynomial function, with the order defined by you, is fit to the means and used to remove the variation.

1. Select Basic Tools

PreprocessingGeneral Purpose Utilities

Cross-Track Illumination Correction.

2. When the Cross Track Illumination Input File dialog appears, select the input file and perform any spatial or spectral subsetting or masking. The Cross Track

Illumination Correction Parameters dialog appears.

3. Select the cross track direction by clicking in the check box next to either

Samples or Lines.

4. Select either an Additive or Multiplicative correction method. The Additive method will subtract the fitted polynomial from the data and the Multiplicative method will divide the data by the fitted polynomial.

5. Enter the desired polynomial order and click Plot Polynomial. A plot of the mean data values are displayed in red with the selected polynomial fit overlaid in white. It is best to use a low order polynomial so as not to remove the local variation in the data.

Note

You can change the polynomial order and plot it again.

6. Select output to Memory or File.

7. Click OK to start the processing.

Note

The Cross-Track Illumination Correction plot pull-down menus will not be active until you close the Cross Track Illumination Correction Parameters dialog.

General Purpose Utilities

ENVI User’s Guide

Chapter 5: Basic Tools

557

Converting Complex Data

Use Convert Complex Data to output selected images calculated from complex data. Image types included are: Real (real portion of number), Imaginary (imaginary portion), Power (log10 of magnitude), Magnitude (square root of sum of the squares of the real and imaginary), and Phase (arc tangent of imaginary divided by real).

1. Select Basic Tools

PreprocessingGeneral Purpose Utilities

Convert Complex Data.

2. Select an input data file and click OK.

3. When the Convert Complex Parameters dialog appears, select the output band functions by clicking in the check boxes next to the function names.

4. Select File or Memory output.

5. Click OK.

The calculated images appear in the Available Bands List.

Converting VAX to IEEE Data

Use the VAX to IEEE Converter to convert VAX floating point images to IEEE standard floating point. Most computers support the IEEE standard representation of floating point numbers, but DEC VAX computers still use their own internal floating point representation and some image data still are distributed in this format.

1. Select Basic Tools

PreprocessingGeneral Purpose Utilities

Convert VAX to IEEE.

2. When the VAX Floating Point Input File dialog appears, choose the file to be converted from the list of available files.

3. Click OK.

4. When the VAX to IEEE Parameters dialog appears, enter the VAX header size

(bytes).

5. Select one of the following options:

• To copy the header information into the output file as an embedded ENVI header, click Yes next to Copy Header.

• To copy only the data, click No.

6. Enter an output file name.

7. Click OK to convert the file.

ENVI User’s Guide

General Purpose Utilities

558

Data-Specific Utilities

Chapter 5: Basic Tools

Use Data-Specific Utilities to apply data-specific functions that work specifically on your data type.

Displaying HDF Global Attributes

Use View HDF Global Attributes to create a text report of any global attribute values that are present in an HDF scientific data (SD) file.

1. Select Basic Tools

PreprocessingData-Specific UtilitiesView HDF

Global Attributes.

2. When the file selection dialog appears, select the desired HDF SD file.

Any global attributes contained in the HDF file appear on-screen in a text report.

Saving Reports to ASCII Files

1. In the Report window, select File

Save Text to ASCII.

2. Enter or choose an output filename and click OK.

Note

To exit the report without saving the information to a file, select File

Cancel.

ASTER Radiance Data

Use the ASTER 1A/1B radiometric calibration tools to extract and apply calibration information from HDF attributes. For ASTER level 1B data, the byte scaled radiance data is converted into floating point radiance units. For ASTER level 1A data, a complete calibration to radiance is performed.

1. Select either Basic Tools

PreprocessingCalibration Utilities

ASTER Radiance or,

Basic Tools

PreprocessingData-Specific UtilitiesASTER

ASTER Radiance.

Data-Specific Utilities

ENVI User’s Guide

Chapter 5: Basic Tools

559

AVHRR Utilities

Use AVHRR Utilities to read and display information from the AVHRR header, calibrate AVHRR data to percent reflectance and brightness temperature, compute sea surface temperatures, and to use information in the data for georeferencing. The

AVHRR utilities support NOAA-12 through 17.

For details, see the following references:

Di, L. and D. C. Rundquist, 1994. A one-step algorithm for correction and calibration of AVHRR Level 1b data, Photogrammetric Engineering & Remote Sensing, Vol. 60,

No. 2, pp. 165-171.

Note

The calibration and sea surface temperatures should be calculated before georeferencing.

Displaying AVHRR Header Information

To display the header information from the AVHRR header:

1. Select Basic Tools

PreprocessingData-Specific Utilities

AVHRR

Display Header Information.

2. Select the desired input AVHRR data file and click OK.

The AVHRR File Information dialog appears. The header information is displayed.

Saving Header Info to ASCII Files

To save the header information to an ASCII file, select from the AVHRR File

Information dialog, File

Save Text to ASCII, and enter an output filename.

Calibrating AVHRR Data

Use Calibrate Data to calibrate AVHRR data from the NOAA 12 though 17 satellites. Bands 1 and 2 are calibrated to percent reflectance and bands 3, 4, and 5 are calibrated to brightness temperature, in degrees Kelvin.

1. Select Basic Tools

PreprocessingData-Specific Utilities

AVHRR

Calibrate Data.

2. Select the desired input AVHRR data file and perform any spatial and spectral subsetting.

ENVI User’s Guide

Data-Specific Utilities

560

Chapter 5: Basic Tools

Note

AVHRR data that has been scaled to 8-bit depth cannot be used to compute

SSTs because NOAA does not modify the calibration coefficients stored in the file’s 1b header.

3. When the AVHRR Calibrate Parameters dialog appears, select the satellite number from the Satellite button menu.

4. Select either File or Memory output.

5. Click OK to start the calibration.

Output bands 1 and 2 are in % reflectance, and output bands 3, 4, and 5 are in brightness temperature, in degrees Kelvin.

Building AVHRR Geometry Files

Use AVHRR Build Geometry File to calculate the geometry values for each pixel.

You may select which values to calculate: latitude, longitude, solar zenith, and/or sensor zenith angles.

For detailed instructions, see

“Building AVHRR Geometry Files” on page 917.

Georeferencing AVHRR Data

The AVHRR data, calibration results, and sea surface temperature image can be georeferenced using information from the AVHRR data themselves. Each line of data has 51 latitude and longitude values that can be used in the georeferencing.

For detailed instructions, see

“Georeferencing AVHRR Data” on page 918.

Computing Sea Surface Temperature

A sea surface temperature image, in degrees Celsius, is computed using AVHRR bands 3, 4, and 5. Currently, ENVI does not use a cloud or land mask in the sea surface temperature calculation. Four algorithms are available, one for daytime data and three for nighttime data: Day MCSST Split; Night MCSST Split; Night MCSST

Dual; and Night MCSST Triple. These algorithms differ in which bands are used to correct for the atmosphere, Split-window uses bands 4 and 5, Dual-window uses bands 3 and 4, and Triple-window uses bands 3, 4 and 5. The coefficients used for the

NOAA 12 and 14 satellites are based on March 1995 global drifting buoy and tropical

Pacific fixed buoy matchups. The coefficients used for the NOAA 15, 16, and 17 satellites are based on values provided in the NOAA KLM User’s Guide (see

Appendix D in http://www2.ncdc.noaa.gov/docs/klm for more information).

Data-Specific Utilities

ENVI User’s Guide

Chapter 5: Basic Tools

561

1. Select Basic Tools

PreprocessingData-Specific Utilities

AVHRR

Compute Sea Surface Temperature.

2. Select the desired input AVHRR data file and perform any spatial subsetting.

The AVHRR Sea Surface Temperature Parameters dialog appears.

Note

The input file must contain AVHRR bands 3, 4, and 5.

3. From the Satellite button menu, select the satellite name.

4. From the SST Algorithm pull-down menu, select the desired algorithm.

5. Select either File or Memory output.

6. Click OK.

The output sea surface temperature image is in degrees Celsius.

ENVISAT Utilities

Use Georeference AATSR, Georeference ASAR, or Georeference MERIS to g

eoreference your

ENVISAT AATSR, ASAR, or MERIS data with the geolocation information included in the ENVISAT file

.

ENVISAT imagery contains geolocation tie points that correspond to specific pixels in the image. These tie points can be used to automatically georeference the ENVISAT data without building a geometry file.

For detailed instructions, see

“Georeference ENVISAT” on page 920

.

IKONOS Utilities

Use Orthorectify IKONOS or Orthorectify IKONOS with Ground Control to orthorectify IKONOS data. For details, see

“Orthorectification using RPCs” on page 881.

ENVI User’s Guide

Data-Specific Utilities

562

Chapter 5: Basic Tools

Landsat MSS Utilities

Use Landsat MSS utilities to correct aspect ratios and to deskew Landsat

Multispectral Scanner (MSS) data.

Deskewing Data

Landsat MSS image data processed prior to 1978 typically contains systematic distortions caused by earth rotation and scan skew. Use MSS Deskewing to remove the skew by offsetting groups of scan lines based on the relationship between the orbital characteristics and latitude-dependent earth rotation characteristics.

1. Select Basic Tools

PreprocessingData-Specific UtilitiesLandsat

MSS

Deskew.

2. When the Deskewing Input File dialog appears, select an input file and perform any spatial and spectral subsetting.

3. Click OK.

4. When the Deskewing Parameters dialog appears, enter the latitude of the MSS scene center into the text boxes labeled Latitude Degrees, Latitude Minutes, and Latitude Seconds.

5. Select either File or Memory output.

Note

To close the function at any time, click Cancel.

6. Click OK to start the function.

A status window appears with the output filename listed and the percent completed displayed.

Correcting Aspect Ratio

Use MSS Aspect Ratio Correction to adjust the aspect ratio by applying nearest neighbor resampling to a regular grid. Landsat MSS image data typically contains geometric distortions caused by oversampling in the scan direction. The actual pixel sizes are approximately 79 x 79 meters, but the instrument samples at 57 meter intervals in the scan direction. Because of this oversampling, an adjustment of the aspect ratio by the factor 57/79=0.72 is required.

1. Select Basic Tools

PreprocessingData-Specific UtilitiesLandsat

MSS

Aspect.

Data-Specific Utilities

ENVI User’s Guide

Chapter 5: Basic Tools

563

2. When the Aspect Correction Input File dialog appears, select the input file and perform any subsetting.

3. Click OK.

4. When the Aspect Correction Parameters dialog appears, select output to File or

Memory.

5. Click OK to start the function.

No other interaction is required. The status window appears with the output filename listed and the percent completed displayed.

Landsat MSS Data Calibration

Use Landsat MSS Calibration to convert Landsat MSS digital numbers to radiance or exoatmospheric reflectance (reflectance above the atmosphere) using published post-launch gains and offsets. For detailed instructions, see

“Landsat MSS

Calibration” on page 534.

Landsat TM Utilities

Use Landsat TM Calibration to convert Landsat TM digital numbers to radiance or exoatmospheric reflectance (reflectance above the atmosphere) using published postlaunch gains and offsets. For detailed instructions, see

“Landsat TM Calibration” on page 535.

MODIS 1B

Use Georeference Data

to georeference your MODIS 1B data sets. ENVI extracts latitude and longitude values from the header information to georeference the data. For detailed instructions, see

“Georeference MODIS 1B” on page 921

.

OrbView-3 Utilities

Use Orthorectify OrbView-3 or Orthorectify OrbView-3 with Ground Control to orthorectify IKONOS data. For details, see

“Orthorectification using RPCs” on page 881.

ENVI User’s Guide

Data-Specific Utilities

564

Chapter 5: Basic Tools

QuickBird Utilities

Use the QuickBird Radiance utility to convert QuickBird relative radiance into absolute radiance in units of [

( µW ⁄ (

2

⋅ )

]. For detailed instructions, see

“QuickBird Radiance Calibration” on page 538.

Use the Orthorectify QuickBird or Orthorectify QuickBird with Ground Control

to orthorectify QuickBird data. For details, see “Orthorectification using RPCs” on page 881.

SeaWiFS Utilities

Use SeaWiFS Utilities to calculate geometry information for and to georeference

HDF and CEOS format SeaWiFS data. Geometry information includes latitude, longitude, sensor azimuth, sensor zenith, solar azimuth, solar zenith, and UTC time.

The georeferencing function produces a full precision geocoding based on a complete geometry model of the earth and satellite orbits.

Build Geometry File

Use Build Geometry File to calculate the geometry for HDF and CEOS format

SeaWiFS data. For detailed instructions see “Building SeaWiFS Geometry Files” on page 914.

Georeference SeaWiFS Data

Use Georeference Data to georeference your SeaWiFS data. For detailed

instructions, see “Georeferencing SeaWiFS Data” on page 915.

Spot Utilities

Build Geometry File

Use Build Geometry File to build a SPOT geometry file to calculate the X and Y coordinates for each pixel. For detailed instructions, see

“Building SPOT Geometry

Files” on page 912.

Georeference SPOT Data

Use Georeference Data to georeference SPOT data based on header information.

See

“Georeferencing SPOT Data” on page 913.

Data-Specific Utilities

ENVI User’s Guide

Chapter 5: Basic Tools

565

Orthorectify SPOT Data

Use the Orthorectify SPOT or Orthorectify SPOT with Ground Control to orthorectify SPOT data. For details, see

“Orthorectification using RPCs” on page 881.

TIMS Utilities

Thermal IR Atmospheric Correction

Use Thermal Atm Correction to approximate and remove the atmospheric contributions to thermal infrared data. TIMS data must be converted to radiance before performing the Thermal Atm Correction. ENVI provides a tool for converting

TIMS data to radiance (see “Radiance Calibration” on page 567). For best results,

perform this correction before converting your data to emissivity. The atmospheric correction algorithm used in ENVI is similar to the In-Scene Atmospheric

Compensation algorithm, ISAC. This algorithm assumes that the atmosphere is uniform over the data scene and that there is an occurrence of a near-blackbody surface within the scene. The location of the blackbody surface is not required. A single layer approximation of the atmosphere is used and it is assumed that there is no reflected downwelling radiance.

The algorithm first determines the wavelength that most often exhibits the maximum brightness temperature. This wavelength is then used as the reference wavelength.

Only spectra that have their brightest temperature at this wavelength are used to calculate the atmospheric compensation. At this point, for each wavelength, the reference blackbody radiance values are plotted against the measured radiances. A line is fitted to the highest points in these plotted data and the fit is weighted to assign more weight to regions with denser sampling. The compensation for this band is then applied as the slope and offset derived from the linear regression of these data with their computed blackbody radiances at the reference wavelength.

Upwelling atmospheric radiance and atmospheric transmission are approximated using the following method: first, the surface temperature of every pixel is estimated from the data and used to estimate the brightness temperature using the Planck function and assuming an emissivity of 1; next, a line is fitted, using one of two methods, to a scatterplot of radiance versus brightness temperature. The atmospheric upwelling and transmission are then derived from the slope and offset of this line.

Johnson, B. R. and S. J. Young, “In-Scene Atmospheric Compensation: Application to SEBASS Data Collected at the ARM Site”, Technical Report, Space and

Environment Technology Center, The Aerospace Corporation, May 1998.

ENVI User’s Guide

Data-Specific Utilities

566

Chapter 5: Basic Tools

Hernandez-Baquero, E., “Characterization of the Earths Surface and Atmosphere from Multispectral and Hyperspectral Thermal Imagery”, Ph.D. Dissertation,

Rochester Institute of Technology, Chester F. Carlsom Center for Imaging Science,

Rochester, NY, 2000.

1. Select one of the following paths:

Basic Tools

PreprocessingCalibration Utilities

Thermal Atm Correction, or

Basic Tools

PreprocessingData-Specific UtilitiesThermal

IR

Thermal Atm Correction, or

Basic Tools

PreprocessingData-Specific UtilitiesTIMS

Thermal Atm Correction.

2. Select the input file and perform any spatial or spectral subsetting, as desired.

The Thermal Atm Correction Parameters dialog appears.

3. Enter the Data Scale Factor needed to scale your data to units of W/m

2

/

µm/sr.

4. Select the Wavelength Units from the pull-down menu button.

5. Use the arrow toggle button to select either All or Max Hit to determine which pixels are used in the surface temperature estimation regression.

Selecting All will estimate the surface temperature for each pixel by using the maximum value of the brightness temperatures found throughout the input wavelengths. Selecting Max Hit will estimate the surface temperature for only those pixels that have their maximum brightness temperatures at a particular wavelength. The wavelength used is the wavelength that has the largest number of pixels with a maximum brightness temperature value.

6. Use the arrow toggle button to select either Top of Bins or Normalized

Regression for the scatter plot fitting technique.

Selecting Top of Bins will fit a line to the top of the scatter plot of radiance vs. brightness temperature. The top of the scatter plot corresponds to those pixels whose emissivity is closest to 1. This Top of Bins fit is achieved by doing a standard least squares regression on the top 5% of the data in the scatter plot.

Note

This technique is susceptible to sensor noise which may occur at the top of the scatter plot.

Data-Specific Utilities

ENVI User’s Guide

Chapter 5: Basic Tools

567

Selecting Normalized Regression will first fit a line to the scatter plot of radiance vs. brightness temperature by doing a standard least squares regression. The residuals of this fit are then compared to a normal probability plot. Another regression is done on the residuals in the normal plot. Points that are 3 times the noise equivalent sensor response (NESR) away from the regression line are deemed outliers and are removed. A final regression is done on the scatter plot using this reduced set of pixels.

Note

This method uses all the points in the scatter plot that are not outliers and does not fit to only the top of the scatter plot where the emissivity values are closest to 1.

If you choose Normalized Regression, enter the Noise Equivalent Sensor

Response in the text box.

7. Enter a gain and offset output filename, if desired.

8. Use the arrow toggle button to select whether to plot the resulting atmospheric transmission and upwelling spectra.

9. Enter an output filename and click OK.

The results will appear in the Available Bands List.

See the following references for more information.

Johnson, B. R. and S. J. Young, “In-Scene Atmospheric Compensation: Application to SEBASS Data Collected at the ARM Site”, Technical Report, Space and

Environment Technology Center, The Aerospace Corporation, May 1998.

Hernandez-Baquero, E., “Characterization of the Earths Surface and Atmosphere from Multispectral and Hyperspectral Thermal Imagery”, Ph.D. Dissertation,

Rochester Institute of Technology, Chester F. Carlsom Center for Imaging Science,

Rochester, NY, 2000.

Radiance Calibration

Use Radiance Calibration to calibrate raw data from the NASA Thermal Infrared

Multispectral Scanner (TIMS) to radiance in units of W/m

2

/

µm/sr. Data from onboard black bodies, and two internal reference sources, are stored within the first 60 bytes of each image line. The reference data can be smoothed. Gain and offset values are calculated for each TIMS spectral band using Plank’s radiation law and the reference data and are used to calibrate the raw DN values to radiance. See the following reference for more information:

ENVI User’s Guide

Data-Specific Utilities

568

Chapter 5: Basic Tools

Palluconi, F. D. and Meeks, G. R., 1985. “Thermal Infrared Multispectral Scanner

(TIMS): An Investigator’s Guide to TIMS Data,” JPL Publication 85-32, p. 14.

1. Select Basic Tools

PreprocessingData-Specific UtilitiesTIMS

Radiance Calibration, or

Basic Tools

PreprocessingCalibration UtilitiesTIMS Radiance.

2. Select the desired TIMS input file (must contain the 60 bytes per line of reference information). The TIMS Calibration Parameters dialog appears.

3. Enter the number of lines of reference data to be smoothed.

4. Enter an output filename and click OK.

The resulting bands appear in the Available Bands List and contain radiance values in

W/m

2

/

µm/sr.

Thermal IR Utilities

Use Thermal IR utilities to apply an atmospheric correction, and to convert the data set from radiance to emissivity and temperature using one of three methods:

Reference Channel Emissivity, Emissivity Normalization, and Alpha Residuals.

Thermal image data must be converted to radiance before performing the atmospheric correction. Perform this correction before converting your data to emissivity for best results.

Atmospheric Correction for Thermal IR Data

Use Thermal Atm Correction to approximate and remove the atmospheric contributions from thermal infrared radiance data. Thermal image data must be converted to radiance before performing the atmospheric correction. ASTER and

TIMS data should be converted to radiance using ENVI’s ASTER Radiance tool or

TIMS Radiance tool before performing the atmospheric correction. Both the ASTER

Radiance and TIMS Radiance tools apply the correct band coefficients to convert to radiance in the appropriate units. No data scale factor is then required during the atmospheric correction. Perform the correction before converting your data to emissivity for the best results.

Note

ENVI does not check to make sure the images are thermal infrared data. Be sure that your data wavelengths measure between 8 and 14

µm before applying this correction.

Data-Specific Utilities

ENVI User’s Guide

Chapter 5: Basic Tools

569

The atmospheric correction algorithm used in ENVI is similar to the In-Scene

Atmospheric Compensation algorithm, ISAC (see references at the end of this section). This algorithm assumes that the atmosphere is uniform over the data scene and that a near-blackbody surface exists within the scene. The location of the blackbody surface is not required for this correction. A single layer approximation of the atmosphere is used. No reflected downwelling radiance is also assumed.

The algorithm first determines the wavelength that most often exhibits the maximum brightness temperature. This wavelength is then used as the reference wavelength.

Only spectra that have their brightest temperature at this wavelength are used to calculate the atmospheric compensation. At this point, for each wavelength, the reference blackbody radiance values are plotted against the measured radiances. A line is fitted to the highest points in these plotted data and the fit is weighted to assign more weight to regions with denser sampling. The compensation for this band is then applied as the slope and offset derived from the linear regression of these data with their computed blackbody radiances at the reference wavelength.

Upwelling atmospheric radiance and atmospheric transmission are approximated using the following method. First, the surface temperature of every pixel is estimated from the data and used to approximate the brightness temperature using the Planck function and assuming an emissivity of 1. Next, a line is fitted (using one of two methods) to a scatter plot of radiance vs. brightness temperature. The atmospheric upwelling and transmission are then derived from the slope and offset of this line.

1. Select one of the following paths:

Basic Tools

PreprocessingCalibration Utilities

Thermal Atm Correction, or

Basic Tools

PreprocessingData-Specific UtilitiesThermal

IR

Thermal Atm Correction, or

Basic Tools

PreprocessingData-Specific UtilitiesTIMS

Thermal Atm Correction.

2. Select the input file and perform any spatial or spectral subsetting, as desired.

The Thermal Atm Correction Parameters dialog appears.

3. Enter the Data Scale Factor needed to scale your data to units of W/m

2

/

µm/sr.

Note

The image output from this atmospheric correction uses the same units as the input image. For example, if the results of the correction are used to calculate emissivity and temperature, then the same scale factor must be specified.

ENVI User’s Guide

Data-Specific Utilities

570

Chapter 5: Basic Tools

4. Select the Wavelength Units from the pull-down menu button.

5. Use the arrow toggle button to select either All or Max Hit to determine which pixels are used in the surface temperature estimation regression.

Selecting All will estimate the surface temperature for each pixel by using the maximum value of the brightness temperatures found throughout the input wavelengths. Selecting Max Hit will estimate the surface temperature for only those pixels that have their maximum brightness temperatures at a particular wavelength. The wavelength used is the wavelength that has the largest number of pixels with a maximum brightness temperature value.

6. Use the arrow toggle button to select either Top of Bins or Normalized

Regression for the scatter plot fitting technique.

Selecting Top of Bins will fit a line to the top of the scatter plot of radiance vs. brightness temperature. The top of the scatter plot corresponds to those pixels whose emissivity is closest to 1. This Top of Bins fit is achieved by doing a standard least squares regression on the top 5% of the data in the scatter plot.

Note

This technique is susceptible to sensor noise which may occur at the top of the scatter plot.

Selecting Normalized Regression will first fit a line to the scatter plot of radiance vs. brightness temperature by doing a standard least squares regression. The residuals of this fit are then compared to a normal probability plot. Another regression is done on the residuals in the normal plot. Points that are 3 times the noise equivalent sensor response (NESR) away from the regression line are deemed outliers and are removed. A final regression is done on the scatter plot using this reduced set of pixels.

Note

This method uses all the points in the scatter plot that are not outliers and does not fit to only the top of the scatter plot where the emissivity values are closest to 1.

If you choose Normalized Regression, enter the Noise Equivalent Sensor

Response in the text box.

7. Enter a gain and offset output filename, if desired.

Data-Specific Utilities

ENVI User’s Guide

Chapter 5: Basic Tools

571

8. Use the arrow toggle button to select whether to plot the resulting atmospheric transmission and upwelling spectra.

9. Enter an output filename and click OK.

The results will appear in the Available Bands List.

See the following references for more information.

Johnson, B. R. and S. J. Young, “In-Scene Atmospheric Compensation: Application to SEBASS Data Collected at the ARM Site”, Technical Report, Space and

Environment Technology Center, The Aerospace Corporation, May 1998.

Hernandez-Baquero, E., “Characterization of the Earths Surface and Atmosphere from Multispectral and Hyperspectral Thermal Imagery”, Ph.D. Dissertation,

Rochester Institute of Technology, Chester F. Carlsom Center for Imaging Science,

Rochester, NY, 2000.

Converting to Emissivity and Temperature

The radiation emitted from a surface in the thermal infrared wavelengths is a function of both the surface temperature and emissivity. The emissivity relates to the composition of the surface and is often used for surface constituent mapping.

ENVI has three techniques that are used to separate the emissivity and temperature information in radiance data measured with thermal infrared sensors. Both the

Reference Channel Emissivity and Emissivity Normalization techniques assume a fixed emissivity value and produce emissivity and temperature outputs. The Alpha

Residuals technique does not provide temperature information.

See the following references for more information:

Hook, S. J., A. R. Gabell, A. A. Green, and P. S. Kealy, 1992. A comparison of techniques for extracting emissivity information from thermal infrared data for geologic studies. Remote Sensing of Environment, Vol. 42, pp. 123-135.

Kealy, P. S. and S. J. Hook, 1993., Separating temperature and emissivity in thermal infrared multispectral scanner data: Implications for recovering land surface temperatures. IEEE Transactions on Geoscience and Remote Sensing, Vol. 31, No. 6, pp.1155-1164.

ENVI User’s Guide

Data-Specific Utilities

572

Chapter 5: Basic Tools

Using Reference Channel Emissivity

Use Reference Channel Emissivity to calculate emissivity and temperature values from thermal infrared radiance data. The reference channel emissivity technique assumes that all the pixels in one channel (band) of the thermal infrared data have a constant emissivity. Using this constant emissivity, a temperature image is calculated and those temperatures are used to calculate the emissivity values in all the other bands using the Planck function. You can select the band to keep constant and enter the desired emissivity value for that band. See the previous references for more information.

1. Select Basic Tools

PreprocessingData-Specific UtilitiesThermal

IR

Reference Channel Emissivity, or

Basic Tools

PreprocessingCalibration UtilitiesCalculate

Emissivity

Reference Channel.

2. Select the input radiance data file and perform any subsetting. The Calculate

Emissivity parameters dialog appears.

3. Enter a data scale factor, if needed, to scale the radiance values into the units of

W/m

2

/

µm/sr (for example, if your data is in microflicks (µW/cm

2

/

µm/sr) enter a scale factor of .01).

4. Enter a wavelength scale factor, if needed, to scale the wavelengths that are read from the header into units of

µm.

5. From the Emissivity Band pull-down list, select which band to set to a constant emissivity value.

6. In the Assumed Emissivity Value text box, enter the desired emissivity value for the constant band.

7. Click the Output Temperature Image? arrow toggle button to designate whether or not to output a temperature image. Enter an output filename if needed.

8. Enter an output filename for the emissivity data and click OK.

The temperature image (single band) and emissivity data cube (same number of bands as input radiance data) appear in the Available Bands List.

Data-Specific Utilities

ENVI User’s Guide

Chapter 5: Basic Tools

573

Using Emissivity Normalization

Use Emissivity Normalization to calculate emissivity and temperature values from thermal infrared radiance data. The emissivity normalization technique calculates the temperature for every pixel and band in the data using a fixed emissivity value. The highest temperature for each pixel is used to calculate the emissivity values using the

Planck function. You can enter the desired fixed emissivity value. See the references in the introduction to

“Thermal IR Utilities” on page 568 for more information.

1. Select Basic Tools

PreprocessingData-Specific UtilitiesThermal

IR

Emissivity Normalization or Basic ToolsPreprocessing

Calibration Utilities

Calculate EmissivityEmissivity Normalization.

2. Select the input radiance data file and perform any subsetting.

The Calculate Emissivity parameters dialog appears.

3. Enter a data scale factor, if needed, to scale the radiance values into the units of

W/m

2

/

µm/sr (for example, if your data is in microflicks (µW/cm

2

/

µm/sr) enter a scale factor of .01).

4. Enter a wavelength scale factor, if needed, to scale the wavelengths (read from the header) into units of

µm.

5. In the Assumed Emissivity Value text box, enter the desired fixed emissivity value to be used to calculate the temperatures.

6. Click the Output Temperature Image? arrow toggle button to designate whether or not to output a temperature image. Enter an output filename if needed.

7. Enter an output filename for the emissivity data and click OK.

The temperature image (single band) and emissivity data cube (same number of bands as input radiance data) appear in the Available Bands List.

ENVI User’s Guide

Data-Specific Utilities

574

Chapter 5: Basic Tools

Using Alpha Residuals

Use Alpha Residuals to produce alpha residual spectra that approximate the shape of emissivity spectra from thermal infrared radiance data. Wien’s approximation of the

Planck function is used so the equation can be linearized with logarithms. The temperature and emissivity terms are separated and means are used to subtract the temperature term out.

The alpha residual spectra are a function of emissivity only and have a similar shape as emissivity spectra but have a zero mean. Therefore emissivity spectra must be scaled for direct comparison to alpha residual spectra. Emissivity spectra can be calculated from alpha residual spectra using empirical data as described in the Kealy,

1993 reference mentioned in the introduction to

“Thermal IR Utilities” on page 568.

1. Select Basic Tools

PreprocessingData-Specific UtilitiesThermal

IR

Alpha Residuals, or

Basic Tools

PreprocessingCalibration UtilitiesCalculate

Emissivity

Alpha Residuals.

2. Select the input radiance data file and perform any subsetting. The Calculate

Emissivity parameters dialog appears.

3. Enter a data scale factor, if needed, to scale the radiance values into the units of

W/m

2

/

µm/sr (for example, if your data is in microflicks (µW/cm2/µm/sr) enter a scale factor of .01).

4. Enter a wavelength scale factor, if needed, to scale the wavelengths (read from the header) into units of

µm.

5. Enter an output filename and click OK.

The alpha residual data cube (same number of bands as input radiance data) filename is listed in the Available Bands List.

Data-Specific Utilities

ENVI User’s Guide

Chapter 6:

Classification

This chapter covers the following topics:

The Classification Menu . . . . . . . . . . . . . . 576

Collecting Endmember Spectra . . . . . . . . . 577

Supervised Classification . . . . . . . . . . . . . 594

Unsupervised Classification . . . . . . . . . . . 611

Decision Tree Classifier . . . . . . . . . . . . . . 617

Creating Class Images from ROIs . . . . . . . 627

Post Classification . . . . . . . . . . . . . . . . . . . 628

Changing Class Colors . . . . . . . . . . . . . . . 628

Classifying from Rule Images . . . . . . . . . . 630

Calculating Class Statistics . . . . . . . . . . . . 634

Calculating Confusion Matrices . . . . . . . . 636

Displaying ROC Curves . . . . . . . . . . . . . . 644

Majority/Minority Analysis . . . . . . . . . . . 654

Clumping Classes . . . . . . . . . . . . . . . . . . . 655

Sieving Classes . . . . . . . . . . . . . . . . . . . . . 656

Combining Classes . . . . . . . . . . . . . . . . . . 657

Overlaying Classes . . . . . . . . . . . . . . . . . . 659

Calculating Buffer Zone Images . . . . . . . 660

Creating Segmentation Images . . . . . . . . . 661

Exporting Classes To Vector Layers . . . . 662

ENVI User’s Guide

575

576

The Classification Menu

Chapter 6: Classification

Use the Classification menu to access ENVI’s classification functions. Functions include supervised and unsupervised classification, collecting endmembers, classifying previous rule images, calculating class statistics and confusion matrices, applying majority and minority analysis to classification images, clumping and sieving classes, combining classes, overlaying classes on grayscale images, calculating buffer zone images, calculating segmentation images, and exporting classes to vector layers.

Figure 6-1: Classification Menu

The Classification Menu

ENVI User’s Guide

Chapter 6: Classification

Collecting Endmember Spectra

577

Use Endmember Collection to select endmember spectra from many sources for use in classification and advanced spectral analysis techniques. You can run all of the supervised classification techniques and many of the advanced spectral techniques from the Endmember Collection dialog.

Note

You can run several classifications using the same endmembers or training classes as input by changing the algorithm technique.

1. Select Classification

Endmember Collection.

2. When the Classification Input File dialog appears, select the desired file, subset, and/or mask.

3. Click OK. The Endmember Collection dialog appears (see “The Endmember

Collection Dialog” on page 578 for more information on this dialog).

Figure 6-2: Endmember Collection Dialog

4. Collect endmembers, select algorithm types, and manage endmembers using the procedures described in the following sections.

ENVI User’s Guide

Collecting Endmember Spectra

578

Chapter 6: Classification

The Endmember Collection Dialog

The Endmember Collection dialog contains the following sections:

• Input file information.

• A table to view and edit endmember properties. This table also allows you to collect and select endmembers.

• Buttons to view and maintain collected endmembers.

• Pull-down menus to import spectra from other sources, edit spectra names and colors, suppress backgrounds, select algorithms, and manage endmembers.

Input File Information

The following input file information is provided in the text at the top of the

Endmember Collection dialog:

• File — The name of the input file and its selected spatial subset range. If the image is not spatially subset, the phrase

Full Scene

is displayed.

• Mask — The name of the mask associated with the input file.

• Wavelength —The wavelength range of the image data. The units of these wavelengths are derived from the header file of the input file. If the units cannot be derived from the header file, the phrase

<unknown units

> is displayed.

• Number and range of the bands in the spectral subset — The number of bands spectrally subsetted from the input file and the range of the subset. If the input file is not spectrally subsetted, the total number of bands in the input file and the entire range is displayed.

Endmember Spectra Table

The Endmember Collection dialog also contains the Endmember Spectra table. This table enables you to view and edit properties associated with any of the spectra listed in the table. The table contains the following columns:

Row Number — This column contains the row number of each spectrum. You can select a specific spectrum by clicking on its row number, which highlights the entire row of that spectrum. You can also combine the Shift key with a click on a row number to select a range of spectra, or combine the Ctrl key with a click on a row number to select a group of spectra that are not adjacent in the table. The Select All button can be used to select all of the spectra in the

Collecting Endmember Spectra

ENVI User’s Guide

Chapter 6: Classification

579 table. The Plot or Delete button can be used to plot or delete the selected spectra.

Spectrum Name — This column contains the name of each spectrum. You can edit the name of a spectrum by clicking its cell in this column. You can also specify the spectrum names for all the spectra from an ASCII file by rightclicking on the Spectrum Name column title and selecting the Import names

from ASCII... option from the shortcut menu. This shortcut menu also contains a Reset names option to reset all the spectra to their original names.

All of the options in this shortcut menu are also available in the Options pulldown menu.

Color — This column contains the color of each spectrum. You can use any of the following methods to change the color of a spectrum.

• Right-click in its cell to display the color shortcut menu.

• Left-click in its cell to enter a valid ENVI graphics color name. If a valid color is not provided, the color value is set to

<none>

by default.

• Left-click in its cell to enter an RGB triplet (such as 255, 0, 0 for red). If an

RGB triplet is provided, the closest valid ENVI graphics color is used.

You can also set the default ENVI colors for all the spectra by right-clicking in the Color column title and selecting the Assign default colors to all option from the resulting shortcut menu. You can set all the spectra colors to

<none> with the Assign default colors to undefined option. The shortcut menu also contains a Reset Colors option to reset all the spectra to their original colors.

All of the options in this shortcut menu are also available in the Options pulldown menu.

• Source — This column displays the source of each spectrum. The values in this column cannot be edited. The following list shows the possible sources for the spectra in the table.

• ASCII file — Spectrum imported from ASCII column data file.

• ASD file — Spectrum imported from ASD formatted file (which is output from the Analytical Spectral Devices spectrometers).

• Spec Lib — Spectrum imported from ENVI spectral library (

.sli

) file.

• ROI mean — Mean spectrum from either an ROI or a vector.

• Stats file — Spectrum imported from ENVI statistics (

.sta

) file.

ENVI User’s Guide

Collecting Endmember Spectra

580

Chapter 6: Classification

• Plot — Spectrum imported from a plot window. For more information on how to import from the plot window, see

“From the Shortcut Menu” on page 581.

• Unknown — Spectrum retrieved from any other source.

• Bands — This column displays the number of spectral bands contained in each spectrum. The values in this column cannot be edited.

Wavelength — This column contains the wavelength range of each spectrum.

The wavelengths of the spectra are converted to the wavelengths of the image data (see

“Input File Information” on page 578) when you click either the Plot

or Apply button in the dialog. This conversion does not occur if the wavelength units of the spectra are unknown. You can change the wavelength units by right-clicking in the cell of the Wavelength column.

• Status — This column displays the status of each spectrum related to the input file. The values in this column cannot be edited. The following list shows the possible status values for the spectra in the table.

• Match — The wavelengths of the input file and the spectrum match exactly and no resampling is necessary when you click on either the Plot or Apply button.

• Resample — The wavelengths of the input file and the spectrum are different, but ENVI is able to resample the spectrum to the wavelength space of the input file when you click on either the Plot or Apply button in the dialog.

• Invalid — The wavelengths of the input file and the spectrum are different, but ENVI is not able to resample because the wavelength units of either the spectrum or the input file are unknown. If a spectrum is invalid, it cannot be plotted and is not used when you click the Apply button.

Note

An input file with unknown wavelength units can be changed to a file containing known wavelength units by using the File

Change input File... option in the dialog.

Collecting Endmember Spectra

ENVI User’s Guide

Chapter 6: Classification

581

Using the Endmember Spectra Table to Import Spectra

The Endmember Spectra table can also be used to import spectra from a display to the Endmember Collection dialog with either a shortcut menu or by dragging-anddropping the spectra.

From the Shortcut Menu

To derive spectra from a display and import them into the Endmember Spectra table, perform the following steps.

1. From the Display menu bar, select the Tools

ProfilesZ Profile

(Spectrum)... option. The Spectral Profile plot window appears.

2. From the menu bar in the Spectral Profile plot window, select Options

Collect Spectra.

3. Click a couple times in various locations in the display to collect some spectra in the plot window.

4. Right-click in either the empty space or the upper-left corner of the table to access a shortcut menu This menu contains all the available spectra from every displayed plot window.

ENVI User’s Guide

Figure 6-3: Shortcut Menu in the Endmember Spectra Table

Collecting Endmember Spectra

582

Chapter 6: Classification

Note

If no spectrum was available in any plot window, the shortcut menu states that no spectrum is available and does not contain any other options.

5. Use the shortcut menu to import a spectrum from the Spectral Profile plot window into the Endmember Spectra table of the Endmember Collection dialog. The imported spectrum now appears in the table.

You can also use Import

from Plot Windows to import multiple spectra from a display. When this option is chosen, the Import from Plot Windows dialog appears.

Use this dialog to select one or more spectra and then click OK. The selected spectra appear in the Endmember Collection dialog.

By Dragging-and-Dropping Spectra

You can also drag-and-drop a spectrum from the plot window key to the Endmember

Spectra table to collect it in the Endmember Collection dialog.

1. In the Spectral Profile window, select Options

Plot Key. The key (legend) for the plot window appears to the right of the spectral plot.

2. Click and drag the key of a spectrum into the Endmember Spectra table. That spectrum now appears in the table.

Plotting Spectra

To plot a spectrum from the Endmember Spectra table, click in the Row Number column of that spectrum to select it and then click the Plot button. To plot multiple spectra, click with the Shift or Ctrl key in the Row Number column and then click

Plot. You can plot all the spectra in the table by clicking the Select All button, and then clicking the Plot button.

Deleting Spectra

To delete a spectrum from the End