IMcImageGetLine Method
|
|
Get a line of pixels values.
Namespace:
MediaCy.IQL.Engine
Assembly:
MediaCy.IQL.Engine (in MediaCy.IQL.Engine.dll) Version: 10.0.6912.0
SyntaxFunction GetLine (
<OutAttribute> ByRef pvLine As Object,
y As Integer,
Optional Frame As Integer = -2
) As Integer
Parameters
- pvLine
- Type: SystemObject
A pointer to a VARIANT receiving the pixel values.
If the VARIANT is empty, the function will return one containing a
one-dimensional SAFEARRAY (for one channel per pixel) or a two-dimensional
SAFEARRAY (for multiple channels per pixel). If a 1-D array is created, it will
be shaped as vLine(0 to lWidth-1) for VB arrays and as vLine[lWidth] for
C/C++/Java arrays. If a 2-D array is created, it will be shaped as vLine(0 to
nChannels-1, 0 to lWidth-1) for VB arrays and as vLine[lWidth][nChannels] for
C/C++/Java arrays.
The number of values contained in the
SAFEARRAY is equal to the with of the image times the number of
channels (width for gray scale, 3*width for color images). For color
images, red, green, and blue values are interlaced. - y
- Type: SystemInt32
The 0-based line number. - Frame (Optional)
- Type: SystemInt32
Return Value
Type:
Int32The number of values contained in the line. Should be
image.width*image.NumberOfChannels.
RemarksSee CreateRegionAccess for a more controlled way to get pixel values.
When the routine itself creates the array it is typed after the image type,
which guarantees that the pixel values will fit into the array. If pvLine already
contains an array it must be of the right data type and size.
For languages that do not support the unsigned integer type (like Visual Basic or VBA),
16 bits values bigger than 32767 will be reported as negative because their sign bit is set.
The best way to work around this limitation is to create a "long" McRegionAccess using
CreateRegionAccess and call its own version of GetLine, which will then
return long positive values (4 bytes) instead of unsigned integers (2 bytes).
See Also