mglib

Personal IDL library for M. Galloy

single page | use frames     summary     class     fields     routine details     file attributes

vis/images/

mg_image_getsize.pro

includes main-level program

Return the x and y size of the given image array.

Routines

top mg_image_getsize

result = mg_image_getsize(im [, true=long] [, n_channels=long])

Returns the size of the image array as a two element array, [xsize, ysize]. The TRUE keyword can be set to indicate the interleave or it can be guessed if the TRUE keyword is not present.

Return value

lonarr(2)

Parameters

im in required type=image array

image array of the form (m, n), (3, m, n), (m, 3, n), or (m, n, 3)

Keywords

true in out optional type=long

Set to 0 for (m, n) array images, 1 for (3, m, n), 2 for (m, 3, n), and 3 for (m, n, 3).

If TRUE is not present, MG_IMAGE_GETSIZE will attempt to guess the size. 2D images will automatically be set to TRUE=0; 3D images' dimensions will be searched for a size 3 dimension.

The TRUE value used will be returned through the variable if it was not passed into the routine.

n_channels out optional type=long

set to a named variable to get the number of channels (or bands) for the image; will be 1, 2, 3, or 4

File attributes

Modification date: Wed May 14 15:07:15 2014
Lines: 51
Docformat: rst rst
Personal library of Michael Galloy
Contact me if you have enhancement requests or bug fixes.