Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - How to edit ENVI file header
How to edit ENVI file header
If the header file (. Hdr file) or other valid header information, the Header Information dialog box will appear. You will use this dialog box to enter the number of samples or pixels, the number of lines, the number of bands, the byte offset from the beginning of the file to the beginning of the data (embedded file header), the storage order of the data ("crossing") (BSQ: band order, BIP: band staggered by pixels, or BIL: band staggered by rows), and the byte order of the data ("host (Intel)": for dec machines and PCs. For all other platforms, network is the most effective priority), data type (byte, integer, floating point, etc.). ), and the file type. Other options include setting the default Z-map range, default display stretch, geo-reference information entry, relevant wavelength and full width at half maximum, sensor type, band name and bad band.

Before ENVI displays an imported image, the necessary information must be input into the Header Info window. If a file has no ENVI header or other supported header formats, this window will automatically appear. Every time you open a data file, ENVI searches the header file and uses this information to open the file. This information only needs to be entered once. When you select the "OK" button at the bottom of the Header Info window, it will be automatically saved to the input directory of an ENVI header file.

ENVI editing header file function can also be used to change the information of existing header files.

ENVI saves information about files in a separate text header file. This header file has the same name as the image file name, but the file extension is. hdr。 The Edit ENVI Header function allows you to change the file header information. Whenever a data file is opened, ENVI searches the header file and uses this information to open the file.

If you need to edit the ENVI file header, follow the following steps:

1. select file > edit ENVI title. The standard ENVI input file dialog box will open, providing you with a list of open files from which you can choose.

2. Click the desired file name. In the text box labeled "file information", ENVI displays the details about the file.

3. Confirm whether the information is correct.

To edit the displayed parameters, follow these steps:

4. Click OK to start the header information dialog box. The header information dialog box has an editable text area where you can enter header information from and.

Edit attribute drop-down menu.

When you have finished editing, click OK.

If the file header of the currently opened file has been edited, ENVI will close the file; After selecting OK, reopen it. Because when the file is closed, the monitor used by the file will also be closed.

You must select again from the ENVI main menu or the list of available bands.

Activate these monitors.

& ltXML namespace prefix = " v " ns = " urn:schemas-Microsoft-com:vml "/& gt; & ltXML namespace prefix = " o " ns = " urn:schemas-Microsoft-com:office:office "/& gt;

Title information dialog box

The Title Information dialog box includes an editable text area for common image parameters and two drop-down menus. In the Title Information dialog box, you can click the option in the Edit Properties drop-down menu to call a separate dialog box to edit specific file title parameters. These parameters include band name, wavelength, map information and so on. Details are as follows.

Edit general image parameters

In the Title Information dialog box, you can edit general image parameters. Each text area is described as follows:

The Samples text area shows the number of samples in the file.

The Lines text area shows the number of lines in the file.

The Band text area shows the number of bands stored in the file.

The Offset text area shows the byte offset from the beginning of the file to the beginning of the actual data. (The "offset" is sometimes called an embedded file header. )

The "xstart" and "Ystart" text areas show the pixel offsets of images of other image subsets. Offset allows linking related images and using dynamic overlay.

Use the Data Type drop-down menu to select the appropriate data type (byte, integer, unsigned integer, long integer, unsigned long integer, floating point, double precision, compound or double precision compound).

Use the Byte Order drop-down menu to select the byte order of the data. This parameter is different on different platforms:

For DEC and PC, select "Host (Intel)": the least important host is preferred.

For all other platforms, select Network (IEEE): It is most important to select the network first.

Use the Interleave drop-down menu and select the following options to determine the data storage order:

"BSQ" stands for sequential storage format.

"BIL" stands for the form of bands crossing in rows.

"BIP" means that the stripe is in the format of pixel crossing.

Use the text area at the bottom of the Header Information dialog box to insert string text that describes the data file. (TM image of Hong Kong SAR Landsat-13 February, 1989)

The drop-down menu of the File Type button is described as follows.

List file types

ENVI uses the "file type" file header area to automatically identify some data file types. The "File Type" text area allows many file types to have an ENVI file header when they exist in their own format. By looking at the filetype.txt file in the menu directory (all versions of ENVI are available), you can see a list of all recognized file types. You can edit files and add new user-defined file types.

File types include file types unique to ENVI, such as metafiles, classified files, virtual mosaics, spectral libraries and FFT results. File types also include specific data formats, such as NLAPS, RadarSat, Spot, etc. In addition, TIFF, BMP, ERDAS 8.x and PCI files can also be recognized.

Enter title information from the menu.

The Enter Title Information drop-down menu of the Title Information dialog box allows you to merge the title information of another file into the current title.

1. Select from > and enter the title information; Other documents.

2. Select the title information file to read, and then click OK.

Edit properties button

The edit properties drop-down menu in the header information dialog box provides you with a way to edit the header information of auxiliary files, such as band name and wavelength. The Edit Properties menu also allows you to decide which images to use to display complex data types, edit maps, categories, Z-charts, and stretch information.

