IMAGE_DIMENSIONS
The purpose of this function is to return the various dimensions of the image,
and also to extract relevant image information via output keywords. The
function works only with 2D and 3D (24-bit) images, with or without alpha
channels.
Categories
Utilities
Returns
A vector containing the size of each dimension of the image. It is equivalent
to calling the SIZE function with the DIMENSIONS keyword set.
Params
image: in, optional, type=various
The image variable from which information is to be obtained.
Keywords
alphachannel: out, optional, type=boolean
This keyword is set to 1 if there is an alpha channel in the image. Otherwise,
the keyword is set to 0.
trueindex: out, optional, type=integer
The position of the "true color" index in the return value. Is -1 for 2D images.
xindex: out, optional, type=integer
The index (position) of the X dimension in the return value.
xsize: out, optional, type=integer
The X size of the image.
yindex: out, optional, type=integer
The index (position) of the Y dimension in the return value.
ysize: out, optional, type=integer
The Y size of the image.
Examples
To load open a window of the appropriate size and display a 24-bit image::
dims = Image_Dimensions(image24, XSize=xsize, YSize=ysize, TrueIndex=trueindex)
Window, XSIZE=xsize, YSIZE=ysize
TV, image24, TRUE=trueindex
Author
FANNING SOFTWARE CONSULTING::
David W. Fanning
1645 Sheely Drive
Fort Collins, CO 80526 USA
Phone: 970-221-0438
E-mail: david@idlcoyote.com
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
History
Modification History
Written by: David W. Fanning, 5 March 2003.
Added support for alpha channel images, include ALPHACHANNEL keyword. 13 May 2009. DWF.
Copyright
Copyright (c) 2003-2011, Fanning Software Consulting, Inc.