The QUERY_MRSID function allows you to obtain information about a MrSID image file without having to read the file. It is a wrapper around the object interface that presents MrSID image loading in a familiar way to users of the QUERY_* image routines. (See QUERY_* Routines for more information.) However this function is not as efficient as the object interface and the object interface should be used whenever possible. See IDLffMrSID for information about the object interface.
Note: This routine is only available under Microsoft Windows.
file = QUERY_MRSID(FILEPATH('test_gs.sid', $
SUBDIRECTORY=['examples', 'data']), info, LEVEL = -2)
PRINT, 'Range of image levels = ', info.LEVELS
PRINT, 'dimensions of image at LEVEL is -2 =', info.DIMENSIONS
PRINT, 'Result of georeferencing query', info.GEO_VALID
Result = QUERY_MRSID( Filename [, Info] [, LEVEL=lvl] )
This routine returns a long with the value of 1 (one) if the query was successful (and the file type was correct) or 0 (zero) on failure.
A scalar string containing the full path and filename of the MrSID file to query.
Returns an anonymous structure containing information about the image in the file. The Info.TYPE field will return the value 'MrSID'.
Note: See General Query * Routine Info Structures for detailed structure information.
The info structure also has the following the MRSID-specific fields:
- info.LEVELS – a named variable that will contain a two-element integer vector of the form [minlvl, maxlvl] that specifies the range of levels within the current image. Higher levels are lower resolution. A level of 0 equals full resolution. Negative values specify higher levels of resolution.
- Info.GEO_VALID – a long integer with a value of 1 if the file contains valid georeferencing data, or 0 if the georeferencing data is nonexistent or unsupported.
Note: Always verify that this keyword returns 1 before using the data returned by any other GEO_* keyword.
- Info.GEO_PROJTYPE – unsigned integer.
- Info.GEO_ORIGIN – 2-element double precision array.
- Info.GEO_RESOLUTION – 2-element double precision array.
See IDLffMrSID::GetProperty for more information on GEO_* values.
Set this keyword to an integer that specifies the level to which the DIMENSIONS field of the info structure corresponds. This can be used, for example, to determine what level is required to fit the image into a certain area. If this keyword is not specified, the dimensions at level 0 are returned.