These options are described in detail below.

Edit subtitle information

ENVI file header can have corresponding auxiliary information according to the image data type (band name, spectrum library name, wavelength, bad band list, FWHM, etc. ). You can change these values, or follow these steps to read them into the header file:

To select a bad band:

1. select edit properties > bad band list.

2. In the Edit Bad Band List Value dialog box, select a bad band.

To select a group of files displayed in succession, first click the first item, hold down the shift key, and click the last item in the group.

To select a set of files that are not displayed consecutively, first click an item, and then hold down the "Ctrl" key while clicking all other required items.

To deselect all bands, click Clear.

To select a specific range of bands:

A. In the two text boxes next to the Add Range button, enter the number of starting and ending bands.

B. Click "Add Range".

3. Click OK.

To select other attributes for editing:

1. select edit properties > band name, spectrum library name, wavelength or FWHM to activate the corresponding dialog box.

If you have previously added or edited the parameter values listed above, these values will be displayed under the text label "Current parameter values:" ("parameter" refers to one of the items displayed above). Otherwise, the system defaults will be displayed.

2. From the displayed list, click the value to edit.

This value is highlighted in the text box under the Edit Selected Item tab.

3. In the text box, type the new value.

Band names can be renamed according to the spectral range of each band.

To import data from an ASCII file:

1. In any edit value dialog box, click Import ASCII.

2. When the standard ENVI file selection dialog box appears, open the required ASCII file.

The number of lines in the ASCII file must match the number of bands in the image file. An ASCII file can contain one or more columns of ASCII data, but the file used to import the name of the band can only contain strings. When you open a file that contains the first few values of an ASCII file, the Import ASCII File dialog box appears.

The Wavelength Column text box specifies which column of the ASCII file to read the wavelength from.

The multiplication scale factor entered in the Multiplication Factor text box allows the wavelength value to be scaled in real time. For example, typing the value "100" and pressing Enter will multiply the imported wavelength value by 100.

The FWHM column specifies the column from which bandwidth information is obtained (for spectral resampling).

The Bad Band List column uses "0" to block the band of the specified wavelength.

3. Click OK, type the new parameter values, and return to the header information dialog box.

4. In the Header File Information dialog box, click OK to write all changes to the header file.

Default loading band

This option allows bands to automatically import the grayscale or R, G and B text boxes of the list of available bands when the file is opened. Click the "Load" or "Load RGB" button, and the default band will be displayed. You can choose a grayscale image or a color image.

1. From the header information dialog box, select Edit Attribute >; The default band to load.

The Default Band to Load dialog box displays a list of all bands in the file.

2. Click the band name to import red (R), green (G) and blue (B) electron guns.

If only one band is selected, it will be imported as a grayscale image.

Click "Reset" to clear all bands.

3. Click OK to return to the title information window.

Map information dialog box

Map information is related to files located by geographical coordinates. To establish a data coordinate system for geographic coordinate positioning, users must know the sample point and row coordinates of a pixel (reference pixel), the size (meters) of the pixel, the map projection and map coordinates of the pixel.

1. From the header information dialog box, select Edit Attribute >; Map information.

2. In the map information dialog box, enter the coordinates of reference pixels in the text boxes marked with "Image Coordinates X" and "Y", and enter the pixel size in the text boxes marked with "Pixel Size X" and "Y".

3. Click Change Projection and select the appropriate projection from the projection list to determine the map projection.

If you choose Any, you can choose Pixel-based or Map-based near the Coordinates tab.

If you select the Geographic Latitude/Longitude: button, click the Data button and select the available data from the Select Geographic Data dialog box to determine the data type.

If UTM is selected, enter a number in the Region text box, select the N or S toggle button, and then select a data (if necessary).

If one of the "national planes ……" is selected for projection, click the arrow switch button and select "feet" or "meters"; Determine a region by entering it in the Region text box or clicking Region to select from the list.

4. Enter the coordinates of the reference cell in the appropriate text box.

The corresponding latitude and longitude will be automatically calculated. Click the switch button to "Geographic Coordinates" to view it.

5. Click OK to return to the title information window.

Geographical corner

If your file is not located by geographical coordinates, but includes geographical information, this option allows you to put the information in the ENVI header file. At present, ENVI uses the first geographical point to place a sign on the geobrowser to show the location of the file. Other points remain in the file header as user information.

1. From the header information dialog box, select Edit Attribute >; Geographical corner.

2. Enter the position between the first and fourth pixels and their corresponding latitude and longitude.

Pixel size (pixel size)

To enter the cell size in the file header:

1. From the header information dialog box, select Edit Attribute >; Pixel size.

2. Enter the X and Y cell sizes in the appropriate text boxes, and select the required units from the Unit drop-down menu.

Because the pixel size of Landsat TM sensor is about 30 meters by 30 meters, click the Edit Properties button and select the pixel size ... For the x and y pixel sizes, click in the text box and change the value to 30. Now make sure that the unit is set to meters. To complete the update, click OK. Now change the sensor type to "Landsat TM".

