ENVINITF::OpenRaster
The OpenRaster function method creates a new ENVIRaster from selected image segments from a NITF file.
Example
; Start the application
e = ENVI(/HEADLESS)
; Open a NITF file
File = FILEPATH('MultiSegmentExample.ntf', ROOT_DIR=e.ROOT_DIR, $
SUBDIRECTORY = ['data', 'NITFExamples'])
NITF = ENVINITF(File)
; Open the first and third image segment
ImageSegs = NITF.OpenRaster([0,2])
; Print the first result
Print, ImageSegs[0]
Result:
ENVIRASTER <186846>
AUXILIARY_SPATIALREF = !NULL
AUXILIARY_URI = !NULL
DATA_TYPE = 'byte'
INTERLEAVE = 'bsq'
METADATA = <ObjHeapVar190094(ENVIRASTERMETADATA)>
NBANDS = 1
NCOLUMNS = 1024
NROWS = 1024
PYRAMID_EXISTS = 0
READ_ONLY = 1
SPATIALREF = !NULL
TIME = <ObjHeapVar190095(ENVITIME)>
URI = 'INSTALL_DIR\ENVIxx\data\NITFExamples\MultiSegmentExample.ntf'
Syntax
Result = ENVINITF.OpenRaster(Index, [, KEYWORDS=value])
Return Value
This method returns a scalar or array of ENVIRaster objects.
Arguments
Index
Specify a scalar or array of image segment indices, which can range from 0 to the number of image segments, minus one.
Keywords
These keywords are optional.
ALL
Set this keyword to return an ENVIRaster array of all available image segments. Any Index values you specify will be ignored.
DISPLAY_ONLY
Set this keyword to return a list of ENVIRaster(s) that have image segments whose IREP property is set to something other than NODISPLY. This typically represents the primary image segment that is displayable. This keyword is mutually exclusive from the ALL keyword.
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 Manage Errors for more information on error handling in ENVI programming.
SENSOR_MODEL
Specify a string with the sensor model to use. An example is 'RSM'
(replacement sensor model). To get a list of available SENSOR_MODEL values for the raster, use ENVINITFQuerySensorModels.
This keyword is only available with the ENVI Department of Defense (DoD) plug-in. This is a separate package that provides additional support in ENVI for data formats and sensor models that are commonly used by customers in the U.S. defense and intelligence community. It includes features such as Mensuration Services Program (MSP) integration, Community Sensor Model (CSM) support, TFRD, and additional NITF capabilities. Contact your sales representative for more information.
If the MSP Sensor Model Selection preference has been set to "Enable User Selection" and the SENSOR_MODEL keyword has not been set, then SENSOR_MODEL will default to using "Use MSP Default."
TERRAIN_SOURCE
Specify a string with the terrain source to use:
-
Best
: Used by default if a terrain source is not specified -
DTED0
-
DTED1
-
DTED2
-
Reference Point
-
SRTM0
-
SRTM1
-
Terrain Base
This keyword is only available with the ENVI Department of Defense (DoD) plug-in.
Version History
ENVI 5.6.1 |
Introduced |
ENVI 5.6.2 |
Added TERRAIN_SOURCE keyword |
API Version
4.2