You are on page 1of 8

Welcome to the Exelis VIS product documentation center!

Here you will find reference guides, help documents, and product libraries. Discover the products ENVI, IDL, ENVI LiDAR, and ESE, developed by Exelis VIS.

Manage Raster Data

See the following sections: Create Coordinate System String Convert Complex Data Convert Interleave Create Coordinate System String Create ENVI Meta File Data Viewer Destripe ENVI Queue Manager Edit ENVI Header Generate Test Data Import IDL Variables Export to IDL Variables Landsat MSS Aspect Landsat MSS Deskew Layer Stacking Masks New File Builder Replace Bad Lines Reproject Raster Resize Data Rotate/Flip Data Stretch Data Subset Data via ROIs

1 of 8

1/30/2014 4:03 PM

Convert 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 (natural log 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. 2. 3. 4. 5. From the Toolbox, select Raster Management > Convert Complex Data. Select an input data file. Click OK. The Convert Complex Parameters dialog appears. Select the output band functions by selecting the check boxes next to the function names. Select output to File or Memory. Click OK. ENVI adds the resulting output to the Layer Manager.

Convert Interleave
Use Convert Interleave 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. 1. From the Toolbox, select Raster Management > Convert Interleave. 2. Select an input file and perform optional spatial and spectral subsetting, then click OK. The Convert File Parameters dialog appears. 3. Choose the output data type from the Output Interleave radio buttons. ENVI automatically determines the format of the input file and offers conversion to the other two formats. 4. From the Convert in Place toggle button, select Yes or No. Yes: Overwrites the existing file. This option saves significant disk space, but the process is slower than writing to a separate file. No: Writes the converted file to a separate output file. Note: If the overwrite function fails for any reason (for example, due to a power outage), your data will be corrupted and the original file will not be recoverable. 5. Enter the output filename. 6. Click OK. ENVI adds the resulting output to the Layer Manager.

Create Coordinate System String


Use Create Coordinate System String to create a text file containing a coordinate system string that you can add to an ENVI header file (.hdr) or use with the ENVI application programming interface (API). 1. From the Toolbox, select Raster Management > Create Coordinate System String. 2. Select a coordinate system. Click to expand the lists of Geographic Coordinate Systems or Projected Coordinate Systems, then select the specific coordinate system. Its properties display in the Selected Coordinate System table. The steps for using this dialog are similar to those of the Select Coordinate System dialog. Refer to those steps for defining and editing coordinate systems, and for adding commonly used coordinate systems to a list of favorites. 3. Click OK in the Create Coordinate System dialog. 4. A dialog appears, prompting you for a text filename and location. Select a folder and filename to save the text file, then click Save. The default filename is coordSysString.txt, but you can change it to be more descriptive for each coordinate system string that you save.

Create ENVI Meta File


A meta file is a text file that contains the names of image files and/or bands to treat as one virtual file. When you later select the meta file for input or processing using File > Open, ENVI retrieves the image data from the individual disk files and treats them as if they were part of the same input file for processing. ENVI meta files can contain images with different data types (byte, integer, floating point, and so forth), which allows you to combine processing of diverse data sets. ENVI does not need to perform file conversions or create intermediate processing files. The files that comprise the meta file must have the same spatial dimensions. You can spatially subset the files if needed; see Step 3 below. The map projection of the first file or band in the meta file determines the projection for the other files/bands. The other files/bands are not reprojected to match the projection of the first file/band. You can also create an ENVI header file to accompany the meta file that defines the map projection. You can include any file type in a meta file as long as the files reside on disk and they are formats that ENVI supports. Follow these steps to continue: 1. From the Toolbox, select Raster Management > Create ENVI Meta File. The ENVI Meta File Builder dialog appears. 2. Click the Add Dataset button and select a file using the File Selection dialog. 3. Repeat the file selection process using the Add Dataset button. Input files are listed in the Selected Datasets for ENVI Meta File list. To delete a file from the list in the New File Builder dialog, select the filename and click the Remove button. To change the order in which the files and/or bands are imported, click the Move Up or Move Down buttons. 4. In the Output Filename field, enter a filename and location. 5. Select the Display Output option to automatically display the image files and/or bands once the meta file has been created. 6. Click OK to build the new file. 7. Optional: You can use the Edit ENVI Header tool create an accompanying header file.

Data Viewer
Use the Data Viewer to examine data files at the byte level, which allows you to view file structure, identify unknown file types, and determine the offset to data when an embedded image header is present in the data. 1. From the Toolbox, select Raster Management > Data Viewer. 2. Select an input file. The Data Viewer dialog appears, displaying the filename and number of total bytes in the title bar and the actual data values (in hexadecimal format, by default). 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. The final column lists the ASCII equivalent of the values. Note: If the data does not have any embedded ASCII characters, the ASCII equivalents are random. If there is embedded ASCII data, the data is readable as text. 3. To select the starting byte to view from the file, enter the byte number in the File Offset Byte(s) field. 4. To move the data view forward or backward one page respectively, click the Next Page and Prev Page buttons. 5. If you suspect that the data may be in something other than byte format, select View_Format from the Data Viewer menu bar and select a data format (Hexadecimal, Byte, Unsigned Integer, Integer, Long Integer, Unsigned Long Integer, or Floating Point). The number of columns of data values and the representation of the listed data change accordingly. 6. To open and view a different file, select File > Open New File from the Data Viewer menu bar. 7. To exit the data viewer, select File > Cancel from the Data Viewer menu bar.

2 of 8

1/30/2014 4:03 PM

Manage Raster Data (Using ENVI) | Exelis VIS Docs Center

http://www.exelisvis.com/docs/ManageRasterData.html#Layer

8. To evaluate the 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 Byte_Swap from the Data Viewer menu bar and select one of the following: None: No swapping Short Word: Swapping two bytes for an integer Long Word: Swapping byte pairs for long integer and floating-point data

Destripe
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. From the Toolbox, select Raster Management > Destripe. 2. Select an input file and perform optional spatial and spectral subsetting, then click OK. The Destriping Parameters dialog appears. 3. Enter the number of detectors in the Number of Detectors field. The number of detectors is the periodicity of the striping (for example, for Landsat MSS, the value would be 6). If the file type has been set in the header, the default is set automatically. 4. Select output to File or Memory. 5. Click OK.

ENVI Queue Manager


Some ENVI dialogs include a Queue button, which enables you to prepare multiple functions in advance for processing, but queue them for processing at a later time. Queuing functions are useful when their processing time is lengthy. Note: Results from one queued function (procedure) cannot be used as input into another function. When queuing is available in a dialog: 1. Set all dialog parameters as needed. 2. Select output to File and enter a filename. 3. Click Queue instead of clicking OK. This places the function in the ENVI Queue Manager. 4. When you are ready to process that function, either on its own or with other queued functions, start it from the ENVI Queue Manager, described next. To process queued functions: 1. Ensure that all of the files needed to run the queued functions are open and listed in the Layer Manager. 2. From the Toolbox, select Raster Management > ENVI Queue Manager. The ENVI Queue Manager dialog displays, with a list of all queued functions. 3. In the Queued Procedures List, select one or more procedures to run. To select all of the procedures, click Select All. To view information about a procedure in the Procedure Information field, click on the procedure name. 4. Click Execute Selected. ENVI removes the names from the list and processes the functions. The resulting filenames appear in the Layer Manager.

Generate Test Data


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. From the Toolbox, select Raster Management > Generate Test Data. The Generate Image Parameters dialog appears. 2. Select the output image type from the Output Image Value drop-down list: Constant: Generates an image with a constant value for every pixel. Enter the desired DN value in the Value text box. Horiz Ramp or Vert Ramp: Generates an image with either a horizontal or vertical linear ramp. Enter the desired minimum and maximum ramp values in the Min Value and Max Value fields. Random (uniform) or Random (normal): Random (normal) returns an image with normally-distributed random numbers. Random (uniform) returns an image with uniformly-distributed random numbers. Enter the minimum and maximum values to occur in the image in Min Value and Max Value fields. Enter a Seed value to initialize the random number generator. If you do not enter a seed value, ENVI uses the system clock for initialization. Gaussian PSF: Generates a Gaussian image. Enter the minimum and maximum values to occur in the number of output Samples, Lines, and Bands in the corresponding fields. 3. Select the Output Data Type from the drop-down list. 4. Select output to File or Memory. 5. Click OK. A status box appears while the image is being processed. ENVI adds the new image to the Layer Manager when processing is complete.

Import IDL Variables


Use Import IDL Variables to import IDL variables into ENVI. 1. From the Toolbox, select Raster Management > 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 Add Range. To select all the variable names, click Select All. To clear the selected variable names, click Clear. 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 is 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 2D and 3D variables appear in the Available Band List as memory items.

Export to IDL Variables


Use Export to an IDL Variable to export and/or subset a band or file to an IDL variable. 1. From the Toolbox, select Raster Management > Export to an IDL Variable . The Export to IDL Input File/Band dialog displays. 2. Select an input file or band and perform optional spatial subsetting and spectral subsetting.

3 of 8

1/30/2014 4:03 PM

Manage Raster Data (Using ENVI) | Exelis VIS Docs Center

http://www.exelisvis.com/docs/ManageRasterData.html#Layer

3. In the Export Variable Name dialog, select one of the following options: If the variable was previously defined, select on the name in the Select variable to receive export list. If the variable is a new one, enter the name of an undefined ENVI variable in the New Variable Name field. 4. Click OK. The exported data is available to use at the ENVI command line.

Landsat MSS Aspect


Use Landsat MSS Aspect 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. 2. 3. 4. From the Toolbox, select Raster Management > Data-Specific Utilities > Landsat MSS Aspect . The Input File dialog appears. Select an input file and perform optional spatial and spectral subsetting, then click OK. The Aspect Correction Parameters dialog appears. Select output to File or Memory. Click OK.

Landsat MSS Deskew


Landsat MSS image data processed prior to 1978 typically contains systematic distortions caused by earth rotation and scan skew. Use Landsat MSS Deskew 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. 2. 3. 4. 5. From the Toolbox, select Raster Management > Data-Specific Utilities > Landsat MSS Deskew. The Input File dialog appears. Select an input file and perform optional spatial and spectral subsetting, then click OK. The Deskewing Parameters dialog appears. Enter the latitude of the MSS scene center into the Latitude Degrees, Latitude Minutes, and Latitude Seconds field. Select output to File or Memory. Click OK.

Layer Stacking
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. From the Toolbox, select Raster Management > Layer Stacking. The Layer Stacking Parameters dialog appears. 2. Click Import File. The Input File dialog appears. 3. Select an input file and perform optional spatial and spectral subsetting, then click OK. The Layer Stacking Parameters dialog appears. ENVI adds the input file to the Selected Files for Layer Stacking list. Repeat the file selection using the Import File button for each input file to include in the new output file. 4. Select Inclusive or Exclusive to specify the output file range: Inclusive: Creates an output file with a geographic extent that encompasses all the input file extents. Exclusive: Creates an output file that contains only the data extent where all the files overlap. 5. Select output to File or Memory. 6. Select an output map projection from the list. 7. Enter the X Pixel Size and Y Pixel Size. Enter the pixel sizes in the units selected under the map projection section. 8. From the Resampling drop-down list, select a resampling method: Nearest Neighbor: Uses the nearest pixel without any interpolation to create the warped image. Bilinear: Performs a linear interpolation using four pixels to resample the warped image. Cubic Convolution: Uses 16 pixels to approximate the sinc function using cubic polynomials to resample the image. Cubic convolution resampling is significantly slower than the other methods. 9. Click OK. ENVI adds the resulting output to the Layer Manager.

Masks
Masks allow you to confine image processing to specific areas in the image (a regular mask) or to ignore specific areas for processing (an inverse mask). Suppose that in the following multispectral image, you want to limit processing to only residential areas so that you can identify rooftops.

You could create a mask similar to the following example. If you were to import this mask during the data selection step, each subsequent step of the workflow would ignore the area associated with the masked pixels.

4 of 8

1/30/2014 4:03 PM

Manage Raster Data (Using ENVI) | Exelis VIS Docs Center

http://www.exelisvis.com/docs/ManageRasterData.html#Layer

By default, workflows (such as Feature Extraction) ignore areas with pixel values of 0 in the mask during processing. To use an inverse version of the mask, select the Inverse check box in the appropriate workflow panel. The workflow will process the areas with pixel values of 0 and will ignore all other pixels. When you supply a mask for use with classification images, ENVI will create a new class called "Mask" whose pixel value is one greater than the highest class value in the image. This is meant to differentiate "unclassified" pixels from those that you wish to exclude from processing. For example, if you have a classification image where 0=unclassified, 1=vegetation, and 2=urban, ENVI will assign a value of 3 to the masked pixels. The following rules apply to working with masks: You can only use a single-band image or polygon shapefile as a mask file. Multi-band images or point/line shapefiles are not allowed. ENVI will convert polygon shapefiles to raster images for the workflow. You can only specify one mask file for input. If you have multiple mask files, you can combine them into one image in ENVI prior to using Feature Extraction. A mask must have the same map projection as the base layer. Masks are not reprojected to match the base layer image. If the mask has a different map projection than the base image, you could change the masks map projection in ENVI prior to using it in the workflow.

Build Masks
You can build image masks from specific data values (including the data ignore value), ranges of values, finite or infinite values, 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. From the Toolbox, select Raster Management > Masking > Build Mask. If no images are initially open or displayed, the Mask Definition Input dialog appears. Enter the number of Samples and Lines to define the size of the mask. If an image is already open and/or displayed, the Build Mask Input File dialog appears. Select the input file, and click OK. The Mask Definition dialog appears; the Samples and Lines fields automatically populate with the input file dimensions. To restrict a mask to specific data values, follow these steps: 1. From the Mask Definition dialog menu bar, select Options > Import Data Range. The Select Input for Mask Data Range dialog appears. 2. Select the input file for the data range. The Input for Data Range Mask dialog appears. 3. Click Select New Input 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 fields. If you enter only a minimum or maximum value, the datas actual maximum or minimum, respectively, will be used as the other end value. 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 fields. 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. To include an annotation file in the mask, select Options > Import Annotation from the Mask Definition dialog menu bar and select the input file. To include the currently displayed annotation shapes in the mask, select Options > Import Displayed Annotation . Only rectangles, ellipses, and polygons are imported into the mask definition. To mask finite values, select Options > Mask Finite Values from the Mask Definition dialog menu bar. Select a band, and click OK. To produce a mask of NaN (Not a Number) or Inf (Infinite) data values, select Options > Mask NaN/ Inf Values from the Mask Definition dialog menu bar. Select a band, and click OK. To use an ENVI Classic region of interest (ROI) as the basis for a mask, select Options > Import ROIs from the Mask Definition menu bar. Select an .roi or .xml file, select the ROIs, and click OK. All imported ROIs are treated as a single mask layer. See the Example below. To compute the intersection of two or more ROIs and include the result in a mask, select Options > Import ROI Intersection from the Mask Definition dialog menu bar. The Mask Input ROI Intersection dialog appears. Select the names of the intersecting regions. All of the selected regions must intersect. Click OK. ENVI creates a point ROI from the intersecting points. To use an ENVI Vector File (EVF) as the basis for a mask, select Options > Import EVFs from the Mask Definition dialog menu bar. Select the vector file to input, then click OK. To set the defined areas in the mask to 1 (On) or to 0 (Off), select Options > Selected Areas On/Off from the Mask Definition dialog menu bar. By choosing Selected Areas Off, the masked pixels will have a value of 0, meaning that those areas of the source image will be ignored during image processing after applying the mask. 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. 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] from the Mask Definition dialog menu bar. To use all the defined areas to make the mask, select Options > Selected Attributes [Logical OR] from the Mask Definition dialog menu bar. To delete an item from the Select Attributes list in the Mask Definition dialog, highlight the item and click Delete Item. To remove all items from the Select Attributes list in the Mask Definition dialog, click Clear All Items. To save a mask, select output to File or Memory in the Mask Definition dialog, then click Apply.

