IDLffMrSID::GetDimsAtLevel

The IDLffMrSID::GetDimsAtLevel function method is used to retrieve the dimensions of the image at a given level. This can be used, for example, to determine what level is required to fit the image into a certain area.

Syntax

Result = Obj->[IDLffMrSID::]GetDimsAtLevel (Level)

Return Value

Returns a floating-point two-element vector containing the dimensions of the image at a given level.

Arguments

Level

A scalar integer specifying the level at which the dimensions are to be determined. This level must be in the range returned by the LEVELS keyword of IDLffMrSID::GetProperty.

Keywords

None

Examples

Initialize the MrSID file object.

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

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

Get the range of levels of resolution contained within the file.

oFile->GetProperty, LEVELS = lvls

PRINT, lvls

IDL prints,

-9   4

Print the image dimensions at the lowest image resolution where image level = 4.

imgLevelA = MAX(lvls)

dimsAtA = oFile->GetDimsAtLevel(imgLevelA)

PRINT, 'Dimensions of lowest resolution image is', dimsAtA

IDL prints,

32   32

Print the image dimensions at full resolution where image level = 0

dimsAtFull = oFile->GetDimsAtLevel(0)

PRINT, 'Dimensions of full resolution image is', dimsAtFull

IDL prints,

512   512

Print the image dimensions at the highest resolution where image level = -9

highestLvl = MIN(lvls)

dimsAtHighest = oFile->GetDimsAtLevel(highestLvl)

PRINT, 'Dimensions of highest resolution image is', dimsAtHighest

IDL prints,

262144   262144

Clean up object references.

OBJ_DESTROY, [oFile]

Version History

5.5

Introduced