Syntax
Document.CalcAreaInfo( X0, Y0, X1, Y1[, Plane ] )
Parameters
Short X0 - X-coordinate of one corner of a rectangle
Short Y0 - Y-coordinate of one corner of a rectangle
Short X1 - X-coordinate of the diagonally opposite corner of the rectangle
Short Y1 - Y-coordinate of the diagonally opposite corner of the rectangle
Short Plane - Image plane for which measurement is to be determined. This must be zero for a monochrome image; for a color image it can be 1, 2 or 3 to specify the red, green, or blue planes respectively, or 0 to return an average of the results from all three planes.
Returns
VARIANT array of 4 VARIANTs containing various measures present in the Information Window when in Area mode:
result(0) - Maximum pixel value within rectangle (X0,Y0)-(X1,Y1)
result(1) - Minimum pixel value within rectangle (X0,Y0)-(X1,Y1)
result(2) - Average pixel value within rectangle (X0,Y0)-(X1,Y1)
result(3) - Standard deviation of pixels within central spot
Remarks
This method is equivalent to dragging out the specified rectangle on the image window and transcribing data from the Information Window. The Information Window can be in any mode, or not even displayed. Any existing drag rectangle on the image window is not disturbed.