Apply Masks
Use Apply Mask to permanently apply a mask to an image. 1. From the Toolbox, select Raster Management > Masking > Apply Mask. The Input File dialog appears. 2. Select an input file and perform optional spatial and spectral subsetting, and/or masking, then click OK. 3. To create a mask, click Mask Options. This menu contains the following options: Build Mask: Opens the Mask Definition dialog. Mask Data Ignore Values [All Bands]: 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]: Build a mask that includes all the pixels for which the data ignore value occurs in any band (a logical OR operation).

5 of 8

1/30/2014 4:03 PM

Manage Raster Data (Using ENVI) | Exelis VIS Docs Center

http://www.exelisvis.com/docs/ManageRasterData.html#Layer

Mask NaNs [All Bands]: Build a mask that includes all pixels which have a value of NaN in all bands (a logical AND operation). Mask NaNs [Any Band]: 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. 5. 6. 7. Specify the mask by clicking Select Mask Band. Click OK. The Apply Mask Parameters dialog appears. Enter the value in the Mask Value field. All areas in the input images where the mask equals zero are set to this mask value. Enter an output filename or select output to memory.

Example: Create ROIs to mask out specific pixel values


A common scenario is to create regions of interest (ROIs) to define pixels that you want to exclude from image processing or mosaics. Follow these generic steps to create a mask from ROIs: 1. Display the image, then select File > New > Region of Interest from the menu bar. 2. To create an ROI from specific data values (for example, all pixels with a value of 0), follow the steps in Create ROIs from Band Thresholds. This is the preferred method when defining background pixels or invalid image data. 3. To create an ROI from geographic features, follow the steps in Create ROIs from Geometry. Use the Polygon option to draw polygon ROIs around the features. 4. From the Region of Interest Tool, select File > Save As and save the ROI to .xml format. 5. In the Toolbox search window, type Build Mask. Double-click it to start the tool. 6. Select the input image, then click OK. 7. From the Mask Definition menu bar, select Options > Import ROIs. 8. Select the ROI file (.xml) that you just created, and click Open. 9. From the Mask Definition menu bar, select Options and choose one of the following: Selected Areas "Off": The pixels defined by the ROI will be assigned a data value of 0 in the mask file, meaning that those areas of the source image will be ignored during image processing after applying the mask. Selected Areas "On": The pixels defined by the ROI will be assigned a data value of 1 in the mask file. 10. Provide an output filename and location for the mask file. 11. Click Apply to create the mask file. 12. Select the mask file during the input file selection panel of any workflow (for example, Feature Extraction). Or, follow the steps under Apply Mask to permanently apply the mask to the source image.