Classification information (classification information)

If you need to modify the name and color of a category, please follow these steps:

1. From the header information dialog box, select Edit Attribute >; Classified information.

For this option to be valid, the File Type must be set to Classification.

2. In the classification information dialog box, enter the category number; Then click OK.

3. When the category color mapping editing dialog box appears, click the category name of the area you want to change from the Selected Category list.

After selecting the category name, you can change it in the "Class Name:" text area.

To change the category color in the RGB color space (each of the three colors is 0-255), move the three sliders labeled red, green or blue.

To reset to the original category color and name, click Reset.

To change the category color in HSV or HLS color space:

A. Select the appropriate system from the "System" drop-down menu in the "Category Color Map Editing" dialog box.

B move the "hue, saturation, value" or "hue, brightness, saturation" slider to the desired value.

4. To make a thorough change, click OK.

pay attention to

ENVI will not be able to run these color changes automatically on the 24-bit color monitor. For 24-bit hardware, changing the color of the image will be replaced by clicking the Apply Changes button. This button only appears when 24 is colored.

Z-picture information (Z-picture information)

If you need to edit the parameters used to draw the Z section, set the axis title, set the size of the Z drawing box, or specify another Z section file name, please follow the following steps:

1. From the header information dialog box, select Edit Attribute >; Z drawing information.

2. The dialog box for editing Z-diagram information will open, allowing you to set these parameters:

To set the Z drawing range, enter the minimum and maximum values in the left and right text boxes next to the Z drawing range label.

To set the axis title, enter the desired axis title in the X Axis Title and Axis Title text boxes.

To specify the size (in pixels) of the box for calculating the average spectrum, enter parameters in the text area of the Z-Graph Average Box.

To specify another file name from which to extract the Z profile:

A. click attach z profile by default.

B when the default attach z-profile dialog box appears, click add new file.

C. Select the desired file name, and then click OK. The file name will appear in the list.

To delete a file name from the list, first click the file name, and then click Delete Selected File.

Sensor type (sensor type)

To store sensor type information in the ENVI file header:

1. From the header information dialog box, select Edit Attribute >; Sensor type.

2. Select the appropriate type from the list.

Now change the sensor type to "Landsat TM".

Default stretching

To set the system default stretch for the display band:

1. From the header information dialog box, select Edit Attribute >; Default stretch.

2. Select the appropriate stretch type from the drop-down menu near the Default Stretch text box.

Your choices include% linear (linear stretch percentage), linear range (linear stretch range), Gaussian (Gaussian distribution), equalization (equalization), square root (square root) or none (no stretch). Some extrusions require you to enter additional information.

For "%Linear" stretching, enter the percentage of data clipping (that is, 5%).

For the Linear Range stretch, enter the minimum and maximum DN values for the stretch.

For Gaussian stretching, enter the standard deviation number of the stretching.

ENVI saves the stretching settings in. Hdr file. Whenever you display this image, the stretching setting will override the default stretching of the whole system in the envi.cfg file.

Complex search function

For complex data types, you can use this option to decide which image to display.

1. In the header information dialog box, select Edit Properties >; Complex search function.

2. When the Complex Data Lookup Function dialog box appears, select the required lookup function from the drop-down menu.

The options are: real number (real part of number), imaginary part (imaginary part), power (power, log 10 of module), amplitude (square root of sum of squares of module, real part and imaginary part), phase (phase, inverse resection of imaginary part takes real part)-

Line offset (line offset)

You can use this option to set the number of extra bytes to skip at the beginning and end of a line.

1. In the header information dialog box, select Edit Properties >; Line offset.

2. In the Edit Line Offset dialog box, enter or select the number of prefix and suffix bytes to skip by clicking the arrow button or typing in the text box.

3. Click OK.

Band offset (band offset)

You can use this option to set the number of extra bytes to skip at the beginning and end of a segment.

1. In the header information dialog box, select Edit Properties >; Band offset.

2. In the Edit Band Offset dialog box, click the arrow button or enter or select the number of prefix and suffix bytes to skip for each band in the text box.

3. Click OK.

Input IDL variable (import IDL variable)

This option allows you to enter any IDL variable defined in the ENVI command line. One-dimensional variables will be placed in the chart window. 2D and 3D variables will be displayed as memory data items in the list of available bands.

Enter the IDL variable into ENVI:

1. choose file > import IDL variable.

2. The Import IDL Variables dialog box will display a list of all defined variables.

3. Select the desired variable name input by clicking the check box next to the variable name.

To add a series of variable names, enter the starting and ending variable numbers, and then click the Add Range button.

To select all variable names, click the Select All button.

To clear the selected variable name, click the Clear button.

4. To save data backup in IDL, use the arrow switch button to select "Yes". If "No" is selected, the data will be input to ENVI and deleted from IDL.

5. Click OK and enter the required variables.

One-dimensional variables will be placed in the chart window. 2D and 3D variables will be displayed as memory data items in the list of available bands.