PRO test_image, imdata, status, imxsize, imysize, imtype ; Description: This module tests that the parameter "imdata" contains image data. In other ; words, it checks that "imdata" is non-empty, contains numbers of any of the ; types BYTE, INTEGER, LONG, FLOAT, DOUBLE, UINT, ULONG, LONG64 or ULONG64, ; and has exactly two dimensions. If the module finds that "imdata" does ; indeed contain image data, then it also determines the image size and saves ; this information in the parameters "imxsize" and "imysize". Finally, the ; module also returns the IDL type code of the parameter "imdata". ; ; Input Parameters: ; ; imdata - ANY - The parameter to be tested whether or not it satisfies the properties ; that an image array would have. ; ; Output Parameters: ; ; status - INTEGER - The parameter "status" is set to "1" if the parameter "imdata" is a ; non-empty array of numbers of any of the types BYTE, INTEGER, LONG, ; FLOAT, DOUBLE, UINT, ULONG, LONG64 or ULONG64, with exactly two ; dimensions. Otherwise, the module sets the value of "status" to "0". ; imxsize - LONG - The image size along the x-axis (pix). This parameter is only calculated ; if "status" is set to "1". ; imysize - LONG - The image size along the y-axis (pix). This parameter is only calculated ; if "status" is set to "1". ; imtype - INTEGER - The IDL type code of the pixel values stored in "imdata". Note that IDL ; type codes of 1, 2, 3, 4, 5, 12, 13, 14 and 15 correspond to variable ; types of BYTE, INTEGER, LONG, FLOAT, DOUBLE, UINT, ULONG, LONG64 and ; ULONG64, respectively. ; ; Author: Dan Bramich (dmb@ing.iac.es) ; ; History: ; ; 14/08/2008 - Module created (dmb) ;Determine the IDL type code for "imdata" ;Check that "imdata" has two dimensions ;If "imdata" is two-dimensional and contains numbers of any of the types BYTE, INTEGER, LONG, FLOAT, ;DOUBLE, UINT, ULONG, LONG64 or ULONG64, then set the value of "status" to "1" and determine the ;image size