New File Builder


Use New File Builder to create an ENVI-format file from a combination of ENVI files, external (foreign) files, or memory items. 1. From the Toolbox, select Raster Management > New File Builder. The New File Builder dialog appears. 2. Click Import File. The Create New File Input File dialog appears. 3. Select one or more files to include and perform optional spatial and spectral subsetting. You can subset a group of files if they are the same size; the subset is applied to each file. 4. Repeat the file selection using the Import File button for each input file to include 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, select the filename and click Delete. To change the order in which the files and/or bands are imported, click Reorder Files to open the Reorder Files dialog, and click on a filename or band name and drag it to the desired position in the list. To remove the component files, use the Remove Superfluous Files? toggle button to select Yes (remove files), or No, next to the text label. Note: Removing component files physically removes the files from the Layer Manager and the disk. If transferring memory items to the new file and you select Remove Superfluous Files? the items are deleted from memory when the new file is created. If transferring all of the bands from a disk file to the new file and you select Remove Superfluous Files? the original disk file is physically deleted from the disk when the new file (either memory or disk file) is created. 5. Select output to File or Memory. 6. Click OK to build the new file. ENVI creates the file in BSQ format.

Replace 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 Cursor Location/Value tool. Note: Use the Spatial Pixel Editor to interactively fix bad lines. 1. From the Toolbox, select Raster Management > Replace Bad Lines. 2. Select an input file and perform optional spatial and spectral subsetting, then click OK. The Bad Lines Parameters dialog appears. 3. In the Enter Bad Line field, specify which bad lines to replace and press Enter. The line appears in the Selected Lines list. To remove that line from the list, select 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 replace, click Clear. In the Half Width to Average field, enter the number of adjacent lines to use as an average for calculation of the replacement line. The value is symmetrical around the line to replace. For example, the value 2 means that two lines on either side of the selected line will be averaged to calculate the replacement. Click OK. The Bad Lines Output dialog appears. Select output to File or Memory. Click OK.

