The Export method saves an ENVIDeepLearningRaster to a specific format. This method creates a new file, but it does not change the existing raster.

This method is part of ENVI Deep Learning, which requires a separate license and installation.

Example


Sample data files are available on our ENVI Tutorials web page. Click the "Deep Learning" link in the ENVI Tutorial Data section to download a .zip file containing the data. Extract the contents to a local directory.

; Launch the application
e = ENVI()
 
; Open a label raster
File = Filepath('LabelRasterContainers.dat', $
  Subdir=['data','deep_learning'], Root_Dir=e.Root_Dir)
Raster = ENVIDeepLearningLabelRaster(File)
 
; Create a temporary output file
newFile = e.GetTemporaryFilename('tif')
 
; Export the raster as a TIFF file
Raster.Export, newFile, 'TIFF'
 
; Open the TIFF file
newRaster = e.OpenRaster(newFile)
View = e.GetView()
Layer = View.CreateLayer(newRaster)

Syntax


ENVIDeepLearningLabelRaster.Export, URI, Format [, Keywords=value]

Arguments


URI

A scalar string denoting the fully qualified file path in which the raster will be saved.

Format

A scalar string denoting the format in which the raster(s) will be saved. An error will be thrown if the format is unrecognized or unsupported by the raster. The valid string values are as follows; they are not case-sensitive:

  • ENVI
  • NITF: National Imagery Transmission Format (NITF); set the NITF_COMPRESSION keyword as needed.
  • TIFF

Keywords


Keywords are applied only during the initial creation of the object.

Note: Keywords not associated with the given format are quietly ignored.

DATA_IGNORE_VALUE

Set this keyword to specify a unique data value to use on output for any pixels that have a pixel state of non-zero (No Data, Mask, Outside of ROI). If the ENVIRasterMetadata object associated with the ENVIRaster already contains a data ignore value and you do not set this keyword, that value will be used. For more details on pixel state, see the Raster Pixel State topic in ENVI Help.

ERROR

Set this keyword to a named variable that will contain any error message issued during execution of this routine. If no error occurs, the ERROR variable will be set to a null string (''). If an error occurs and the routine is a function, then the function result will be undefined.

When this keyword is not set and an error occurs, ENVI returns to the caller and execution halts. In this case, the error message is contained within !ERROR_STATE and can be caught using IDL's CATCH routine. See IDL Help for more information on !ERROR_STATE and CATCH.

See the Manage Errors topic in ENVI Help for more information on error handling.

INTERLEAVE

Set this keyword to a string specifying the interleave of the raster:

String Interleave Data Array
bil

Band interleaved by line

[ncolumns, nbands, nrows]

bip

Band interleaved by pixel

[nbands, ncolumns, nrows]
bsq

Band sequential

[ncolumns, nrows, nbands]

  • This keyword is optional; the default value is bsq if you do not set it.
  • You cannot use the INTERLEAVE keyword for NITF output (if the Format argument is set to nitf). By default, NITF three-band images that use any of the JPEG DCT compression modes will output with BIP interleave; otherwise, the default interleave is BSQ.
  • TIFF files do not support BIL interleave, only BIP and BSQ.

NITF_COMPRESSION

If you specify NITF as the Format value, set this keyword to a string denoting the NITF compression type, listed below.

The following NITF_COMPRESSION options are only available for use when the NITF Version is set to NITF02.10 or NSIF01.00 in ENVI Preferences (NITF > NITF File Settings), and the data type is byte, integer, unsigned integer, long integer, and unsigned long integer:

  • epje num lossless
  • epje vis lossless
  • npje num lossless
  • npje vis lossless
  • transcode epje to npje: Only works for NITF files that are C8-compressed and are not spatially subsetted
  • transcode npje to epje: Only works for NITF files that are C8-compressed and are not spatially subsetted

The following options work in all supported NITF versions for rasters that have one or three bands, and the data type is byte:

  • jpeg dct (high)
  • jpeg dct (low)
  • jpeg dct (medium)

The default value is no compression.

Version History


Deep Learning 1.0

Introduced

See Also


ENVIDeepLearningLabelRaster