Save NITF Files

This topic describes additional information about using the Save As option to save an existing NITF or raster dataset to a new NITF file. See Save Files for steps on how to save the file. To save a screen capture (or chip) of all layers in the current view, see Chip the View.

See the following sections for more information on how NITF file components are preserved on output:

Compression Options

NITF 2.1 images can be saved in NSIF Preferred JPEG 2000 Encoding (NPJE) format with numerically lossless and visually lossless compression settings. NITF 2.1 images can also be saved in Exploitation Preferred JPEG 2000 Encoding (EPJE) format with visually lossless and numerically lossless settings.

The types of compression available (if any) are determined by the data type and the NITF output version selected, as indicated in the table below. Higher compression rates result in smaller files with lower quality.

The following table shows the available compression types.

NITF Output Version

Data Type

Compression Types

All versions

1- or 3-Band Byte

JPEG DCT (High compression)

JPEG DCT (Medium compression)

JPEG DCT (Low compression)

NITF 2.1 and NSIF 1.0 (NPJE, EPJE)

Any Integer data type

 

 

Floating Point, Double

JPEG 2000 NPJE (Visually Lossless)

JPEG 2000 NPJE (Numerically Lossless)

JPEG 2000 EPJE (Visually Lossless)

JPEG 2000 EPJE (Numerically Lossless)

None

Supported data types and other criteria for export are described in the following table.

Compression Type

NITF 2.0

NITF 2.1

None

# of Bands: 1, 3, or 4

Data Types:

  • 8-bit unsigned integer
  • 16-bit unsigned integer

# of Bands: 1-999

Data Types:

  • 8-bit unsigned integer
  • 16-bit unsigned integer
  • 16-bit signed integer
  • 32-bit unsigned integer
  • 32-bit signed integer
  • floating-point
  • double precision

JPEG DCT

# of Bands: 1 or 3

Data Types: Byte

# of Bands: 1 or 3

Data Types: Byte

JPEG 2000 NPJE

Not available

# of Bands: 1-999

Data Types:

  • 8-bit unsigned integer
  • 16-bit unsigned integer
  • 16-bit signed integer
  • 32-bit unsigned integer
  • 32-bit signed integer
  • 32-bit floating point
  • complex

JPEG 2000 EPJE

Not available

# of Bands: 1-999

Data Types:

  • 8-bit unsigned integer
  • 16-bit unsigned integer
  • 16-bit signed integer
  • 32-bit unsigned integer
  • 32-bit signed integer
  • 32-bit floating point
  • complex

You can edit all security and origination information contained in the file, along with image settings controlling how the image is written (including image blocking settings) using NITF Preferences. Many of these settings have no required values, some have only a short list of acceptable values, and others are dependent on the values present in other fields.

NPJE

You can save NITF 2.1 images in NPJE (NSIF Preferred JPEG 2000 Encoding) with numerically lossless and visually lossless settings.

If you choose JPEG 2000 NPJE compression, ENVI creates a J2KLRA TRE and removes the existing J2KLRA TRE, if present. If you save a file containing a J2KLRA TRE to an uncompressed file, ENVI removes the J2KLRA TRE.

EPJE

You can save NITF 2.1 images in Exploitation Preferred JPEG 2000 Encoding (EJPE) format with visually lossless and numerically lossless settings. When saving from a NITF file with an existing J2KLRA TRE, a new J2KLRA TRE is created because the image is being recompressed. NITF EPJE files display faster than NPJE files and EPJE is a required output format for IEC workstations.

ENVI cannot create an EPJE file without creating a temporary file. It uses the default temporary directory specified in NITF Preferences.

Transcoding

If you are saving a single C8 image segment without subsetting it, two additional options appear in the Compression drop-down list in the Save As dialog:

If you select one of these transcoding options, the image codestream is reordered to match the profile as closely as possible, and the codestream is neither decompressed nor recompressed.

The following changes may occur in the codestream, depending on the input profile of the codestream and the output option selected:

The following do not change:

If the image segment contains a J2KLRA or HISTOA TRE, these are updated with the appropriate information.

Note: Transcoding is not available for image segments that are embedded JPEG 2000 files.

File Headers

When you create a new NITF file from an existing dataset, the header settings from the source dataset are saved to the new file, except for the following values: 

Image segments cannot contain masks used to alter image values for display, when you create NITF output.

ENVI passes through or fills in by default some metadata. For more information, see the sections that follow.

Edit Metadata

When you save an image to NITF format or when you chip the current view to a NITF file, you can edit various NITF metadata fields. This topic describes the options that are available in the NITF Metadata Editor dialog.

Text Segments

PIA TREs

Profile for Imagery Access and Profile for Imagery Archive (PIA) TREs are used to hold information required by the Standards Profile for Imagery Access (SPIA). See Background on PIA TREs for rules on which ones you can edit.

Data Extension Segments

When you save an existing NITF file to NITF format, supported DES segments are preserved in the new file. ENVI currently only supports NITF Commercial Dataset Requirements Document (NCDRD) DESes. You cannot edit, create, or delete NCDRD DESes through the NITF Metadata Editor. When writing a NITF file that contains a DES with no corresponding XML file, ENVI passes through this unknown DES.

Tagged Record Extensions

When you save a NITF file to a new NITF file, supported TREs associated with any exportable segments are preserved in the new file. A warning message is provided if any TRE is not supported.

If you select a spatial subset of an input dataset for output, the ICHIPB TRE is used to maintain the relationship of the output image data to the source image data and to ensure the validity of any other TRE. The ICHIPB TRE contains the size and position of the subset and is written in the image segment. A new ICHIPB TRE is added to the list of TREs when you export an image segment with a TRE with any spatial subset other than the entire image. If the ICHIPB TRE already exists, it is modified for the new (smaller) subset of the initial subset to still contain the correct parameters from the original source image, not the initial subset.

If a NITF image segment contains HISTOA TREs and NEVENTS is not equal to the maximum value of 99 in the last HISTOA TRE, ENVI automatically updates this TRE upon output. If NEVENTS is equal to 99 in the last HISTOA TRE, ENVI creates a new HISTOA TRE.

Image Segments

NITF image segments can be created from any supported data type except 64-bit integer and complex. Image segments are populated in this way:

ENVI adds the RPC00B TRE when exporting to any NITF file containing RPC information. The RPC00B TRE is automatically created when this information is available, and the ICHIPB TRE is created if needed. These TREs will be stored in the image segment of the new NITF file. The ICHIPB TRE is required if a spatial subset of the input image is selected or the input image is a subset of a larger product.

ENVI may also create GEOPSB, PRJPSB, GEOLOB, or MAPLOB TREs if the input file contains map information.