4. 5. 6. 7.

Resize Data
Use Resize Data to set x/y factors, output pixel size, and resampling values for an output raster file.

6 of 8

1/30/2014 4:03 PM

Manage Raster Data (Using ENVI) | Exelis VIS Docs Center

http://www.exelisvis.com/docs/ManageRasterData.html#Layer

See Spatial Subsetting. 1. 2. 3. 4. From the Toolbox, select Raster Management > Resize Data. The Resize Data Input File appears. Perform optional spatial subsetting. Click OK. The Resize Data Parameters dialog appears. Either enter the number of Samples and Lines in the corresponding fields, or enter the multiplicative x and y enlargement or reduction factors in the xfac and yfac fields and press Enter. The Output Size field updates. Note: If your image contains map information, you can determine the number of output sample and lines based 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 drop-down list (see Warp and Resample). If the xfac and yfac values are less than 1, select from Nearest Neighbor or Pixel Aggregate resampling options. 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 are updated. Nearest Neighbor resampling uses the nearest pixel value as the output pixel value. Pixel Aggregate resampling averages all the pixel values that contribute to the output pixel. If you enter 0.5 for both xfac and yfac, the output pixel values are calculated by averaging the four input pixel values. 5. Select output to File or Memory. 6. Click OK.

Rotate/Flip Data
Use Rotate/Flip Data to perform several standard image rotations, including 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 before registration. Note: 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. From the Toolbox, select Raster Management > Rotate/Flip Data. The Input File dialog appears. 2. Select an input file and perform optional spatial and spectral subsetting, then click OK. The Rotation Parameters dialog appears. This dialog varies slightly depending on whether you use a standard IDL rotation or an exact rotation angle. 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. 3. Select from the following rotation options: To apply a standard rotation (0, 90, 180, or 270 degrees), click Standard and select the rotation. To flip the x and y coordinates of the image, click the Transpose toggle button to Yes. To specify the exact rotation angle desired, enter a value in the Angle field (angles are measured clockwise from horizontal) and press Enter. 4. Select the resampling algorithm to use to calculate the output image from the Resampling drop-down list. The choices are Nearest Neighbor, Bilinear Interpolation, or Cubic Convolution. 5. Select output to File or Memory. 6. Click OK. ENVI adds the resulting output to the Layer Manager.

