IDLffMrSID::GetProperty

The IDLffMrSID::GetProperty function method is used to query properties associated with the MrSID image.

Syntax

Obj->[IDLffMrSID::]GetProperty [, CHANNELS=nChannels] [, DIMENSIONS=Dims] [, LEVELS=Levels] [, PIXEL_TYPE=pixelType] [, TYPE=strType] [, GEO_VALID=geoValid] [, GEO_PROJTYPE=geoProjType] [, GEO_ORIGIN=geoOrigin] [, GEO_RESOLUTION=geoRes]

Arguments

None

Keywords

CHANNELS

Set this keyword to a named variable that will contain the number of image bands. For RGB images this is 3, for grayscale it is 1.

DIMENSIONS

Set this keyword equal to a named variable that will contain a two-element long integer array of the form [width, height] that specifies the dimensions of the MrSID image at level 0 (full resolution).

GEO_ORIGIN

Set this keyword to a named variable that will contain a two-element double precision array of the form [x, y] that specifies the location of the center of the upper-left pixel.

GEO_PROJTYPE

Set this keyword to a named variable that will contain an unsigned integer that specifies the geoTIFF projected coordinate system type code. For example, type code 32613 corresponds to PCS_WGS84_UTM_zone_13N.

For more information on the geoTIFF file type and available type codes see https://trac.osgeo.org/geotiff/.

GEO_RESOLUTION

Set this keyword to a named variable that will contain a two-element double precision array of the form [xres, yres] that specifies the pixel resolution.

GEO_VALID

Set this keyword to a named variable that will contain a long integer that is set to:

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

LEVELS

Set this keyword equal to a named variable that will contain a two-element long integer array 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.

PIXEL_TYPE

Set this keyword to a named variable that will contain the IDL basic type code for a pixel sample. For a list of the data types indicated by each type code, see the “IDL Type Codes” section of the SIZE function.

TYPE

Set this keyword to a named variable that will contain a string identifying the file format. This should always be MrSID.

Examples

PRO MrSID_GetProperty

 

; Initialize the MrSID object.

oFile = OBJ_NEW('IDLffMrSID', FILEPATH('test_gs.sid', $

   SUBDIRECTORY = ['examples', 'data']))

 

; Get the property information of the MrSID file.

oFile->GetProperty, CHANNELS = chan, LEVELS = $

   lvls, Pixel_Type = pType, TYPE = fileType, GEO_VALID = geoQuery

 

; Print MrSID file information.

PRINT, 'Number of image channels = ', chan

; IDL returns 1 indicating one image band.

 

PRINT, 'Range of image levels = ', lvls

; IDL returns -9, 4, the minimum and maximum level values.

 

PRINT, 'Type code of image pixels = ', pType

; IDL returns 1 indicating byte data type.

 

PRINT, 'Image file type = ', FileType

; IDL returns "MrSID"

 

PRINT, 'Result of georeferencing data query = ', geoQuery

; IDL returns 0 indicating that the image does not contain

; georeferencing data.

 

; Destroy object references.

OBJ_DESTROY, [oFile]

 

END

Version History

5.5

Introduced