QUERY_MRSID

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.

Examples

; Select the image file.
file = QUERY_MRSID(FILEPATH('test_gs.sid', $
   SUBDIRECTORY=['examples', 'data']), info, LEVEL = -2)

HELP, file
; IDL returns 1 indicating the correct file type
; and successful query.

; Print the range of levels of resolution available within
; the file.
PRINT, 'Range of image levels = ', info.LEVELS

; Print the image dimensions when the image level is set to -2
; as specified by LEVEL = -2 in the QUERY_MRSID statement.
PRINT, 'dimensions of image at LEVEL is -2 =', info.DIMENSIONS
; IDL returns 2048 by 2048

; Check for valid georeferencing data.
PRINT, 'Result of georeferencing query', info.GEO_VALID
; IDL returns 0 indicating that the file does not contain
; georeferencing data.

Syntax

Result = QUERY_MRSID( Filename [, Info] [, LEVEL=lvl] )

Return Value

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.

Arguments

Filename

A scalar string containing the full path and filename of the MrSID file to query.

Info

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:

Note: Always verify that this keyword returns 1 before using the data returned by any other GEO_* keyword.

See IDLffMrSID::GetProperty for more information on GEO_* values.

Keywords

LEVEL

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.

Version History

5.5

Introduced