Stretch Data
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, and so forth). 1. 2. 3. 4. From the Toolbox, select Raster Management > Stretch Data. Select an input file and perform optional spatial and spectral subsetting, then click OK. The Data Stretching dialog appears. To calculate the statistics based on a statistics subset or the area under an ROI, click Stats Subset. Select the Stretch Type (Linear, Equalize (histogram equalized), Gaussian, and Square Root) from the appropriate radio button. If you select Gaussian, enter a standard deviation in the Stdv field. 5. Select a Stretch Range value of By Percent or By Value from the appropriate radio buttons. 6. Enter the minimum and maximum values in the Min and Max fields, respectively, to control the input data range. 7. Set the Output Data Range in the Min and Max fields. The values must match the ranges of the data type selected from the Data Type drop-down list (see next). 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. 8. From the Data Type drop-down list, 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). 9. Select output to File or Memory. 10. Click OK. If no statistics file exists for the selected input file, ENVI calculates the image statistics before data stretching and an Image Statistics window shows the percent processing complete as a slider that moves from 0 to 100%. If a statistics file already exists (or when the image statistics are calculated) a Data Stretching window shows the percentage of data stretching completed. When complete, ENVI adds the resulting file to the Layer Manager.

Subset Data via ROIs


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. 2. 3. 4. From the Toolbox, select Raster Management > Subset Data via ROIs. The Select Input File to Subset via ROIs dialog appears. Select an input file and perform optional spatial subsetting, then click OK. The Spatial Subset via ROI Parameters dialog appears. From the Select Input ROIs list, select the ROIs to include in the subset. Use the Mask pixels outside of ROI? toggle button to select whether or not to mask pixels outside of the selected ROI. If you select Yes, enter a Mask Background Value. 5. Select output to File or Memory. 6. Click OK. ENVI adds the resulting output to the Layer Manager.

