ENVITiePointSet::Get
The Get function method retrieves one or more elements from an ENVITiePointSet object. While a PRINT command on an ENVITiePointSet object will list all of the tie points, the Get method lets you access the actual tie point data.
Example
This example uses a sample auto-generated tie point file that was created by choosing the default options in the Image Registration workflow, using two input images quickbird_2.4m.dat
and ikonos_4.0m.dat
. The sample tie point file (SampleTiePoints.pts
) and images are available from the ENVI Tutorials web page. Click the Image Registration link to download the .zip file to your machine, then unzip the files. Edit SampleTiePoints.pts
to include the full path to the sample images quickbird_2.4m.dat
and ikonos_4.0m.dat
.
; Start the application
e = ENVI()
; Open an existing tie point file
tiePointFile = 'SampleTiePoints.pts'
tiePoints = ENVITiePointSet(tiePointFile)
; Return a list of all tie points as an array of structures
All = tiePoints.Get()
Print, All
; Return one tie point(whose index is 0) as a structure
Number0 = tiePoints.Get(0)
Print, Number0
Syntax
Result = ENVITiePointSet.Get([Indices] [, ERROR=variable])
Return Value
This method returns one of the following:
- A structure, if you specify a scalar for the Indices argument.
- An array of structures:
- If you do not specify the Indices argument, or
- If you specify an array of Indices arguments. For example, the following statement retrieves an array of structures with two elements:
point = tiePoints.Get([0,3])
Arguments
Indices (optional)
Specify a scalar value or array of values representing the zero-based indices of the tie points to retrieve. If you do not specify this argument, all tie points will be retrieved. Use the PRINT command on the ENVITiePointSet object to obtain index numbers, if needed.
Keywords
ERROR (optional)
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.
Version History
ENVI 5.2. 1 |
Introduced |
API Version
4.2