Plate.ImageArray Property

 Plate.ImageArray  (read-write, Variant)
 
The Plate object's internal image array in row-major order (automation SafeArray)

Syntax

Plate.ImageArray [= Variant]

The property syntax has these parts:

Part Description
Value (Variant) The Plate object's internal image array in row-major order (automation SafeArray)

Remarks

QUIRK: The returned array is organized in row-major order. Thus when accessing elements of this array, you specify the coordinates in the order Y then X, the opposite of the order used in the Plate.ImagePixel(x,y) property. DC-3 Dreams considers this to be a design error, but it's too late to change it now.
When you read this property, you get a copy of the Plate object's internal image array. You could alter the original internal array (e.g., using the Plate.ImagePixel(x, y) property) then make another copy of it by getting the ImageArray property. You can also write the array copy back to the Plate object, thus altering the original internal array. Doing this will mark the image as modified (Plate.ImageModified will become True).

The returned array always contains Long values ranging from 0 to 65535. When you write this property, the array used as input may contain numbers of various integer and real types. The values in the array must range from 0 through 65535. If you have control over the data type, use Long Integer (32-bit), as ActiveX does not support unsigned 16-bit data.

While PinPoint can attach images in a variety of pixel and image formats including 1-shot color, its internal image storage format is monochrome 16-bit unsigned integer. Monochrome (1-plane) images are scaled to the range 0-65535. Color images are converted on attaching to monochrome 16-bit color.

Setting the Value of ImageArray

When setting the ImageArray property, it is important to note the various types of array and element values that PinPoint will accept. In all cases the array must be an automation SafeArray and may be passed by value or reference. Classic automation languages like VB6 and Windows Script languages use SafeArrays by default. .NET languages will automatically translate arrays into this form for PinPoint as well. The elements of the array can be variants, 32-bit integers, or 16-bit unsigned integers. Classic automation languages produce SafeArrays of variants. In .NET you need to create your array with elements of 32-bit integer or 16-bit unsigned integer (e.g. Integer or UShort respectively in VB.NET). If your array has Integer (32-bit signed) elements, their values must lie between 0 and 65535. Here is an example in VB.NET showing both array types:

Dim A(1023,1023) as Integer   ' 1024x1024
Dim B(511,511) as UShort      ' 512x512 
...
P = New PinPoint.Plate
...
P.ImageArray = A
P.ImageArray = B

If you're using PinPoint from C++, please contact DC-3 Dreams for details.