Notes
This page has no user notes yet. Be the first one!

7 of 8

1/30/2014 4:03 PM

Manage Raster Data (Using ENVI) | Exelis VIS Docs Center

http://www.exelisvis.com/docs/ManageRasterData.html#Layer

Product ENVI Version 5.1

See also:

Atmospheric Correction Module Compute AVHRR Sea Surface Temperature Manage Raster Data Radiometric Correction Tools Transforms Vegetation Suppression

Table of Contents

Explore Imagery Preprocess Mosaic Georectify Detection Classification Feature Extraction Filters Radar Spectral Tools Terrain ROIs, Vectors, Annotations Vegetation Programming Tutorials About ENVI Application Shortcuts Supported Data Types Preferences

From Mike Galloys Blog

Tips for intermediate IDL programmers !DEBUG_PROCESS_EVENTS in IDL 8.3 IDL 8.3 released AGU 2013

Video Tutorial

The ENVI 5 Interface

This information is not subject to the controls of the International Traffic in Arms Regulations (ITAR) or the Export Administration Regulations (EAR). However, it may be restricted from transfer to various embargoed countries under U.S. laws and regulations.

PRODUCTS & SERVICES


ENVI IDL Professional Services

INDUSTRIES
Defense & Intelligence Environmental Monitoring Academic

LEARN
Code Videos Events & Training Case Studies Whitepapers Resources

SUPPORT
Forums Help Articles Reference Guides Updates & Maintenance

COMPANY
Mission Careers Press Room Legal Exelis, Inc

2014 Exelis Visual Information Solutions Register | Login

8 of 8

1/30/2014 4:03 PM

You might also like